Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Pass in a non-empty RelayState for user interactive authentication with SAML #7552

Merged
merged 1 commit into from
May 22, 2020

Conversation

clokep
Copy link
Member

@clokep clokep commented May 21, 2020

To repeat some of #7484, it seems that some SAML identity providers (e.g. Google) require that a RelayState parameter is passed in, even though it is optional. We do not use a relay state for UI auth, but can provide a dummy one in that case.

Fixes #7484

@clokep clokep force-pushed the clokep/saml-relaystate branch from 91cece8 to 7219696 Compare May 21, 2020 15:30
@clokep clokep marked this pull request as ready for review May 21, 2020 15:30
@clokep
Copy link
Member Author

clokep commented May 21, 2020

I debated about whether this should be inside of the SamlHandler instead of in the REST layer, but didn't really convince myself one way or the other.

@clokep clokep requested a review from a team May 21, 2020 15:37
# Some SAML identity providers (e.g. Google) require a
# RelayState parameter on requests. It is not necessary here, so
# pass in a dummy redirect URL (which will never get used).
client_redirect_url = b"unused"
Copy link
Member

@erikjohnston erikjohnston May 22, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does google do anything with this? Or is it just echoed back? I'm mainly just checking that this isn't ever user visible or used in a way that will cause things to break if its not a URL

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe it is just echoed back, a common use seems to be for the "url you want to end up at after login", many examples (e.g. Auth0, Okta docs) use both absolute and relative URLs (things like https://my-site.com/the/resource/you/want as well as just /the/resource/you/want). I do not believe this is usually shown to the user during login in anyway.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Missing string query parameter b'RelayState'" during SAML re-authentication
2 participants