Skip to main content

JupyterHub Enverge Native Authenticator

Project description

Enverge Native Authenticator

Sponsored by Enverge.ai - Simpler, greener, cheaper AI training platform. Enverge harnesses excess green energy for powerful, cost-effective computing on GPUs, enabling environmentally friendly AI model development, training, and fine-tuning. Currently in private alpha with limited spots available.

A JupyterHub authenticator that extends the native authenticator with email notifications for user authorization.

Overview & Features

This package extends jupyterhub-nativeauthenticator with the following enhancements:

  • User Registration & Admin Approval: Allows users to sign up while requiring admin approval of new accounts
  • Authorization Emails: Sends notification emails to users when their accounts are approved
  • Email Delivery Management:
    • Integration with SendGrid for reliable email delivery
    • Tracking of email delivery status to prevent duplicate notifications
  • Modern UI: Customized and improved templates for authentication screens

Installation

pip install jupyterhub-enverge-nativeauthenticator

Or for development:

git clone https://github.com/Enverge-Labs/enverge_nativeauthenticator
cd enverge_nativeauthenticator
pip install -e .

Configuration

Add the following to your jupyterhub_config.py:

c.JupyterHub.authenticator_class = 'enverge_native'

# Email configuration
c.EnvergeNativeAuthenticator.sendgrid_api_key = 'your-sendgrid-api-key'  
c.EnvergeNativeAuthenticator.email_sender = 'your-sender-email@example.com'
c.EnvergeNativeAuthenticator.sendgrid_template_id_authorization_email = 'your-sendgrid-template-id'

# Optional: All inherited NativeAuthenticator settings are supported

Environment Variables

You can also set these configuration options via environment variables:

  • SENDGRID_API_KEY: Your SendGrid API key
  • EMAIL_SENDER: Email address to be shown as the sender

SendGrid Templates

This authenticator uses SendGrid dynamic templates for email notifications. The templates should include:

  • A name variable for the username

You can create and manage your email templates in the SendGrid Dynamic Templates interface.

Design Decisions

  • Extending Native Authenticator: Built on top of the established JupyterHub Native Authenticator to maintain compatibility and leverage its security features.
  • Optional Email Integration: Email functionality requires SendGrid but remains optional, falling back gracefully if not configured.
  • Database Tracking: Uses SQLAlchemy ORM to track which users have received authorization emails, avoiding duplicate notifications.
  • Pluggable Authentication: Follows JupyterHub's authentication plugin system for seamless integration.

Development

Setup a development environment:

# Clone the repository
git clone https://github.com/Enverge-Labs/enverge_nativeauthenticator
cd enverge_nativeauthenticator

# Install in development mode
pip install -e .

# Install development dependencies
pip install -e ".[test]"

License

3-Clause BSD License, same as JupyterHub.

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

jupyterhub_enverge_nativeauthenticator-0.0.6.tar.gz (14.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file jupyterhub_enverge_nativeauthenticator-0.0.6.tar.gz.

File metadata

File hashes

Hashes for jupyterhub_enverge_nativeauthenticator-0.0.6.tar.gz
Algorithm Hash digest
SHA256 5e2f9b035af9c3126ecf3998fc5f51baa1962fa02beffcc008e05f3202084799
MD5 036dd87919080f135005b3536836ed25
BLAKE2b-256 385af8f3f2ed13e84b6caf7d8595534b8f84ee540c23d24c793e405db5302d20

See more details on using hashes here.

File details

Details for the file jupyterhub_enverge_nativeauthenticator-0.0.6-py3-none-any.whl.

File metadata

File hashes

Hashes for jupyterhub_enverge_nativeauthenticator-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 2ea61ea6693fc781ba134b93a158d3682058a2e6f76a55f96ba72de4d858b6bc
MD5 f6dd42891ca1ea1a484af81fb0150b53
BLAKE2b-256 d44b7dff451be27531cec5d3bc2d74993d95bc7113e040e7b941dfcfa6d3cd5f

See more details on using hashes here.

Supported by

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