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

Multiple signature problem by OKTA SAMLResponse #223

Open
H-D-Choi opened this issue Mar 1, 2021 · 2 comments
Open

Multiple signature problem by OKTA SAMLResponse #223

H-D-Choi opened this issue Mar 1, 2021 · 2 comments

Comments

@H-D-Choi
Copy link

H-D-Choi commented Mar 1, 2021

There is an option to sign double the assertion in OKTA.
But xml-crypto has a rule which SAMLResponse has to has only one signature.
Therefore it can't be validated due to that reason.
How and Could I contribute here to solve this problem?

@cjbarth
Copy link
Contributor

cjbarth commented May 29, 2023

Thank you for identifying this condition @H-D-Choi . Please create a PR with a test suite and we'll check the code over and get it landed.

@srd90
Copy link

srd90 commented Nov 2, 2023

@H-D-Choi your issue report speaks about "sign double the assertion" and it also speaks about xml-crypto not being able to validate SAMLResponse which has more than one signature.

I.e. you are mixing multiple assertion signature and SAML Response signature into same report. One possibility is that you are seeing SAML response which has top level (Response) signature and signed assertion.

It is business as usual that SAML authentication response can have two signatures (if IdP is configured to sign Response and Assertion). In business as usual case one signature would cover Response (and also assertion due to assertion being child of Response) and second one would cover only Assertion.

OKTA's documentation https://help.okta.com/en-us/content/topics/apps/aiw-saml-reference.htm (link referenced 02 Nov 2023) provides only these possibilities at Advanced Settings section:

Response | Choose whether the IdP digitally signs the SAML authentication response message.
Assertion Signature | Choose whether the SAML assertion is digitally signed.

i.e. there doesn't seem to be any option to "sign assertion twice" but there seems to be possibility to configure signing of Response and signing of Assertion.

Have you perhaps enabled Response and Assertion signing (i.e. both) and are you perhaps using some (catch all signatures from any nesting level) xpath statement which loads all Signature elements to be used for validation or something like that.

Here are two different SAML libraries approach to validate signatures with xml-crypto (both support aforementioned scenario):

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

No branches or pull requests

3 participants