-
Notifications
You must be signed in to change notification settings - Fork 28
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
Using spring boot 2.7 with saml2 through opensaml4 fails #154
Comments
Thanks for reporting this @EugenMayer. We currently only support signed requests which is why you are seeing the error. You can use any key pair to do the signing of the request, Mock SAML does not need any prior knowledge of the public key. The request signature is validated using the public key that is sent with the request to ensure it wasn't changed in transit. |
@deepakprabhakara thank you for the quick reply. So the signature is never validated, right? We can use any private key, it just needs to be signed - did i understand this correctly? |
You can use any private key, the public key will get sent with the signature in the request and we use that to validate the signature. But we don't have to worry about where it came from, only that the contents are what it says it is. |
Sorry, i was not aware that AuthNRequest signing is for integrity only. Thank you a lot for the clarification! If you like, we could close the issue |
We tried to use request signing by adding a private/public key and activating it. Still we get
I can see that the outgoing request is actually including the signature
Maybe the actual auth request does miss something you expect, deflated/decoded it is <?xml version="1.0" encoding="UTF-8"?>
<saml2p:AuthnRequest xmlns:saml2p="urn:oasis:names:tc:SAML:2.0:protocol"
AssertionConsumerServiceURL="http://localhost/login/saml2/sso/master"
Destination="http://localhost:45000/api/saml/sso" ForceAuthn="false" ID="ARQbedf3fc-d18c-45d4-8242-43be3411739e"
IsPassive="false" IssueInstant="2023-03-16T07:30:31.114Z"
ProtocolBinding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Version="2.0">
<saml2:Issuer xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion">
http://localhost/saml2/service-provider-metadata/master
</saml2:Issuer>
</saml2p:AuthnRequest> |
Aah, this is related to #143 |
closing a dupe then |
When using mock-saml with the current spring security saml2 implementation, using opensaml4 as the protocol implementation, we end up
The entire setup is fairly basic. We did not configure AuthNSignRequest since we yet do not understand which private key to use on the client side. Should the generated key/pair that is used for response signing just used on the client to sign the request?
Thank you for the clarification
The text was updated successfully, but these errors were encountered: