Skip to content

Conversation

@juchong
Copy link

@juchong juchong commented Dec 29, 2025

⚠️⚠️⚠️ Since we do not accept all types of pull requests and do not want to waste your time. Please be sure that you have read pull request rules:
https://github.com/louislam/dockge/blob/master/CONTRIBUTING.md

Tick the checkbox if you understand [x]:

  • I have read and understand the pull request rules.

Description

Add header-based authentication for integration with identity providers like Authentik, Authelia, OAuth2 Proxy, and Traefik Forward Auth.

Features:

  • Extract authenticated username from configurable HTTP header
  • Auto-create users on first login (optional)
  • Redirect to external logout URL on sign out
  • Skip setup page when first user is created via proxy auth
  • Show proxy auth status in Security settings UI

Configuration:

  • DOCKGE_AUTH_PROXY_HEADER: Header name (e.g., Remote-User)
  • DOCKGE_AUTH_PROXY_AUTO_CREATE: Auto-create users (true/false)
  • DOCKGE_AUTH_PROXY_LOGOUT_URL: External logout redirect URL

Files:

  • backend/proxy-auth.ts: New proxy authentication handler
  • backend/dockge-server.ts: Integrate proxy auth on socket connection
  • backend/util-server.ts: Add config interfaces
  • frontend/src/mixins/socket.ts: Handle proxy auth state
  • frontend/src/components/Login.vue: Show proxy auth errors
  • frontend/src/components/settings/Security.vue: Proxy auth UI
  • frontend/src/lang/en.json: Translation strings
  • README.md: Updated documentation with examples
  • compose.yaml: Example updated with new environment variables

Discussion(s):

Type of change

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

Checklist

  • My code follows the style guidelines of this project
  • I ran ESLint and other linters for modified files
  • I have performed a self-review of my own code and tested it
  • I have commented my code, particularly in hard-to-understand areas
    (including JSDoc for methods)
  • My changes generate no new warnings
  • My code needed automated testing. I have added them (this is optional task)

Screenshots (if any)

Add header-based authentication for integration with identity providers
like Authentik, Authelia, OAuth2 Proxy, and Traefik Forward Auth.

Features:
- Extract authenticated username from configurable HTTP header
- Auto-create users on first login (optional)
- Redirect to external logout URL on sign out
- Skip setup page when first user is created via proxy auth
- Show proxy auth status in Security settings UI

Configuration:
- DOCKGE_AUTH_PROXY_HEADER: Header name (e.g., Remote-User)
- DOCKGE_AUTH_PROXY_AUTO_CREATE: Auto-create users (true/false)
- DOCKGE_AUTH_PROXY_LOGOUT_URL: External logout redirect URL

Files:
- backend/proxy-auth.ts: New proxy authentication handler
- backend/dockge-server.ts: Integrate proxy auth on socket connection
- backend/util-server.ts: Add config interfaces
- frontend/src/mixins/socket.ts: Handle proxy auth state
- frontend/src/components/Login.vue: Show proxy auth errors
- frontend/src/components/settings/Security.vue: Proxy auth UI
- frontend/src/lang/en.json: Translation strings
- README.md: Full documentation with examples
- compose.yaml: Example environment variables
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.

1 participant