django-saml2-auth icon indicating copy to clipboard operation
django-saml2-auth copied to clipboard

Pysaml2 Version

Open hooman96 opened this issue 6 years ago • 3 comments

https://github.com/IdentityPython/pysaml2/blob/master/CHANGELOG.md

which version of pysaml2 is compatible with this project?

I currently get the following error after setting up required metadata on domain/login: METADATA_LOCAL_FILE_PATH and METADATA_AUTO_CONF_URL

<Internal Server Error: /admin/login/
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/saml2/client_base.py", line 181, in _sso_location
    srvs = self.metadata.single_sign_on_service(list(eids.keys())[0],
IndexError: list index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/django/core/handlers/exception.py", line 34, in inner
    response = get_response(request)
  File "/usr/local/lib/python3.7/site-packages/django/core/handlers/base.py", line 115, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/usr/local/lib/python3.7/site-packages/django/core/handlers/base.py", line 113, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/usr/local/lib/python3.7/site-packages/django_saml2_auth/views.py", line 243, in signin
    _, info = saml_client.prepare_for_authenticate()
  File "/usr/local/lib/python3.7/site-packages/saml2/client.py", line 76, in prepare_for_authenticate
    **kwargs)
  File "/usr/local/lib/python3.7/site-packages/saml2/client.py", line 110, in prepare_for_negotiated_authenticate
    destination = self._sso_location(entityid, binding)
  File "/usr/local/lib/python3.7/site-packages/saml2/client_base.py", line 185, in _sso_location
    raise IdpUnspecified("No IdP to send to given the premises")
saml2.client_base.IdpUnspecified: No IdP to send to given the premises>

hooman96 avatar Oct 01 '19 20:10 hooman96

@hooman96 Check if metadata is correctly formed, specially the IDPSSODescriptor

ghost avatar Oct 02 '19 03:10 ghost

@akshit-wwstay do you mean in SAML xml file? or SAML2_AUTH in django?

hooman96 avatar Oct 02 '19 19:10 hooman96

@hooman96 Saml XML file.

ghost avatar Oct 03 '19 04:10 ghost