Sign inSign up

xreyc/maintainerd-auth

By xreyc

โ€ขUpdated about 1 month ago

Self-hostable OAuth2/OIDC provider & identity broker in one container (backend + console + login UI)

Image
Security
Integration & delivery
0

879

xreyc/maintainerd-auth repository overview

โ maintainerd-auth

Open-source, self-hostable OAuth 2.0 / OpenID Connect provider + identity broker โ€” in a single container.

One image bundles the Go backend, the admin console, and the hosted login UI (compiled in via go:embed, no nginx, no sidecars). Bring a PostgreSQL and a Redis, and you have a full identity & access platform: authentication, MFA, social/enterprise/SAML federation, multi-tenancy, and fine-grained authorization.


โ Supported tags

TagMeaning
latestCurrent build โ€” used by the quick start
0.1.0The pre-release version (moving during testing; pin latest for the newest)

Architectures: linux/amd64, linux/arm64. Each image carries SLSA provenance + an SBOM attestation.


โ What's inside

A single process serves four surfaces, each on its own port:

PortSurfaceExpose publicly?
3000Admin consoleโœ… operators
3001Hosted login / identity UIโœ… end users
8081Data plane โ€” OAuth2/OIDC issuer + public APIโœ… where your issuer must resolve
8080Control plane โ€” management APIโŒ keep internal
8082Health checks + Prometheus /metricsโŒ keep internal

You provide PostgreSQL and Redis; they are not in this image.


โ Quick start

Run locally behind nginx with clean HTTPS hostnames (no ports), using this image + PostgreSQL + Redis. Full walkthrough: the repo READMEโ .

Download these into one folder โ€” docker-compose.ymlโ , .env.exampleโ , nginx.confโ , setup.shโ  โ€” then:

cp .env.example .env
chmod +x setup.sh && ./setup.sh          # generates your keys + a local TLS cert

sudo tee -a /etc/hosts >/dev/null <<'EOF'
127.0.0.1 console.auth.maintainerd.local identity.auth.maintainerd.local console-api.auth.maintainerd.local identity-api.auth.maintainerd.local
EOF

docker compose up -d

First run ๐Ÿ‘‰ open https://console.auth.maintainerd.local/setup/tenantโ  and create your first tenant and admin (accept the one-time self-signed-cert warning).


โ Environment variables

โ Required โ€” the app won't start without these
VariableDescription
APP_PUBLIC_HOSTNAMEPublic base URL โ€” this is your OIDC issuer (iss) and must match discovery.
APP_PRIVATE_HOSTNAMEControl-plane (management) base URL.
APP_FRONTEND_CONSOLE_HOSTNAMEAdmin console URL.
APP_FRONTEND_IDENTITY_HOSTNAMEHosted login URL.
DB_HOST / DB_PORT / DB_USER / DB_PASSWORD / DB_NAMEPostgreSQL connection.
JWT_PRIVATE_KEY / JWT_PUBLIC_KEYRS256 signing keypair (PEM).
APP_ENCRYPTION_KEYAES-256 key for encryption-at-rest โ€” exactly 32 bytes (a base64:-prefixed value is decoded first).
HMAC_SECRET_KEYHMAC key for signed URLs (accepts base64:).
โ Common options
VariableDefaultDescription
APP_ENVdevelopmentSet production for stricter runtime checks.
REDIS_ADDRredis-db:6379Redis host:port (Redis is required infrastructure).
REDIS_PASSWORD / REDIS_TLSโ€” / falseRedis auth / TLS.
DB_SSLMODEdisableSet require in production (disable is rejected when APP_ENV=production).
COOKIE_SECUREtrueSet false only for local HTTP.
COOKIE_SAMESITElaxKeep lax โ€” needed for federated SSO redirects.
CORS_ALLOWED_ORIGINSโ€”Extra allowed origins (comma-separated).
LOG_LEVELinfodebug / info / warn / error.
MANAGEMENT_PORT8082Health + /metrics port.

Secrets (JWT_*, APP_ENCRYPTION_KEY, HMAC_SECRET_KEY, DB_PASSWORD) accept a base64: prefix and can be sourced from AWS Secrets Manager / SSM, HashiCorp Vault, Azure Key Vault, GCP Secret Manager, or mounted files instead of env โ€” set SECRET_PROVIDER.

๐Ÿ‘‰ The complete list โ€” every variable, default, and production note โ€” is in the Environment Variables referenceโ .


โ Production notes

  • Terminate TLS in front of the container; set real HTTPS hostnames, COOKIE_SECURE=true, and DB_SSLMODE=require.
  • Keep 8080 (control plane) and 8082 (metrics) on an internal network.
  • Use a managed secret provider rather than plaintext env in production.
  • Health endpoints: GET /readyz and /livez on 8081/8080/8082.

Built by Reyco Seguma (@xreyc)โ  and the Maintainerd community ยท Apache-2.0

Tag summary

Content type

Image

Digest

sha256:210f1d421โ€ฆ

Size

25.7 MB

Last updated

about 1 month ago

docker pull xreyc/maintainerd-auth