Skip to content

Authentik SSO & Shared Identity Architecture

P3MDI Authentik (auth.p3mdi.id) serves as the central OAuth2/OIDC Identity Provider for the ecosystem. Soedirman Hub bridges Authentik with Supabase via a dedicated stateless Deno SSO & Core Broker (ops/p3mdi-sso/), while Sudirman Voice and SDR currently maintain independent authentication boundaries suited to their threat models.

Shared Identity & Authentik SSO ArchitectureDrag to pan, scroll to zoom, or click to open full browser view

How Authentik SSO Connects to Soedirman Hub

Section titled “How Authentik SSO Connects to Soedirman Hub”
  1. Authentik IdP (auth.p3mdi.id) & p3mdi_hub (ops/authentik/p3mdi_hub):
    • Exposes confidential OAuth2/OIDC issuer https://auth.p3mdi.id/application/o/soedirman-hub/ with RS256 signing and strict redirect URI (https://app.p3mdi.id/login).
    • Custom Django app p3mdi_hub maintains scoped object-level Guardian permissions (Soedirman Hub Serdik Activation) exclusively over non-superuser internal members of Soedirman Hub Serdik—preventing global admin escalation by the broker token.
  2. Deno SSO & Core Broker (ops/p3mdi-sso/, port 8000):
    • Mounted under https://app.p3mdi.id/api/sso/* behind Traefik (maxRequestBodyBytes: "8192").
    • Exposes 11 endpoints covering OIDC PKCE id_token exchange, first-login onboarding (/api/sso/setup), self-service profile & session revocation (/api/sso/profile, /api/sso/security, /api/sso/sessions), super-admin account provisioning (/api/sso/accounts/*), and Core Directory synchronization (/api/sso/core).
  3. Supabase Private Identity Store (portal_private):
    • portal_private.p3mdi_identities binds verified (issuer, subject) pairs to serdik / pengasuh codes; portal_private.sso_audit records immutable identity mutations without storing credentials.
  • Sudirman Voice (voice.p3mdi.id): Uses No. Serdik + Argon2id PIN (sv_session SHA-256 httpOnly cookie) paired with Google OIDC + PKCE (@p3md.sbm-itb.ac.id) and 6-digit email verification codes for self-service activation and PIN recovery.
  • Soedirman Digital Repository (repo.p3mdi.id): Public read-only catalog with Admin-only Auth.js v5 Credentials + Argon2id (sessionVersion revocation) and database-backed brute-force locking (auth_rate_limits).
  • Dirman Assist (assist.p3mdi.id): Uses WhatsApp phone/@lid identity + consent records for helpdesk users, scrypt cookie sessions with CSRF tokens for dashboard admins, and scoped bearer credentials for the loopback App Hub API (127.0.0.1:18081).