Skip to content

An authenticator for JupyterHub that hits a remote URL for authentication.

License

Notifications You must be signed in to change notification settings

vroetman/jupyterhub-urlauthenticator

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jupyterhub-urlauthenticator

Authenticator for JupyterHub that allows all user logins against a url that returns a response indicating if the login should succeed. If the response from the URL POST includes the same username as in the data coming to the authenticator.authenticate method, the login should succeed.

Used yuvipanda's jupyterhub-dummy-authenticator as an example. Thanks for making that available.

Usage

After installation, you can then use the authenticator by adding the following lines to your jupyterhub_config.py (replacing square bracket items with your values):

c.JupyterHub.authenticator_class = 'urlauthenticator.UrlAuthenticator'
c.UrlAuthenticator.server_address = 'http://[address]'
c.UrlAuthenticator.server_port = [port]
# This does no magic with slashes. If you require a trailing one and it's not
# provided, this will error now. Same with leading slash (NEEDED FOR NOW)
c.UrlAuthenticator.login_route = '[/path/to/login/service]'

Installation

pip install [-e] git+git://github.com/thecaffiend/jupyterhub-urlauthenticator.git

It has no additional dependencies beyond JupyterHub (tornado is installed by jupyterhub).

TODO

  • get this on pypi
  • make authenticator smarter about trailing/leading slashes in URL/routes
  • add a way to specify header values (right now json only)
  • Add error handling.
  • tests
  • better code/auto doc

Other

About

An authenticator for JupyterHub that hits a remote URL for authentication.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%