HewlettPackard / jupyterhub-samlauthenticator

jupyterhub-samlauthenticator
MIT License
36 stars 25 forks source link

Failed to verify signature on SAML Response #69

Open ebebpl opened 1 year ago

ebebpl commented 1 year ago

We are getting an error in the SAML response on Jupyterhub. The similar SAML certificate and response is working fine in the old version of jupyterhub 0.9.4 below:

conda list jupyterhub Name Version Build Channel jupyterhub 0.9.4 py37_1000 conda-forge jupyterhub-samlauthenticator 0.0.7 pypi_0 pypi

But doesnt work in the new version below:

conda list jupyterhub Name Version Build Channel jupyterhub 2.0.0 pyhd3eb1b0_0 jupyterhub-samlauthenticator 0.0.7 pypi_0 pypi

I did reinstall the latest jupyterhub-samlauthenticator 0.0.9 but got same error.

See the error messages below:

[I 2022-09-13 17:47:14.423 JupyterHub app:3101] JupyterHub is now running at http://:8000

[W 2022-09-13 17:47:34.330 JupyterHub base:391] Invalid or expired cookie token [I 2022-09-13 17:47:34.331 JupyterHub samlauthenticator:806] Starting SP-initiated SAML Login [I 2022-09-13 17:47:34.334 JupyterHub log:189] 302 GET /hub/login -> https://abc.com/auth123/ (@::ffff:x.x.x.x) 6.81ms

[W 2022-09-13 17:48:38.395 JupyterHub samlauthenticator:423] Failed to verify signature on SAML Response [W 2022-09-13 17:48:38.395 JupyterHub samlauthenticator:346] Exception: Extra content at the end of the document, line 1, column 3433 (, line 1) [W 2022-09-13 17:48:38.395 JupyterHub samlauthenticator:565] Failed to verify signature on SAML Response [E 2022-09-13 17:48:38.395 JupyterHub samlauthenticator:701] Error validating SAML response [W 2022-09-13 17:48:38.395 JupyterHub base:802] Failed login for unknown user [E 2022-09-13 17:48:38.396 JupyterHub web:1789] Uncaught exception POST /hub/login (::ffff:x.x.x.x) HTTPServerRequest(protocol='http', host='xyz.com:8000', method='POST', uri='/hub/login', version='HTTP/1.1', remote_ip='::ffff:x.x.x.x') Traceback (most recent call last): File "/data/anaconda3/lib/python3.9/site-packages/tornado/web.py", line 1704, in _execute result = await result File "/data/anaconda3/lib/python3.9/site-packages/jupyterhub/handlers/login.py", line 160, in post login_error='Invalid username or password', username=data['username'] KeyError: 'username'

[E 2022-09-13 17:48:38.463 JupyterHub log:181] { "X-Forwarded-Host": "xyz.com:8000", "X-Forwarded-Proto": "http", "X-Forwarded-Port": "8000", "X-Forwarded-For": "::ffff:x.x.x.x", "Cookie": "", "Accept-Language": "en-US,en;q=0.9", "Accept-Encoding": "gzip, deflate, br", "Referer": "https://abc.com/", "Sec-Fetch-Dest": "document", "Sec-Fetch-Mode": "navigate", "Sec-Fetch-Site": "same-site", "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,/;q=0.8,application/signed-exchange;v=b3;q=0.9", "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36", "Content-Type": "application/x-www-form-urlencoded", "Origin": "https://abc.com", "Upgrade-Insecure-Requests": "1", "Sec-Ch-Ua-Platform": "\"Windows\"", "Sec-Ch-Ua-Mobile": "?0", "Sec-Ch-Ua": "\"Chromium\";v=\"104\", \" Not A;Brand\";v=\"99\", \"Google Chrome\";v=\"104\"", "Cache-Control": "max-age=0", "Content-Length": "7269", "Connection": "close", "Host": "xyz.com:8000" } [E 2022-09-13 17:48:38.464 JupyterHub log:189] 500 POST /hub/login (@::ffff:x.x.x.x) 74.15ms 17:52:14.430 [ConfigProxy] info: 200 GET /api/routes 17:57:14.430 [ConfigProxy] info: 200 GET /api/routes