When running the Custom MessageConsumer plugin to consume a SAML request, how to fetch in the code the RelayState value from the context?
The postDisambiguateUser method returns the following:
{
PartnershipSource=1
RelayStateOverridesSloConfirm=0
EnableSSOArtifactBinding=0
UrlEncodeAttrCookieData=0
PersistSessionVars=0
DisableSignatureProcessing=0
AllowAuthLevelOverride=0
EnableUnauthorizedRequestURL=0
ServerErrorRedirectMode=0
Name=myPartnership
EnableSAMLRequester=0
SSODefaultService=https://myidp.myidp.com/affwebservices/public/saml2sso
ValidateTargetURLDomain=1
InvalidRequestRedirectURL=https://mysp.mysp.com/affwebservices/public/myjsp.jsp
InvalidRedirectMode=0
MniNotificationAuthType=1
InvalidRedirectURL=https://myinternal.mydomain.com/static/login.html
MniNotifyTimeout=0
InvalidRequestRedirectMode=0
SPID=mySPID
UserNotFoundRedirectURL=https://myinternal.mydomain.com/static/login.html
EnableSSOECPProfile=0
RequireEncryptedNameID=0
EnableAuthnRequestRedirect=1
MniEnablePostBinding=0
MniDeleteNameID=0
BackChannelAuthType=0
MniRetryBoundary=0
Oid=21-015222a551-083b-1fd1-b125-56b60a210000
RequireEncryptedAssertion=0
EnableInvalidRequestURL=0
DSigVerInfoIssuerDN=CN=mydomain,OU=myca,O=myCompany,L=Paris,ST=Paris,C=France
NameIdAllowNested=0
SAMLReqSignAttributeQuery=0
TargetEnableOpenCookieHMAC=0
LDAPSearchSpec=%s
EnforceSingleUsePolicy=0
NameIdType=1
SMCOverrideProtectionLevel=0
RelayStateOverridesSsoTarget=1
IDPPluginParameters=ok
UnauthorizedAccessRedirectMode=0
MniEnableSOAPBinding=0
IsActive=1
KEY_IdPID=myIdP
RedirectMode=0
NameIdFormat=urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified
UnauthorizedAccessRedirectURL=https://mysp.mysp.com/affwebservices/public/myjsp.jsp
EnableServerErrorURL=0
SLOServiceValidityDuration=60
ProvEnableOpenCookieHMAC=0
_DecryptedAssertion=<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Assertion ID="_af122084ebfcb276d93f86923d3fb874c8db"
...
</Assertion>
MniAllowUserSelfService=0
SAMLReqRequireSignedAssertion=0
KEY_IdPSourceID=f3b2bf816370099e34b5f68da2418edc3
MniRetryCount=0
Target=https://myinternal.mydomain.com/research
DSigningAlias=defaultenterpriseprivatekey
SAMLMajorVersion=2
EnableAuthnRequestPost=0
IDPPluginClass=mycompany.smps.activeexpr.SAMLMessageConsumer
UserNotFoundRedirectMode=0
SAMLReqGetAllAttributes=0
MniSOAPTimeout=0
SignatureAlgo=1
MniSignRequest=0
ProvEnableQuotedOpenCookie=0
SkewTime=30
ServerErrorRedirectURL=https://mysp.mysp.com/affwebservices/public/myjsp.jsp
CompareUserDNForSMC=1
MniRequireEncryptedNameID=0
RequireSignedArtifactResponse=0
FailureRedirectURL=https://myinternal.mydomain.com/mypage/login.html
SSOPostIndex=0
DSigVerInfoSerialNumber=12
TargetEnableQuotedOpenCookie=0
Enabled=1
FailureRedirectMode=0
EnableSLORedirectBinding=0
EnableSMC=0
MniRequireSignedResponse=0
MniSignResponse=0
MniEnableRedirectBinding=0
MniRequireSignedRequest=0
EnableSSOPostBinding=1
SignAuthnRequests=1
SAMLMinorVersion=0
AllowIdPtoCreateUserIdentifier=0
MniEncryptNameID=0
MniEnableNotification=0
SignArtifactResolve=0
}
The properties read with the postDisambiguateUser method are the configuration of the partnership.
The RelayState isn't a configuration, but a part of the URL that reaches the Federation Services.
Out of the box, the query parameter RelayState value isn't available MessageConsumerPluginSample.java plugin when SP consumes a SAML response.