-
Notifications
You must be signed in to change notification settings - Fork 97
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
saml2.response.IncorrectlySigned Internal Server Error #135
Comments
Do you know which binding is being used? If you are using the HTTP-REDIRECT binding, the signature must be in the Authn request itself as the pysaml2 library doesn't yet support passing the signature via a URL query parameter. See this pull request. If you are using the HTTP-POST binding, double check there is a signature in the Authn request. |
How to use How can use Can you please have a look at my settings? i have already added above? |
Hi, Can anyone help me to fix this? |
It appears to be supported now, in IdentityPython/pysaml2@718cf98 |
I am now testing this diff: # diff -c /usr/local/lib/python3.9/dist-packages/djangosaml2idp/views.py.orig /usr/local/lib/python3.9/dist-packages/djangosaml2idp/views.py *** /usr/local/lib/python3.9/dist-packages/djangosaml2idp/views.py.orig 2022-01-18 15:08:14.414687736 +0100 --- /usr/local/lib/python3.9/dist-packages/djangosaml2idp/views.py 2022-01-18 16:01:56.845308818 +0100 *************** *** 56,61 **** --- 56,66 ---- request.session['Binding'] = binding request.session['SAMLRequest'] = saml_request request.session['RelayState'] = passed_data.get('RelayState', '') + if binding == BINDING_HTTP_REDIRECT: + if 'SigAlg' in passed_data: + request.session['SigAlg'] = passed_data.get('SigAlg') + if 'Signature' in passed_data: + request.session['Signature'] = passed_data.get('Signature') @never_cache *************** *** 233,239 **** idp_server = IDP.load() # Parse incoming request ! req_info = idp_server.parse_authn_request(request.session['SAMLRequest'], binding) # check SAML request signature try: --- 238,247 ---- idp_server = IDP.load() # Parse incoming request ! if binding == BINDING_HTTP_REDIRECT: ! req_info = idp_server.parse_authn_request(request.session['SAMLRequest'], binding, relay_state=request.session.get('RelayState', None), sigalg=request.session.get('SigAlg', None), signature=request.session.get('Signature', None)) ! else: ! req_info = idp_server.parse_authn_request(request.session['SAMLRequest'], binding) # check SAML request signature try: |
In my case to get the example working I had to set:
to sp.settings.py and idp.settings.py |
I am implementing
SSO
withSAML2
but i am going through trouble.I am using these lib:
https://github.com/OTA-Insight/djangosaml2idp
https://github.com/IdentityPython/djangosaml2
The
SP
is working well, there issue with theidp
This is the error i am getting:
and this is my url pattern
and this is my
settings.py
fileEveryting is working well but when it redirect to
/idp/login/process/
url, then it fires the error. Can anyone help me to solve this issue?The text was updated successfully, but these errors were encountered: