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.5.tar.gz (14.7 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.5.tar.gz.

File metadata

File hashes

Hashes for jupyterhub_enverge_nativeauthenticator-0.0.5.tar.gz
Algorithm Hash digest
SHA256 ef5c6ffb10118a66939a60f8d47487714ef79bc6b1661abc3ab082f58e8b93e3
MD5 0ec4f3d886d0dd5388805a98a404118c
BLAKE2b-256 1cf183b18f6c8d5de91f7e628397365aee61f0aaa42d16a0a7329b8906222bc0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for jupyterhub_enverge_nativeauthenticator-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 584f24c070f34768a604b72a0d3e8def81d38b555b05e0f127f1ad0c96349df0
MD5 3f9e3eedc63de447d326e050de3aa8c9
BLAKE2b-256 750d50f7d9c041916a1407f7860ce0d28d33e4927f9f0ae7e068da10e9047ba3

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