https://github.com/bcongdon/jupyterhub-sqlauthenticator
:closed_lock_with_key: Authenticate Jupyterhub with a MySQL user DB
https://github.com/bcongdon/jupyterhub-sqlauthenticator
jupyterhub jupyterhub-authenticator mysql-database
Last synced: 9 months ago
JSON representation
:closed_lock_with_key: Authenticate Jupyterhub with a MySQL user DB
- Host: GitHub
- URL: https://github.com/bcongdon/jupyterhub-sqlauthenticator
- Owner: bcongdon
- License: mit
- Created: 2016-10-21T14:47:21.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2016-10-22T23:41:37.000Z (about 9 years ago)
- Last Synced: 2025-03-26T02:03:37.117Z (10 months ago)
- Topics: jupyterhub, jupyterhub-authenticator, mysql-database
- Language: Python
- Homepage:
- Size: 6.84 KB
- Stars: 14
- Watchers: 2
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Jupyterhub-SQLAuthenticator
> Authenticate Jupyterhub with a MySQL user database
## Installation
Run this command to install:
```
pip install sqlauthenticator
```
In your `jupyter_config.py` file, add or modify the following line to set the authentication method:
```
c.JupyterHub.authenticator_class = 'sqlauthenticator.SQLAuthenticator'
```
Additionally, set the following environment variables to point to your MySQL users database:
- `MYSQL_HOST` - MySQL Server hostname
- `MYSQL_PORT` - MySQL Server port
- `MYSQL_DB` - MySQL Database name
- `MYSQL_USER` - MySQL Username
- `MYSQL_PASS` - MySQL Password
## Usage
The database defined in `MYSQL_DB` should have a table called `users` which has columns `username` and `password`.
- `username` should contain the plaintext username to be used by Jupyterhub
- `password` should contain the user password hashed with the [PBKDF2](https://en.wikipedia.org/wiki/PBKDF2) hashing scheme.