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).

질문됨 4년 전5644회 조회
9개 답변
0
수락된 답변

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
지원 엔지니어
답변함 4년 전
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
지원 엔지니어
답변함 4년 전
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.

답변함 4년 전
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

답변함 4년 전
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
답변함 3년 전
0

+1

답변함 3년 전
0

+1

hmarin
답변함 3년 전
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
답변함 3년 전
0

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

답변함 3년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인