Skip to content

fldsblzs/jupyterhub-cognito-jwt-forward

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JupyterHub Cognito JWT Forward

Handle the authentication in Jupyter Hub when the actual authentication is happening on the application load balancer level in AWS. This authenticator just parses the forwarded JWT coming from AWS and sets the email.

This implementation is not secure, only use this behind a load balancer with Cognito Authentication action configured.

Installation

This package can be installed with pip:

pip install jupyterhub-cognito-jwt-forward

Configuration

# jupyterhub_config.py

# Using JSONWebTokenAuthenticator
c.JupyterHub.authenticator_class = 'jupyterhub-cognito-jwt-forward.jwtauthenticator.JSONWebTokenAuthenticator'
c.JSONWebTokenAuthenticator.header_name = 'x-amzn-oidc-data'

# Using JSONWebTokenLocalAuthenticator
c.JupyterHub.authenticator_class = 'jupyterhub-cognito-jwt-forward.jwtauthenticator.JSONWebTokenLocalAuthenticator'
c.JSONWebTokenLocalAuthenticator.header_name = 'x-amzn-oidc-data'

c.JSONWebTokenLocalAuthenticator.create_system_users = True # (optional)

About

A Token Authenticator for JupyterHub

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 100.0%