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

Signature error with xmlsec on Windows #174

Open
senenpalanca97 opened this issue Jun 3, 2022 · 1 comment
Open

Signature error with xmlsec on Windows #174

senenpalanca97 opened this issue Jun 3, 2022 · 1 comment

Comments

@senenpalanca97
Copy link

I am working with django_saml2_auth to set up a SSO Login on Django. I have installed the xmlsec library from this link and everything seems correct but when testing the endpoint with Azure it throws this error:

check_sig: ['C:\\Users\\user\\code\\project-backend\\env\\Scripts\\xmlsec.exe', '--verify', '--enabled-reference-uris', 'empty,same-doc', '--enabled-key-data', 'raw-x509-cert', '--pubkey-cert-pem', 'C:\\Users\\user\\AppData\\Local\\Temp\\tmpg9oixidy.pem', '--id-attr:ID', 'urn:oasis:names:tc:SAML:2.0:assertion:Assertion', '--node-id', 'xxxxxxx', '--output', 'C:\\Users\\user\\AppData\\Local\\Temp\\tmp4q_a_mb0.xml', 'C:\\Users\\user\\AppData\\Local\\Temp\\tmpybj2a3vf.xml']
correctly_signed_response: Failed to verify signature
Signature Error: Failed to verify signature
XML parse error: Failed to verify signature
Internal Server Error: /sso/acs/
Internal Server Error: /sso/acs/

I've tried it on a Unix system and It works fine.

@natehawkboss
Copy link

My guess is that this is an underlying issue with pysaml2 that has been outstanding since 2020. It has to do with the use of NamedTemporaryFile. See this PR for a proposed fix that has not been implemented as far as I can tell.

Here is the fork with the fix https://github.com/theunraveler/pysaml2/tree/windows_namedtemporaryfile. I can't guarantee that it is fixed.

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

No branches or pull requests

2 participants