HewlettPackard / jupyterhub-samlauthenticator

jupyterhub-samlauthenticator
MIT License
36 stars 25 forks source link

Both slo_forward_on_logout and slo_forwad_on_logout are required to prevent redirect #58

Open jeffmaley opened 3 years ago

jeffmaley commented 3 years ago

It looks like the remediation from (https://github.com/bluedatainc/jupyterhub-samlauthenticator/issues/40) has resulted in both variables being required or the samlauthenticator looks for the SingleSignOut in the metadata. With only one set (it doesn't matter which), the following shows up the logs:

[D 2020-09-16 16:43:43.808 JupyterHub samlauthenticator:711] Got metadata etree [D 2020-09-16 16:43:43.808 JupyterHub samlauthenticator:717] Got valid metadata etree [D 2020-09-16 16:43:43.809 JupyterHub samlauthenticator:723] Final xpath is: //md:SingleLogoutService[@Binding='urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect']/@Location [E 2020-09-16 16:43:43.809 JupyterHub web:1792] Uncaught exception GET /hub/logout (72.21.198.66) HTTPServerRequest(protocol='http', host='jupyter3.domain.tld', method='GET', uri='/hub/logout', version='HTTP/1.1', remote_ip='72.21.198.66') Traceback (most recent call last): File "/opt/jupyterhub/lib64/python3.7/site-packages/tornado/web.py", line 1703, in _execute result = await result File "/opt/jupyterhub/lib64/python3.7/site-packages/samlauthenticator/samlauthenticator.py", line 852, in get logout_handler_self) File "/opt/jupyterhub/lib64/python3.7/site-packages/samlauthenticator/samlauthenticator.py", line 729, in _get_redirect_from_metadata_and_redirect handler_self.redirect(redirect_link_getter(saml_metadata_etree)[0], permanent=False) IndexError: list index out of range

distortedsignal commented 3 years ago

This is going to be fixed in the v1 release when slo_forwad_on_logout is removed.