Open FatemeKhodayari opened 1 year ago
Hi! Not as a solution, but for the sake of running it locally, it works when you change
from importlib_resources import path as _resource_path
to
from importlib.resources import path as _resource_path
in your local saml2
files.
changing pysaml2
version in requirements.txt
for both idp and sp to from 6.5.1 to 7.3.1 solved the issue for me
returncode=1 error=Signature status: FAILED Failure reason: KEY-NOT-FOUND Error: failed to sign file "/tmp/tmpipdsmmnp.xml"
output= Internal Server Error: /saml2/login/ Traceback (most recent call last): File "/usr/local/lib/python3.8/site-packages/saml2/sigver.py", line 840, in sign_statement (stdout, stderr, output) = self._run_xmlsec(com_list, [tmp.name]) File "/usr/local/lib/python3.8/site-packages/saml2/sigver.py", line 913, in _run_xmlsec raise XmlsecError(errmsg) saml2.sigver.XmlsecError: returncode=1 error=Signature status: FAILED Failure reason: KEY-NOT-FOUND Error: failed to sign file "/tmp/tmpipdsmmnp.xml"
output=
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/local/lib/python3.8/site-packages/django/core/handlers/exception.py", line 47, in inner response = get_response(request) File "/usr/local/lib/python3.8/site-packages/django/core/handlers/base.py", line 181, in _get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/usr/local/lib/python3.8/site-packages/djangosaml2/views.py", line 224, in login session_id, request_xml = client.create_authn_request( File "/usr/local/lib/python3.8/site-packages/saml2/client_base.py", line 451, in create_authn_request msg = self._message( File "/usr/local/lib/python3.8/site-packages/saml2/entity.py", line 577, in _message signed_req = self.sign( File "/usr/local/lib/python3.8/site-packages/saml2/entity.py", line 513, in sign return signed_instance_factory(msg, self.sec, to_sign) File "/usr/local/lib/python3.8/site-packages/saml2/sigver.py", line 324, in signed_instance_factory signed_xml = seccont.sign_statement( File "/usr/local/lib/python3.8/site-packages/saml2/sigver.py", line 1717, in sign_statement return self.crypto.sign_statement( File "/usr/local/lib/python3.8/site-packages/saml2/sigver.py", line 842, in sign_statement raise SignatureError(com_list) saml2.sigver.SignatureError: ['/usr/bin/xmlsec1', '--sign', '--privkey-pem', '/app/certificates/private.key', '--id-attr:ID', 'urn:oasis:names:tc:SAML:2.0:protocol:AuthnRequest', '--node-id', 'id-38Rm2TT1e8HUs4gop', '--output', '/tmp/tmp31g312dh.xml', '/tmp/tmpipdsmmnp.xml'] [07/Jun/2024 03:39:01] "GET /saml2/login/ HTTP/1.1" 500 124061
Hi. The code within
example_setup
directory is not working neither in docker nor in normal setup. In both cases, it returns the following error