Skip to main content

A HTTP header based authenticator for JupyterHub

Project description

NISTAuthenticator

With NISTAuthenticator, you can authenticate JupyterHub users using a customized HTTP header.

Use Case

This may come handy if you wish to integrate JupyterHub into a system with an existing authentication system.

We can put JupyterHub behind a reverse HTTP proxy and use an authentication middleware that re-directs hub users to the system's login page. Upon successful login, the reverse HTTP proxy adds to the original request a customized HTTP header with value set to the user ID. It then forwards the request to JupyterHub and NISTAuthenticator will authenticate the user via the HTTP header and perform all the necessary actions for subsequent requests to JupyterHub and user's single-user notebook server to work.

Installation

You can install with pip:

pip install nistauthenticator

Usage

After successful installation, you can use nistauthenticator as the authenticator for JupyterHub by including the following in your JupyterHub configuration file:

c.JupyterHub.authenticator_class = 'nistauthenticator.NISTAuthenticator'

In the same JupyterHub configuration file, you can configure the name of HTTP header to use for authentication via

c.NISTAuthenticator.user_header = 'your-http-header-name'

and the logout URL can be specified via

c.NISTAuthenticator.logoutURL = 'your-logout-url'

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nistauthenticator-0.1.0.tar.gz (3.0 kB view hashes)

Uploaded Source

Built Distribution

nistauthenticator-0.1.0-py3-none-any.whl (3.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page