Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DISCUSS] Pluggable user token creation/validation #50

Open
echarles opened this issue May 31, 2019 · 3 comments
Open

[DISCUSS] Pluggable user token creation/validation #50

echarles opened this issue May 31, 2019 · 3 comments

Comments

@echarles
Copy link
Member

The user token generation/validation is done in various methods of https://github.com/jupyter/jupyter_server/blob/master/jupyter_server/auth/login.py

There is no way for an jupyter admin to change that and use for example an external token provider such as e.g. an OpenID Connect provider.

Is there an interest for such usecase, and how could this be implemented in a pluggable way?

@rolweber
Copy link
Contributor

rolweber commented Jun 3, 2019

An admin can configure a different LoginHandler class:
https://github.com/jupyter/jupyter_server/blob/master/jupyter_server/serverapp.py#L1007-L1012

I'm not sure if there's a point in refactoring the default LoginHandler just to change token generation. Then again, it wouldn't hurt to generate the token in a single place that can be easily overwritten in a derived class.

@echarles
Copy link
Member Author

echarles commented Jun 3, 2019

@rolweber I am still feeling a temptation to factor-out a TokenProvider with methods like get, validate, renew, discard...

@rolweber
Copy link
Contributor

rolweber commented Jun 3, 2019

Go ahead, if you like to. Just don't make it a configurable class for a configurable class :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants