Open fxdgear opened 5 years ago
Ran into the same issue. Stayed with pysaml==4.7.0 after setting ENTITY_ID in the settings. While docs for django-saml2-auth indicate ENTITY_ID is optional, pysaml>4.5.0 makes it not optional.
I provided ENTITY_ID as well but have the following error:
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
I've had to pin my requireemnts to install from master for this project. But I've also had to pin my requirements for pysaml2 to 4.5.0 cause a release in pysaml2 checks for the existance of the
entityid
in the pysaml config. When we instantiate the saml client here I think we need to pass in aconfig
object.cause later in the pysaml2 lib here we are checking for the existance of an attribute
config
.