-
Notifications
You must be signed in to change notification settings - Fork 6k
SAML2 HTTP-Redirect: Missing Signature and SigAlg parameters in SAMLRequest Url (AuthNRequest) #7711
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thank you for your report. You are absolutely correct. I had originally implemented this as a The BINDING spec covers this in detail in section 3.4.4.1 DEFLATE Encoding Some Identity Providers, like Okta, ignore all signatures on the And that's probably why we haven't seen this bug reported until now. I have prototyped two different solutions, in two different PRs for review.
Flagging @rwinch for consideration. PS. During testing I discovered that java.util.Base64 is not sufficient for all IDPs, and we had a message that failed. So we changed the encoder/decoder back to Apache Commons Codec. Test configuration as a gist |
…equest is signed Has been tested with - Keycloak - SSOCircle - Okta - SimpleSAMLPhp Further configuration options (POST vs REDIRECT) that build on top of this PR can be found in: spring-projects#7759 [fixes spring-projects#7711]
Implements the following bindings for AuthNRequest - REDIRECT - POST (future PR) Has been tested with - Keycloak - SSOCircle - Okta - SimpleSAMLPhp Fixes spring-projectsgh-7711
Implements the following bindings for AuthNRequest - REDIRECT - POST (future PR) Has been tested with - Keycloak - SSOCircle - Okta - SimpleSAMLPhp Fixes spring-projectsgh-7711
Implements the following bindings for AuthNRequest - REDIRECT - POST (future PR) Has been tested with - Keycloak - SSOCircle - Okta - SimpleSAMLPhp Fixes gh-7711
Hi, thanks for fixing. When can we expect the fix to be released? Is there a workaround? |
@lilalinux Most IDPs don't require signatures because they have the SSO URLs white listed and preconfigrued. The work around is to not require signatures. This will be part of the 5.3 release. |
Unfortunately in SAP idP we can't disable that requirement 😕 |
This is in the 5.3 release which will be out tomorrow. You can figure it out by looking at the milestone on the right hand side of the issue and clicking on it to see the scheduled date. |
Removed one method as well as a parameter from another method Issue gh-7711
Removed one method as well as a parameter from another method Issue gh-7711
My understanding is that this fix is in 5.3.x and not in 5.2.x, is that correct? |
@fpagliar Yes it is only in 5.3.x As an enhancement it does not get backported to patch releases (which are only bug fixes) |
I'm fine with it not being backported, but I'm trying to figure out the state and what to expect, so sorry to bother but I need to clarify the status. |
Yes, @fpagliar, 5.2 deviates from |
Summary
I'm currently update to Spring Security 5.2.1. and start to use the integrated SAML 2 implementation.
During the integration I noticed that my identity provider (Keycloak) does not accept the signed AuthNRequest.
The reason is that SAML 2 expects different signature for different bindings (POST or Redirect) - at least that's how I understand it.
(e.g. https://idp/?SAMLRequest=...&RelayState=...&SigAlg=...&Signature=...)
I checked the Spring Security SAML Extension online demo (https://saml-federation.appspot.com) and here it works as expected.
and a none signed AuthNRequest
Currently the URL is created while using
createSamlRequestRedirectUrl
inSaml2WebSsoAuthenticationRequestFilter
and these parameters aren't set.Expected Behavior
Using HTTP-Redirect binding SigAlg and Signature parameters are added to SAMLRequest Url and AuthNRequest XML is not signed.
Version
5.2.1.RELEASE
The text was updated successfully, but these errors were encountered: