-
-
Notifications
You must be signed in to change notification settings - Fork 473
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
Decrypted Assertion modified namespace results as assertion Signature not valid. #578
Comments
This issue has been around for quite a while (see SAML-Toolkits/wordpress-saml#136), and it's certainly a bug. |
@maijs , have you tested that instead:
having:
solves your issue? Can you generate self-signed cert and private key, use them on the Idp to generate a fresh new Signed Encrypted Assertion and share untouched encodebased64 SAMLResponse with the self-signed cert and private key to allow me explore? |
@pitbulk Yes, the code you provided does solve the issue, because it doesn't alter the object, at least in my case where none of the two conditions return true. |
@maijs thanks for confirming. The IdPs that I usually use for testing php-saml (Okta, OneLogin, Azure, simpleSAMLphp) generate encrypted assertions Would you mind to generate and share with me a base64 encoded SAMLResponse with encrypted assertion payload and provide to me self-signed private key and public cert used for this specific purpose (so its ok to make them public), or you even could reuse the sp.key and sp.crt as the one to be used at the IdP, so I could properly apply the fix and add test coverage so no regressions gonna be introduced in the future? |
Document
Incoming saml Response are signed, Assertion also are signed and encrypted.
PHP 8.2.16
Problem
Assertion signature not valid after it are modified with this line:
Document parts examples - response and decrypted assertion:
Main elements:
Auth fails at:
Opinion:
So i think what it is wrong to modify signed assertion. Maybe responses are also are not 100% perfect, but o can't modify them.
Maybe php bug in function ->hasAttributeNS dose not detect existing xmlns..
In result next function write one more $qualifiedName 'xmlns'
Solutions:
The text was updated successfully, but these errors were encountered: