-
Notifications
You must be signed in to change notification settings - Fork 222
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
Binding problem #165
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi folks,
I'm having an issue regarding to the binding that the module is using, it seems that by default its set to Redirect but my provider is expecting POST as below:
`Environment:
Request Method: GET
Request URL: http://localhost:8000/login/?next=/
Django Version: 3.1.7
Python Version: 3.8.8
Installed Applications:
['django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django_extensions',
'interlake_uploader',
'django_saml2_auth']
Installed Middleware:
['django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware']
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/django_saml2_auth/views.py", line 243, in signin
_, info = saml_client.prepare_for_authenticate()
File "/usr/local/lib/python3.8/site-packages/saml2/client.py", line 72, in prepare_for_authenticate
reqid, negotiated_binding, info = self.prepare_for_negotiated_authenticate(
File "/usr/local/lib/python3.8/site-packages/saml2/client.py", line 137, in prepare_for_negotiated_authenticate
destination = self._sso_location(entityid, binding)
File "/usr/local/lib/python3.8/site-packages/saml2/client_base.py", line 235, in _sso_location
srvs = self.metadata.single_sign_on_service(list(eids.keys())[0], binding)
File "/usr/local/lib/python3.8/site-packages/saml2/mdstore.py", line 1190, in single_sign_on_service
return self.service(entity_id, "idpsso_descriptor",
File "/usr/local/lib/python3.8/site-packages/saml2/mdstore.py", line 1147, in service
raise UnsupportedBinding(binding)
Exception Type: UnsupportedBinding at /login/
Exception Value: urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect
`
I was able to solve this issue replacing the binding variable on mdstore.py from Redirect to POST, but it felt wrong to do so, is there any other way that I can change this setting ?
The text was updated successfully, but these errors were encountered: