Registry / devops / jupyterhub-nativeauthenticator

jupyterhub-nativeauthenticator

JSON →
library1.3.0pypypi✓ verified 84d ago

A JupyterHub authenticator that provides username/password authentication with signup, password reset, and admin management via the web UI. Current version: 1.3.0. Release cadence is irregular, with minor releases every few months.

pip install jupyterhub-nativeauthenticator
INSTALL
IMPORT
SIG · JUPYTERHUB-NATIVEA
J
jupyterhub-nativeauthenticator
devopspythonv1.3.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

NativeAuthenticator
from nativeauthenticator import NativeAuthenticator
from jupyterhub_nativeauthenticator import NativeAuthenticator
The package is installed as jupyterhub-nativeauthenticator but the Python module is nativeauthenticator (no hyphen, no underscore).

Add this line to your JupyterHub config file (e.g., jupyterhub_config.py). Only the authenticator_class setting is required; further configuration (e.g., allowed users, signup options) is optional.

c.JupyterHub.authenticator_class = 'nativeauthenticator.NativeAuthenticator'
Debug
Known issues
breakingIn version 1.0.0, the authenticator class was renamed from 'NativeAuthenticator' to 'nativeauthenticator.NativeAuthenticator'.
fix
Update config to use 'nativeauthenticator.NativeAuthenticator' instead of 'NativeAuthenticator'.
affects: <1.0.0
gotchaThe Python module name is 'nativeauthenticator', NOT 'jupyterhub_nativeauthenticator' or 'jupyterhub-nativeauthenticator'. Using the wrong import will cause ModuleNotFoundError.
fix
Use 'from nativeauthenticator import NativeAuthenticator' or the class path 'nativeauthenticator.NativeAuthenticator' in JupyterHub config.
affects: all
deprecatedThe 'create_system_users' option (default False) is deprecated and will be removed in a future version. Use the Spawner's system user creation mechanism instead.
fix
Remove 'c.NativeAuthenticator.create_system_users' from your config and handle user creation via the Spawner.
affects: >=1.0.0
gotchaThe whitelist option 'whitelist' was renamed to 'allowed_users' in version 1.0.0. Using the old name may be silently ignored or cause errors.
fix
Use 'c.NativeAuthenticator.allowed_users' instead of 'c.NativeAuthenticator.whitelist'.
affects: >=1.0.0
gotchaIf you enable signup, ensure the SPAWNER is configured to create users (e.g., by setting 'create_system_users' or using a spawner that auto-creates accounts). Otherwise, users may sign up but cannot spawn servers.
fix
Configure your spawner to create system users, or set 'c.NativeAuthenticator.create_system_users = True' (note deprecation warning for this option).
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'nativeauthenticator'
The library 'jupyterhub-nativeauthenticator' is not installed, or the import path is wrong.
fix
Install the package: 'pip install jupyterhub-nativeauthenticator'. Then use 'from nativeauthenticator import NativeAuthenticator'.
ImportError: cannot import name 'NativeAuthenticator' from 'nativeauthenticator'
The module 'nativeauthenticator' exists but the class name is incorrect or the version is too old.
fix
Ensure you have version >=1.0.0. Check installed version: 'pip show jupyterhub-nativeauthenticator'. Use 'nativeauthenticator.NativeAuthenticator' in config.
ValueError: The 'whitelist' config option is deprecated, use 'allowed_users' instead.
Config file still uses the old option name 'whitelist'.
fix
Change 'c.NativeAuthenticator.whitelist' to 'c.NativeAuthenticator.allowed_users'.
Upgrade
Version history
1.3.0latest on PyPI · released Sep 17, 2024
Audit
Dependencies
jupyterhubrequiredRequired as the JupyterHub server.
bcryptrequiredUsed for password hashing. Often missing leading to import errors.
escapismrequiredUsed for safe username escaping.
Agent activity
4 hits · last 30 days
node
4
Resources
jupyterhub-nativeauthenticator — pip install jupyterhub-nativeauthenticator · libregistry