Kotauth

Multi-tenant OAuth2 and OIDC identity server in Kotlin, self-hosted in Docker

Image 1 of 2: Kotauth site above the admin console's user directory for a workspace

A Ktor and Postgres identity server: authorization code with PKCE, client credentials, refresh rotation, workspaces with their own users and RS256 keys, RBAC, TOTP, passkeys, social login, OIDC brokering, SCIM 2.0, HMAC-signed webhooks and a hash-chained audit log.

Trade-offs

  • Client secrets are 32 random bytes stored only as a bcrypt hash and shown once. A full database dump reveals no usable secret, but a lost one has to be regenerated.
  • Rate limits default to an in-memory sliding window: zero setup on one instance, but each replica multiplies the limits. A Redis sidecar shares them, as a one-line config change.
  • The SCIM parser is strict and rejects coerced values. Vendor quirks are normalised by a dialect set on the API key, never sniffed from the request, so a deprovision can't silently do nothing.

Q&A4

A sign-in method beside the password, in its own service and table. A passkey with user verification counts as MFA, so it skips the TOTP challenge; legacy U2F keys without a PIN or biometric don't, and need TOTP when MFA is required.

Reviews

Loading reviews

    More in Auth

    See all 9 →
    • OVLTSelf-hosted OIDC server in one Rust binary, multi-tenant through Postgres RLS
    • Desktop-2FAOffline TOTP manager for the terminal with an encrypted local vault
    • ZeroLinkAccount-free secret sharing where the receiver locks the link first
    • ProtocolSoupIdentity protocol sandbox with live flows against a real mock IdP
    • vAuthTPM-backed FIDO2 authenticator for Linux, seen by browsers as a security key
    • Caomei AuthUnified sign-in and OAuth2 provider on Nuxt 3 and Better Auth

    More in Security

    See all 45 →
    • ZeroboxDeny-by-default process sandbox with per-host secret injection
    • PandaWardLocal application security assessment that reports what it couldn't decide
    • SnitchPer-app network monitor and outbound firewall for the desktop
    • ConduitSSH, Mosh and SFTP client for phones with no account and no cloud sync
    • AEGISPre-execution firewall that checks every agent tool call before it runs
    • ClawMoatZero-dependency security layer for AI agents and laptop-hosted agent hosts

    More in Self-hosted

    See all 120 →
    • SupermetryCookie-free web and product analytics on one Go binary and PostgreSQL
    • jobdGPU-aware job broker for a few personal machines, with an MCP server
    • FusionalySelf-hosted web analytics in one SQLite file
    • TouchDeckA local touch control deck for Home Assistant and PC stats on an ESP32-S3
    • DeftSelf-hosted workspace shared by people and AI agents
    • open-computeSelf-hosted Cloudflare Workers-compatible platform in one Rust binary