Skip to content

feat: Authentik SSO Stack - Unified Identity Authentication (Bounty #9)#455

Open
zhaog100 wants to merge 1 commit intoillbnm:masterfrom
zhaog100:fix/issue-9
Open

feat: Authentik SSO Stack - Unified Identity Authentication (Bounty #9)#455
zhaog100 wants to merge 1 commit intoillbnm:masterfrom
zhaog100:fix/issue-9

Conversation

@zhaog100
Copy link
Copy Markdown

@zhaog100 zhaog100 commented Apr 9, 2026

Summary

Implements Bounty #9 - SSO Stack ($300): Complete Authentik-based unified identity authentication for all homelab services.

What Was Done

1. SSO Core Infrastructure ✅

  • Authentik Server + Worker + PostgreSQL 16 + Redis 7
  • Traefik ForwardAuth middleware (config/traefik/dynamic/authentik.yml)

2. OIDC Integration for 6 Services ✅

Service Method
Grafana Native OIDC (role mapping)
Outline Native OIDC
Open WebUI Native OIDC + ForwardAuth
Gitea ForwardAuth
Nextcloud ForwardAuth
Portainer ForwardAuth
Prometheus ForwardAuth

3. Setup Script ✅

scripts/setup-authentik.sh auto-creates 6 OIDC providers + 3 user groups

4. User Groups ✅

homelab-admins, homelab-users, media-users

5. Verification ✅

scripts/verify-sso-setup.sh — 27/27 checks pass

Files Changed (9 files, +237 -156)

  • scripts/setup-authentik.sh — Rewritten with 6 providers + 3 groups
  • scripts/verify-sso-setup.sh — NEW verification script
  • stacks/ai/docker-compose.yml — Open WebUI OIDC + ForwardAuth
  • stacks/base/docker-compose.yml — Portainer ForwardAuth
  • stacks/productivity/docker-compose.yml — Gitea ForwardAuth
  • stacks/storage/docker-compose.yml — Nextcloud ForwardAuth
  • stacks/sso/.env.example — Added all OAuth vars
  • stacks/sso/README.md — Complete docs
  • .env.example — Added missing vars

Test: 27 PASS / 0 FAIL

All docker-compose files validate. All integration checks pass.

Closes #9

Implements bounty illbnm#9 - SSO Stack ($300)

## Changes

### SSO Core
- Authentik Server + Worker + PostgreSQL + Redis (already existed)
- ForwardAuth middleware via Traefik dynamic config (already existed)
- Setup script enhanced with user groups and all 6 service providers

### OIDC Integration (6 services)
- Grafana: native OIDC with role mapping (already configured)
- Outline: native OIDC via env vars (already configured)
- Open WebUI: native OIDC env vars + ForwardAuth middleware (NEW)
- Gitea: ForwardAuth middleware (NEW)
- Nextcloud: ForwardAuth middleware (NEW)
- Portainer: ForwardAuth middleware (NEW)
- Prometheus: ForwardAuth middleware (already configured)

### User Groups
- homelab-admins: full access to all services
- homelab-users: standard access to productivity/storage/AI
- media-users: access to media streaming services

### Scripts
- Enhanced setup-authentik.sh: creates 6 OIDC providers + 3 user groups
- New verify-sso-setup.sh: 27 automated checks for SSO configuration

### Environment Variables
- Added AUTHENTIK_BOOTSTRAP_TOKEN to .env.example files
- Added NEXTCLOUD_OAUTH_CLIENT_* placeholders
- Added PORTAINER_OAUTH_CLIENT_* placeholders
- Added OPENWEBUI_OAUTH_CLIENT_* placeholders

### Testing
- All 27 verification checks pass
- All 6 docker-compose files validate successfully
- ForwardAuth middleware confirmed on all protected services
@zhaog100 zhaog100 changed the title feat(sso): Complete Authentik SSO implementation with full OIDC coverage feat: Authentik SSO Stack - Unified Identity Authentication (Bounty #9) Apr 9, 2026
@zhuzhushiwojia
Copy link
Copy Markdown

Closing - no response from maintainers

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.

[BOUNTY $300] SSO — Authentik 统一身份认证

2 participants