Invalid relayState in Cognito

0

Is there documentation on what the format for a valid relayState would be in Cognito? I cannot seem to properly format a relayState that Cognito will accept, and can find no documentation on the subject. The standard RelayState format used as specified in other places (e.g. https://jackstromberg.com/adfs-relay-state-generator/) causes Cognito to throw an invalid relayState message.

The set up is to use ADFS as a SAML identity provider and to enable logoff flow. I then log in via my app, and go to the ADFS screen to log out. Initially it threw a missing relayState, but I fixed that by placing a RelayState query parameter in ADFS for my logout path. It recognizes that I added the parameter, but apparently cannot parse it (thus throwing an invalid relayState).

posta 4 anni fa5652 visualizzazioni
9 Risposte
0
Risposta accettata

We have heard requests for IdP-Initiated SSO and will take this as a +1 for this feature request but we can not provide an ETA for this.

AWS
TECNICO DI SUPPORTO
con risposta 4 anni fa
0

"Is there documentation on what the format for a valid relayState would be in Cognito?"

  • No, we don't have a published format for this but this can be decoded from network requests. Cognito relay states consist of a JSON object with userpool details with a signature appended to it.

"I cannot seem to properly format a relayState that Cognito will accept, and can find no documentation on the subject. The standard RelayState format used as specified in other places (e.g. https://jackstromberg.com/adfs-relay-state-generator/) causes Cognito to throw an invalid relayState message."

  • This is expected. Even if a valid JSON relayState can be created from available information, the signature part can't be generated. So, in short, you can't generate relayState and use IdP-Initiated SSO.

"The set up is to use ADFS as a SAML identity provider and to enable logoff flow. I then log in via my app, and go to the ADFS screen to log out. Initially it threw a missing relayState, but I fixed that by placing a RelayState query parameter in ADFS for my logout path. It recognizes that I added the parameter, but apparently cannot parse it (thus throwing an invalid relayState)."

AWS
TECNICO DI SUPPORTO
con risposta 4 anni fa
0

The logout request needs to be generated from Cognito. ... Enabling this flow sends a signed logout request to the SAML IdP with a valid relay state when the LOGOUT Endpoint is called.

Yes - that is working. I have "Enable IdP Signout Flow" checked, and when logging in and out from my application I can get proper login and logout from ADFS. However, when I attempt to log in (or log out) of my application from the ADFS screens (a process we call IDP signin) it doesn't work correctly. It doesn't work because Cognito is looking for a relay state parameter which I can't provide it. There is a place in ADFS where I can place an encoded relayState parameter to enable this functionality, but I can't formulate a correct one.

con risposta 4 anni fa
0

So, in short, you can't generate relayState and use IdP-Initiated SSO

That's my problem, I guess. That's too bad. Is there a desire sometime in future to allow for this?

Edited by: RaviSDesai on Jun 2, 2020 12:23 PM

con risposta 4 anni fa
0

Please add my +1 for IdP-initiated SSO.

Our use case: We're providing an application to enterprise customers, and have heard the question on how to integrate our app into the enterprise application directory through IdP-initiated SSO every time. Right now our answer to this is to configure the application directory to link to our application directly, and have that trigger SP-initiated sign-in. This works, but is obviously not what the enterprise IT departments expect.

Edited by: ankon on Mar 25, 2021 4:56 PM

ankon
con risposta 3 anni fa
0

+1

con risposta 3 anni fa
0

+1

hmarin
con risposta 3 anni fa
0

Both logoutUrl and callbackUrls are available in the escape hatch of the user pool client (CDK .net).

The documentation says that if logouturl is specified in the UserPool stack then the Relay State is not required (this is specific to Azure AD Idp) but even after using the escape hatch to specify the URLs for the UserPoolClient, the Azure AD app client throws a Relay State parameter required error or Invalid Relay State from Identity Provider error.

It seems like a grey area.

Can someone help by shedding some light on this?

hey-rjv
con risposta 3 anni fa
0

+1 has there been any change in that feature, or lack thereof?

con risposta 3 anni fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande