jwtauthenticator icon indicating copy to clipboard operation
jwtauthenticator copied to clipboard

401 Unautherized

Open skarthic15 opened this issue 7 years ago • 4 comments

Getting 401 Unauthorized error when i use jwtauthenticator. domain.com/hub/login page shows "401 Unauthorized"

jupyterhub_config.py: c.JupyterHub.authenticator_class = 'jwtauthenticator.jwtauthenticator.JSONWebTokenLocalAuthenticator' c.JSONWebTokenAuthenticator.signing_certificate = '/opt/jupyterhub/auth.crt' c.JSONWebTokenAuthenticator.username_claim_field = 'upn' c.JSONWebTokenAuthenticator.expected_audience = '' c.JSONWebTokenAuthenticator.header_name = 'Authorization'

skarthic15 avatar Jul 25 '18 14:07 skarthic15

I am facing same issue, were you able to resolve it?

ashimmishra avatar Mar 08 '19 10:03 ashimmishra

Check if you are using correct property for you secret. If it's LocalAuthenticator, then configuration key is different than this in example, it should be: c.JSONWebTokenLocalAuthenticator.secret = 'secret'

piotr-rudnik avatar Apr 15 '20 11:04 piotr-rudnik

@piotr-rudnik are you sue it's not #c.JSONWebLocalTokenAuthenticator like in

#c.JSONWebLocalTokenAuthenticator.create_system_users = True

mikekuzak avatar Aug 16 '21 15:08 mikekuzak

I am facing the same issue with the following configurations: c.JupyterHub.authenticator_class = 'jwtauthenticator.jwtauthenticator.JSONWebTokenAuthenticator' c.JSONWebTokenAuthenticator.header_name = 'Authorization' c.JSONWebTokenAuthenticator.secret = 'XXXX-XXXX-XXXX-XXXX' c.JSONWebLocalTokenAuthenticator.create_system_users = True c.JSONWebTokenAuthenticator.client_id = 'client-id' c.JSONWebTokenAuthenticator.expected_audience = '' c.JSONWebTokenAuthenticator.username_claim_field = 'preferred_username'

I am trying to have another application for signing-in which will in return give a JWT token through which we should be able to login to jupyterhub by completely bypassing the log-in page

MohitKhandelwal06 avatar Apr 04 '23 09:04 MohitKhandelwal06