Skip to content
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

Version checking on SAML response processing #334

Closed
mauromol opened this issue Apr 14, 2021 · 3 comments · Fixed by #356
Closed

Version checking on SAML response processing #334

mauromol opened this issue Apr 14, 2021 · 3 comments · Fixed by #356

Comments

@mauromol
Copy link
Contributor

When validating the SAML response, java-saml now checks that the Version attribute of Response is 2.0.
However it does not check the Version attribute of the Assertion.

Shouldn't it be checked as well?

@pitbulk
Copy link
Contributor

pitbulk commented Jul 23, 2021

I don't think a SAMLResponse Version 2.0 gonna have an Assertion 1.0 or 1.1 ... but if that the case the xsd validation will raise an error, so I believe we can omit it.

@mauromol
Copy link
Contributor Author

mauromol commented Jul 24, 2021

I don't know how 1.0 or 1.1 assertions look like and I don't know whether some of them may be forward compatible with 2.0 assertions. What is sure is that the SAML 2.0 schema for assertions does not mandate that the Version attribute of AssertionType must be equal to 2.0, so, for instance, if a (malicious/erroneous?) response is received with a Version="3.0" on the assertion, the schema validation performed by java-saml won't fail: should it instead? I think that it should as much as a Response with Version="3.0" causes it to fail ;-)

@pitbulk
Copy link
Contributor

pitbulk commented Jul 24, 2021

Im ok if we verify the assertion version as well.
The check on the response was important to detect valid saml 1.1 responses to be identified and rejected.

I dont think an attack could be executed exploting the version attribute, to be honest.

mauromol added a commit to mauromol/java-saml that referenced this issue Aug 17, 2021
It must be 2.0, just like the Response version.

Closes SAML-Toolkits#334.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants