Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add header-based authentication support #5270

Closed

Conversation

banddude
Copy link

@banddude banddude commented Jan 6, 2025

Description\nThis PR adds support for header-based authentication, allowing integration with proxy authentication providers like Authelia or Authentik. This provides a lightweight alternative to implementing full LDAP, SAML, or OIDC support.\n\n### Features\n- Header-based authentication via configurable HTTP headers\n- Optional automatic user creation for new users\n- Configurable header names for username and email\n- Easy integration with existing proxy authentication systems\n\n### Configuration\nNew environment variables added:\n- AUTH_HEADER_ENABLED: Enable/disable header authentication\n- AUTH_HEADER_USERNAME: Header containing username (default: X-Auth-Username)\n- AUTH_HEADER_EMAIL: Header containing email (default: X-Auth-Email)\n- AUTH_HEADER_AUTO_CREATE: Enable/disable automatic user creation\n\nCloses #4026

MinerPL and others added 15 commits July 5, 2024 13:22
Signed-off-by: Matthew Penner <[email protected]>
Signed-off-by: Matthew Penner <[email protected]>
Signed-off-by: Matthew Penner <[email protected]>
Signed-off-by: Matthew Penner <[email protected]>
Signed-off-by: Matthew Penner <[email protected]>
Signed-off-by: Matthew Penner <[email protected]>
This commit adds support for header-based authentication, allowing users to authenticate via HTTP headers. This is particularly useful for proxy authentication via SSO providers like Authelia or Authentik.

Features:\n- New HeaderAuthentication middleware\n- Configurable header names for username and email\n- Optional automatic user creation\n- Comprehensive test suite\n- SQLite and MySQL compatibility

The feature can be enabled via environment variables:\nAUTH_HEADER_ENABLED=true\nAUTH_HEADER_AUTO_CREATE=true\nAUTH_HEADER_USERNAME=X-Auth-Username\nAUTH_HEADER_EMAIL=X-Auth-Email
@danny6167
Copy link
Member

Closing, resubmitted as #5271

@danny6167 danny6167 closed this Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants