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年前5647ビュー
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年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ