Code Monkey home page Code Monkey logo

jhub_shibboleth_user_authenticator's Introduction

jhub_shibboleth_user_authenticator

Shibboleth User Authenticator for JupyterHub

This is an implementation of a Shibboleth User Authenticator. The authenticator needs a special proxy (e.g. nginx) which implements the shibboleth authorisation as a service provider, serving the /Shibboleth.sso/* commands and pass all other addresses to the jupyterhub proxy.

alt text

This package is the extracting the data from the shibboleth authorisation process and is performing the login process in the jupyterhub.

Shibboleth creates some extra cookies (depending on the configuration), e.g. remote_user . Ususally the remote_user is a complete email address 'username @ domain'. Jupyterhub uses only a username. In some configurations you can get additional cookie entries e.g. the uid which can be used in jupyterhub.

Installation

This package can be installed with pip either from a local git repository or from PyPi.

Installation from local git repository:

cd jhub_shibboleth_user_authenticator
pip install .

Installation from PyPi:

pip install jhub_shibboelth_user_authenticator

Alternately, you can add the local project folder must be on your PYTHONPATH.

Configuration

Usage with a simple jupyterhub configuration:

# use the shibboleth authentidcator
c.JupyterHub.authenticator_class = 'jhub_shibboleth_user_authenticator.shibboleth_user_auth.ShibbolethUserAuthenticator

# use a different cookie entry as the user name , remote_user is the default!
c.Authenticator.header_name = 'uid'

# put some extra values in the auth_state for the spawner
# don't forget to activate c.Authenticator.enable_auth_state = True
c.Authenticator.auth_state_header_names = ['mail', 'givenname']

During tests we found some Shibboleth IdPs which don't support Logout-redirections. So, the default:

# define logout page
c.Authenticator.logout_page = '/Shibboleth.sso/Logout?return=/'

was not working. We add an alternative scheme, which is doing the logout process in a hidden iframe:

# activate the alternative logout scheme
c.Authenticator.logout_redirect = False      ä default is True

# add an automatic redirect to the login page (if you want)
c.Authenticator.automatic_redirect = True    # default is False

jhub_shibboleth_user_authenticator's People

Contributors

ocordes avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.