3SO — Shadow Single Sign-On

3SO (shadow-sso) is a Go-native OAuth 2.0 and OpenID Connect implementation, distributed both as a standalone server (ssso) with a companion CLI (ssoctl) and as a library you embed directly in your own Go services. It ships with multi-factor authentication, enterprise directory federation, and a high-performance distributed token store — the pieces most OAuth libraries leave for you to bolt on separately.

Open Source · MIT Licensed

Key Features

Standards-Compliant Core

Full OAuth 2.0 (RFC 6749), OpenID Connect, PKCE (RFC 7636), Token Introspection (RFC 7662), and Token Revocation (RFC 7009) — with configurable JWT access and refresh tokens.

Six MFA Factors Built In

TOTP, HOTP, email OTP, SMS OTP (Twilio), and Firebase push notifications, backed by single-use recovery codes — no third-party MFA add-on required.

Full User Lifecycle

Self-service registration with email verification, password reset, account activation and locking, and profile/phone management out of the box.

Enterprise Federation

LDAP / Active Directory integration with attribute mapping, plus federation with external identity providers over OIDC and SAML.

Service Accounts & JWKS

Machine identities with downloadable JSON keys for server-to-server auth, plus OAuth client JWKS for public-key client authentication.

Distributed Token Store

An optional BBoltDB-backed gRPC microservice (DTS) handles ephemeral OAuth tokens with sub-millisecond operations, keeping short-lived artifacts off the primary MongoDB store.

Distributed Token Store (DTS)

OAuth artifacts like authorization codes and access tokens are short-lived and high-churn — a poor fit for a general-purpose document database under heavy load. 3SO can offload them to ssso-dts, a dedicated gRPC microservice backed by BBoltDB, while MongoDB continues to hold persistent data: user profiles, OAuth clients, and service accounts.

Hybrid storage model

The result is a hybrid storage model — sub-millisecond key-value operations for ephemeral tokens, horizontal scaling of the DTS tier independent of MongoDB, and automatic expiration cleanup — deployable via Docker Compose or the included Helm chart.

3SO vs. Keycloak

Capability3SOKeycloak
OAuth 2.0 core endpointsYesYes
PKCE supportYesYes
Built-in MFA (TOTP/HOTP/SMS/push)YesVia extensions
Deployment footprintSingle Go binary + MongoDBJVM + admin console
Distributed token storeBBoltDB gRPC service (DTS)Infinispan cache
Device Authorization Grant endpointGrant supported; dedicated endpoint in developmentYes
CIBA / Pushed Authorization RequestsNoYes
Named FAPI 1/2 security profilesNoYes
LicenseMIT (open source)Apache 2.0 (open source)

OAuth 2.0 Flows

OAuth 2.0 supports several different flows or methods for obtaining an access token. These flows are designed to cater to different use cases and security requirements.