Roadmap

What's shipped, what's in flight.

OneAuth Roadmap

Vision

OneAuth is an embeddable Go authentication library — not an identity server. It handles local auth, API auth (JWT/refresh/API keys), and federated resource auth (app registration, scoped token minting, multi-tenant validation via KeyStore/JWKS).

What we are not building: A full OIDC Identity Provider (that’s Keycloak’s job). Instead, we interoperate with real IdPs and focus on making resource servers and apps easy to secure in Go.


Standards & Interop Track

This track moves OneAuth from custom-protocol federated auth toward standards-compliant interoperability with the broader OAuth2/OIDC ecosystem. The guiding principle: prove interop with real-world tools (Keycloak) instead of reimplementing them.

Phase 1: Resource Server Standards (Short-term)

These are low-effort, high-value additions that make OneAuth resource servers self-describing and interoperable.

Protected Resource Metadata — RFC 9728 (#46) ✅ COMPLETE

ProtectedResourceMetadata struct + NewProtectedResourceHandler() in apiauth/. Serves JSON at GET /.well-known/oauth-protected-resource with Cache-Control headers. 7 unit tests + 3 e2e tests. Wired into demo resource server and e2e test environment.

Token Introspection — RFC 7662 (#47) ✅ COMPLETE

IntrospectionHandler in apiauth/introspection.go. Resource servers POST tokens to POST /oauth/introspect (authenticated via client_credentials). Returns RFC 7662 response with active, sub, scope, exp, iss, jti. Checks TokenBlacklist. Cache-Control: no-store. 9 unit + 3 e2e tests. Wired into reference server and e2e auth server.

Phase 2: Client Registration Standards (Medium-term)

DCR Conformance Wrapper — RFC 7591 (#48) ✅ COMPLETE

DCRHandler in admin/dcr.go, served at POST /apps/dcr via AppRegistrar.Handler(). Maps JWK→PEM, client_uri→client_domain, token_endpoint_auth_method→signing_alg. Returns RFC 7591 response format. Supports both X-Admin-Key and Bearer auth. 6 unit + 2 e2e tests. Custom /apps/* endpoints continue working unchanged.

Phase 3: Keycloak Interop Test Suite (#49) ✅ COMPLETE

10 interop tests in tests/keycloak/ proving APIMiddleware + JWKSKeyStore validate Keycloak-issued tokens. Pre-baked realm JSON, make upkcl/testkcl/downkcl, manual-trigger CI workflow. Separate Go module (tests/keycloak/go.mod).

Architecture:

tests/keycloak/
├── realm.json          # Pre-baked Keycloak realm config (imported on startup)
├── keycloak_test.go    # Go tests using testcontainers or Docker
└── README.md

Realm config (checked in as JSON):

  • Realm with RS256 signing
  • Confidential client (for client_credentials flow)
  • Public client (for PKCE testing)
  • Test user with known credentials

Test categories:

  1. Interop tests (OneAuth as resource server validating Keycloak tokens):

    • JWKSKeyStore fetches Keycloak’s JWKS via /.well-known/openid-configuration
    • APIMiddleware validates Keycloak-issued JWT
    • Scopes, audience, expiry, kid lookup all work
    • Algorithm confusion: Keycloak RS256 token rejected when validated as HS256
  2. Standards conformance tests:

    • Keycloak JWKS response parses through JWKToPublicKey
    • Keycloak kid values resolve via GetKeyByKid
    • Token introspection (when built) matches Keycloak’s response format
  3. What we skip:

    • Keycloak’s login flows through LocalAuth (different layers)
    • Keycloak admin API testing (their problem)

Infrastructure:

  • make testkcl — starts Keycloak container, runs interop tests
  • Keycloak image: quay.io/keycloak/keycloak with start-dev + realm import (~10-15s startup)
  • Separate from make e2e (which stays fast at ~2s)
  • Optional in CI (like testpg / testds)

Adoption story: “OneAuth middleware validates Keycloak-issued tokens correctly” — one-line pitch.

Phase 4: OIDC Discovery Metadata (Long-term, Optional)

OIDC Discovery — RFC 8414 (#50) ✅ COMPLETE

ASServerMetadata + NewASMetadataHandler in apiauth/as_metadata.go. Serves GET /.well-known/openid-configuration with token, JWKS, introspection, registration endpoints. Metadata-only — does NOT make us a full OIDC server. 6 unit + 3 e2e tests (incl. DiscoverAS round-trip) + Keycloak field compatibility test. Wired into reference server and e2e auth server.


OAuth Client Capabilities (#51–#55)

These issues complete the OAuth client story — making OneAuth useful not just for building auth servers, but for building OAuth-aware clients and resource servers that interoperate with any AS.

Prerequisites

Fix aud array validation — #52 (P0, Bug) ✅ COMPLETE

matchesAudience() helper handles both string and []interface{} aud formats at all 3 validation sites. 8 new tests covering array accepted/rejected for ValidateAccessToken, ValidateAccessTokenFull, and APIMiddleware.

Client-Side OAuth

client_credentials grant — #53 (P1) ✅ COMPLETE

Server: handleClientCredentialsGrant in APIAuth with ClientKeyStore field. Client: ClientCredentialsToken() on AuthClient. Supports client_secret_post and client_secret_basic. 8 unit + 2 e2e tests.

Headless OAuth + PKCE for CLI — #54 (P1) ✅ COMPLETE

LoginWithBrowser() on AuthClient. Loopback redirect server, PKCE, state validation, auto-discovery via DiscoverAS (#51). 6 unit tests + Keycloak interop test. Supersedes old Phase 3.

Issue 387 (PR 388, pushed down from mcpkit) added a caller-owned Listener, an exact RedirectURI override and the exported LoopbackRedirectURI, so a client that registers via DCR first can match an AS that compares redirect_uri byte-for-byte. FollowRedirects fails fast on an AS error, and ApproveConsent handles demo consent pages. Issue 389 (same PR) made oneauth’s own /authorize ignore the port on loopback http redirects, per RFC 8252 §7.3.

oneauth token-acquisition CLI — issue 255 (P1) ✅ COMPLETE

Cobra-based binary at cmd/oneauth/. oneauth token {browser,client-credentials,password,refresh} <issuer> --client-id ID … wraps the SDK’s four grant entry points. Library-side addition: AuthClient.RefreshToken (RFC 6749 §6 form-encoded against any AS, distinct from the legacy refreshTokenLocked path). Output formats: json / bash (sourceable export OAUTH_*=…) / access-token-only (bare token for $(oneauth token …) shell capture). 17 unit tests + 4 Keycloak integration tests.

AS Metadata Discovery client — #51 (P1) ✅ COMPLETE

DiscoverAS() in client/discovery.go. Fallback chain: RFC 8414 → OIDC Discovery. Path-based issuer support. 8 unit tests + Keycloak interop test.

Token Introspection client — #55 (P2) ✅ COMPLETE

IntrospectionValidator in apiauth/introspection_client.go. Integrates into APIMiddleware.Introspection as fallback when local JWT validation fails. Response caching with configurable TTL. 7 unit + 1 e2e + 2 Keycloak interop tests.

Bug Fixes

Fix auth method negotiation with explicit endpoints — #74 (P1, Bug) ✅ COMPLETE

BrowserLoginConfig.TokenEndpointAuthMethods field. When explicit endpoints are provided (discovery skipped), callers can pass token_endpoint_auth_methods_supported from their own discovery so SelectAuthMethod negotiates correctly instead of defaulting to client_secret_basic. Found by MCPKit conformance test. 3 unit + 2 e2e tests.


RFC 9207 — Issuer Identification in Authorization Response ✅ COMPLETE

Closes the mix-up-attack defence story end-to-end across three PRs. Each surfaced one half of the wire contract before the consumer-side enforcement helper landed — the metadata-as-promises-board pattern in action.

# Surface Status
235 Surface iss query parameter on the loopback callback (BrowserLoginRequest.OnCallback receives CallbackParams.Iss). Merged
239 Surface authorization_response_iss_parameter_supported on client.ASMetadata (pointer-typed *bool preserves the advertised-true / advertised-false / absent tristate; mirrors the existing server-side field on apiauth.ASServerMetadata). Adds client/as_metadata_interop_test.go pinning the server↔client wire contract. Merged
238 client.ValidateIss(iss, expectedIssuer, asAdvertisedSupport, strict) consolidates the §2.4 truth table. Two errors.Is-safe sentinels (ErrIssMismatch, ErrIssMissing). Shipped initially with RFC 3986 §6.2 normalization; corrected to byte-strict in #246. Merged
246 Drop URL normalization from client.ValidateIss — RFC 9207 §2.4 inherits RFC 9068 §2.1.1’s byte-equal JWT-claim comparison, not RFC 3986. Trailing-slash and scheme/host-case variants now reject. Matches the MCP auth/iss-normalized conformance scenario. Removes the dead normalizeIssuer helper. Merged

Shipped initial in v0.1.13; corrected byte-strict semantics in the patch after v0.1.21. Downstream mcpkit#380 can drop its in-tree ValidateIss copy.


RFC 9449 — DPoP Sender-Constrained Tokens ✅ COMPLETE

Closes #336 across four PRs: the authorization server binds tokens to a client key, the resource server makes that binding mean something, the code is bound at the front channel, and the SDK can finally hold a key of its own.

# Surface Status
370 AS half. DPoPProofValidator (typ, asymmetric alg allow-list, embedded jwk, signature, htm, htu, iat window, jti replay via the existing JTIStore). cnf.jkt on issued tokens, token_type: DPoP reported by the issuer rather than each grant, refresh-token binding persisted in FS / GORM / GAE and carried through rotation, dpop_signing_alg_values_supported on AS metadata. Merged
372 RS half. Authorization: DPoP extraction, ath checking, cnf.jkt match, and the §7.2 refusal of a bound token presented as Bearer. WWW-Authenticate advertises both schemes with the error on the scheme the client used. RequireDPoP + dpop_bound_access_tokens_required on protected-resource metadata, cnf on introspection, TokenInfo.Confirmation. Merged
378 dpop_jkt on the authorization request (§10, issue 374). The code carries the thumbprint and only that key redeems it, so an intercepted code cannot be traded for a token bound to the interceptor. Enforced with the plumbing 370 already built: the granter compares against req.Confirmation. Merged
379 Client SDK (issue 377). client.DPoPKey mints a proof per request; WithDPoPKey attaches proofs to token requests, presents tokens under the DPoP scheme with ath, and sends dpop_jkt on browser login. Before this the SDK could not obtain or spend a bound token. Merged

Design notes. The binding travels as core.Confirmation, a struct rather than a bare thumbprint string, so RFC 8705 mTLS adds x5t#S256 as a field instead of a second parameter on every issuance path. The shared TokenBindingValidator seam stays unbuilt until #335 shows the second shape — an interface with one implementation is a guess about the second.

Rollout order matters. A resource server with APIMiddleware.DPoP nil refuses a bound token with 401, since it can’t check the proof (issue 486). Wire DPoP at the resource servers first, then issue bound tokens; the reverse order gives a window where bound tokens fail there.

One trap the client work surfaced. A DPoP proof is single-use and its ath names one token, so any retry-after-refresh path has to mint a fresh proof rather than resend the one already sent. Against a single-node server with an in-memory jti store, reusing it looks fine, which is what makes it easy to ship.

| 384 | Nonce protocol (issue 375). NonceSource issues stateless HMAC nonces that carry their own issue time, so a fleet needs a shared secret rather than shared storage. Challenges at both ends: 400 with use_dpop_nonce at the token endpoint (§8), 401 with the DPoP scheme at a resource (§9). The client answers automatically and keys nonces per origin. | Merged |
| 385 | Keycloak interop (issue 371). Keycloak mints a bound token; APIMiddleware accepts it with a matching proof and refuses the Bearer downgrade, a foreign key, and a mismatched ath. The thumbprint assertion is the one that matters: it checks our RFC 7638 implementation against Keycloak’s rather than against itself. | Merged |

RFC 9449 is complete, bar a TokenBindingValidator seam deliberately left unbuilt until mTLS (#335) shows the second shape.

Two things the nonce work pinned down. Whether to demand a nonce is a policy function, not a flag: §8 puts that decision out of scope, always-on costs every client a round trip and breaks any that has not implemented the retry. And the nonce check runs before jti replay is recorded, or a client that has simply never been told a nonce burns its jti on the challenge and cannot retry.


RFC 9126 — Pushed Authorization Requests ✅ COMPLETE

Closes #337 (PR 381). A client POSTs the authorization request to /par and redirects with an opaque request_uri, so scope, redirect_uri and PKCE challenges stop travelling through the browser. RFC 9396 payloads too large for a URL get somewhere to live.

Single-use, defined precisely. §4 wants a request_uri used once and tolerates a repeat from a browser reload. OneAuth consumes the reference when a code is issued, not when it is read, because the built-in consent screen reads it twice (render, then approve).

A side effect worth knowing. Once a request arrives by reference the consent screen’s hidden inputs stop mattering: the handler reads the stored payload and ignores what was posted. Tampering becomes impossible rather than merely detected.

The store ships in-memory and GORM behind the shared partest contract suite. FS and GAE are tracked under #382. This also closed RFC 9449 §10.1, since a push may carry the DPoP key as dpop_jkt or as a proof header.

Unblocked #98: PAR was FAPI 2.0’s last outstanding prerequisite.


OIDF FAPI 2.0 Security Profile run (mission #98) ✅ COMPLETE

The OpenID Foundation’s fapi2-security-profile-final-test-plan runs against cmd/oneauth-server with deploy-examples/fapi-dpop.yaml’s profile (make exercise-fapi2), and make testoidf enforces the result: 41 of 46 modules pass, the four that expect /authorize to refuse end in REVIEW with oneauth’s error page checked against known-gaps.yaml, and the RS256 module is skipped because FAPI clients use ES256 (#330). Shipped in 0.2.3 to 0.2.5:

# Delivery Status
433 The exercise itself: harness plan, DCR clients, browser automation Merged
438 Reference server’s browser code flow works end to end (next on login, granters built from OneAuthConfig) Merged
439 PAR answers invalid_request for an unregistered redirect URI; client assertions allow 10s clock skew Merged
440 Reference server TLS follows BCP 195 Merged
443 Confidential clients’ refresh tokens unbound from DPoP keys; missing code_verifier is invalid_grant; per-module browser scripts Merged
447 Plan judged against known-gaps.yaml inside make testoidf Merged
441 fapi2 signs ES256; ephemeral keys follow signing_alg Merged

Still open: the OIDF workflow in CI is manual-only, and PS256 (#330) would let the RS256 module run.

OIDF OpenID Connect Basic OP run (mission #477) ✅ COMPLETE

The OpenID Foundation’s oidcc-basic-certification-test-plan runs against cmd/oneauth-server with tests/oidf-conformance/oneauth-oidcc.yaml (make exercise-oidcc), and make testoidf enforces it beside FAPI 2.0. The harness runs 35 of the plan’s 38 modules for the static-client variant: 28 pass and none fail. Four end in REVIEW (the second login page for prompt=login / max_age, and oneauth’s error pages), the typ: ID claim and the missing acr are recorded warnings, and the request-object module reports oneauth’s refusal as SKIPPED.

# Delivery Status
482 The exercise, a shared oidfplan runner, and an opt-in PKCE policy for confidential clients Merged
483 /authorize takes POSTed requests and refuses request objects Merged
484 prompt, max_age, and remembered consent (core.ConsentStore) Merged
487 The claims parameter, the userinfo token in a form body, profile claims from signup Merged
488 Scope claims leave the ID token, updated_at, no bound tokens without DPoP Merged

Next, from the mission’s “not in this mission” list: the OIDF Config, Dynamic, Form Post and logout plans. Still open: JAR (#338). Issue 485 added signed userinfo, acr / amr, and ID tokens on the refresh grant.


OIDC Dynamic OP features (issue 507) ✅ COMPLETE

The OIDF Dynamic OP plan (mission #489) found what a Dynamic OP needs that oneauth lacked. Four PRs closed it, and the plan went from 5 passed and 6 failed to 11 passed and 3 failed. Both implicit response types now run as plans of their own.

# Delivery Status
509 jwks_uri for private_key_jwt clients (SSRF-guarded, refetch on an unknown kid), and the client’s logo, policy and terms on the consent page Merged
513 Pairwise subject identifiers: subject_type, sector_identifier_uri, and a pairwise sub in ID tokens, userinfo and logout tokens Merged
514 Rotating the AS signing key at runtime (RotatingSigningKey, POST /admin/signing-key/rotate), and retired keys in the JWKS for their grace period (issue 421) Merged
515 The OIDC implicit flow, opt-in on both the server and the client, off by default Merged

PR #520 then put every OIDF plan in nightly CI and ran OAuch once by hand (docs/conformance/oauch.md). That run found two headers that stopped real browsers finishing an authorization (CSP form-action, and COOP on the authorization pages). Its three remaining gaps are #519. Still open: JAR (issue 338) and mTLS (issue 335).

JARM — signed authorization responses (mission #409) ✅ COMPLETE

A FAPI client logs in with response_mode=jwt against oneauth and against Keycloak, and a tampered response is refused. make exercise-jarm checks all of it, and runs as the gating jarm suite in make conformance. See JARM.

# Delivery Status
548 make exercise-jarm, and oneauth token browser --response-mode (issue 410) Merged
551 The AS signs jwt, query.jwt, fragment.jwt and form_post.jwt responses with its key, through PAR too (issue 411) Merged
552 The SDK verifies them against the JWKS, iss, aud and exp before the code exchange (issue 412) Merged
556 authorization_signed_response_alg through DCR, every app store, CIMD, the SDK and the CLI (issue 413) In review

Not done: encrypted responses, and PS256 with an RSA key (the JWKS lists the key under RS256 only).


Execution Order

flowchart TD
    subgraph BUGS["Bug Fixes"]
        I52["#52 Fix aud array (P0)"]
    end

    subgraph PHASE1["Phase 1: Resource Server Standards"]
        I46["#46 PRM (RFC 9728)<br/>Smallest, do first"]
        I47["#47 Introspection (7662)<br/>Already on roadmap"]
    end

    subgraph PHASE2["Phase 2: DCR Wrapper"]
        I48["#48 (RFC 7591/7592)"]
    end

    subgraph PHASE3["Phase 3: Keycloak Tests"]
        I49["#49<br/>Can start in parallel"]
    end

    subgraph CLIENTCAPS["OAuth Client Capabilities (parallel track)"]
        I53["#53 client_credentials<br/>foundational grant"]
        I54["#54 Headless OAuth + PKCE<br/>supersedes old Phase 3"]
        I51["#51 AS Discovery client<br/>enhances #54"]
        I55["#55 Introspection client<br/>requires #47 + #53"]
        I50["#50 OIDC Discovery server (optional)"]
    end

    BUGS -->|"blocks everything"| PHASE1
    PHASE1 --> PHASE2
    PHASE1 --> PHASE3
    PHASE3 --> CLIENTCAPS

Recommended order:

  1. #52 Fix aud array (P0 bug) ✅ DONE
  2. #46 PRM ✅ DONE
  3. #49 Keycloak tests ✅ DONE
  4. #53 client_credentials ✅ DONE
  5. #54 Headless OAuth + PKCE ✅ DONE
  6. #47 Token Introspection server ✅ DONE
  7. #51 AS Discovery client ✅ DONE
  8. #48 DCR wrapper ✅ DONE
  9. #55 Introspection client ✅ DONE
  10. #50 OIDC Discovery server ✅ DONE

MCPKit Pushdown — Generic OAuth Code (#78)

Pure-OAuth code pushed down from mcpkit/ext/auth (mcpkit#158) into oneauth for broader reusability.

Client-Side DCR + Validation Utilities (#78) ✅ COMPLETE

  • client/dcr.go — RegisterClient (RFC 7591 client-side DCR caller), ClientRegistrationRequest, ClientRegistrationResponse. Note: server-side DCR was already in admin/dcr.go; this is the client-side counterpart.
  • client/validation.go — ValidateHTTPS (RFC 6749 §3.1.2.1 HTTPS enforcement with localhost exemption), IsLocalhost (loopback detection), ValidateCIMDURL (draft-ietf-oauth-client-id-metadata-document validation)
  • client/client_credentials_source.go — ClientCredentialsSource (RFC 6749 §4.4 grant wrapper with token caching and scope step-up), TokenSource and ScopeAwareTokenSource interfaces
  • core/scopes.go — UnionScopes (sorted, deduplicated scope union, complement to IntersectScopes)
  • 20+ tests across client/dcr_test.go, client/validation_test.go, client/client_credentials_source_test.go, core/scopes_test.go

App Registrar Persistence ✅ COMPLETE

Closed parent issue 20 (Persist AppRegistrar state) via three shippable chunks. Schema additions for the RFC 7592 management track were baked in upfront so subsequent tickets did not churn the table layout.

# Scope Status
165 AppRegistrationStore interface + InMemoryAppStore + AppRegistrar refactor (cache + write-through) + appstoretest contract suite + e2e simulated-restart test Merged
166 FSAppStore (filesystem backend) — file-per-app, atomic writes, safeName traversal defense, partial recovery on corrupt files Merged
167 GORMAppStore (multi-node — Postgres/MySQL/SQLite) + app_store config block in cmd/oneauth-server. Closed parent #20. Merged

RFC 7592 — DCR Management ✅ COMPLETE

Closed parent issue 157 via four vertical verb-by-verb slices. Each ticket shipped a server handler, a client SDK helper, tests, and a walkthrough step in examples/06-dynamic-client-registration/. The ClientRegistrationManager interface introduced in 168 is the blueprint for the convention-port track below.

# Slice Status
168 Foundation + GET — registration_access_token + registration_client_uri issuance, ClientRegistrationManager interface, DCRManagementHandler, client.GetRegistration, walkthrough step Merged
169 PUT — full-replace update + token re-issuance + client.UpdateRegistration + walkthrough steps; manager interface and client SDK adopt the (ctx, *Req) → (*Resp, error) convention (blueprint for 172 / 175) Merged
170 DELETE — registration removal + KeyStore credential invalidation + client.DeleteRegistration + walkthrough step. Closes the verb trio. Merged
171 Keycloak interop — full lifecycle test against Keycloak’s RFC 7592 endpoints; validates the wire format of 168/169/170 against a real-world AS Merged

Convention Ports ✅ COMPLETE

The (ctx context.Context, *XRequest) → (*XResponse, error) convention adopted in 169 has propagated through the library. Every transport-agnostic interface in apiauth/ and admin/ now follows the gRPC-shape signature.

# Surface Status
172 Legacy admin/ — ClientRegistrar interface for register / list / get / delete / rotate. HTTP handlers reduced to thin wrappers. Wire format unchanged. Merged
175 apiauth/ — TokenIssuer / TokenValidator / TokenIntrospector / TokenRevoker / ClientAuthenticator. HTTP handlers (auth.go, introspection.go, revocation.go) reduced to thin wrappers. Wire format unchanged. Merged
261 OIDC Back-Channel Logout 1.0 (sender) — LogoutTokenIssuer + BCLDispatcher, per-client backchannel_logout_uri via DCR + admin, AS metadata advertisement, TokenHooks.OnSubjectRevoked / OnTokenRevoked wiring on logout-all and RFC 7009 revoke. sid maps to refresh-token family. Retry/backoff deferred. Merged
117 RFC 8628 Device Authorization Grant (AS-side wire protocol). POST /device/authorize + grant_type=…:device_code on the token endpoint with full §3.5 error taxonomy. core.DeviceAuthorizationStore interface + in-memory + FS backends. APIAuth.ApproveDeviceAuthorization / DenyDeviceAuthorization programmatic helpers (UI follow-up). AS metadata advertises device_authorization_endpoint. CLI subcommand and verification HTML page filed as follow-ups. Merged
266 Confidential-client authentication on device-code redemption. APIAuth.AppStore looks up token_endpoint_auth_method; confidential clients (anything other than none) MUST authenticate via ClientAuthenticator and the authenticated client_id drives the §3.4 binding check. Closes the security review thread on PR 265 (#117 follow-on). Merged
268 RFC 8628 client side. client.AuthClient.DeviceAuthorization + PollDeviceToken with four errors.Is-safe sentinels for the §3.5 polling errors. oneauth token device <issuer> CLI subcommand drives the polling loop; --open opens the verification URL in the default browser; --qr renders an ASCII QR code via mdp/qrterminal/v3. Merged
267 RFC 8628 §3.3 user-facing consent UI. apiauth.DeviceVerificationHandler serves the four HTML pages (GET/POST /device for code entry, GET/POST /device/approve for consent + decision). Built-in plain templates overridable via DeviceTemplates. Narrow function-type fields for CSRF + session integration keep apiauth/ free of an httpauth/ dep. Merged
269 RFC 8628 GORM backend — stores/gorm.DeviceAuthStore over SQLite / Postgres / MySQL, AutoMigrate-integrated. Mirrors the AppRegistrationStore backend layout (separate device_code PK + user_code_upper secondary index for case- and dash-insensitive lookup). Merged
270 RFC 8628 GAE Datastore backend — stores/gae.GAEDeviceAuthStore with namespacing, JSON-blob payloads, query-based user_code_upper lookup. Completes the four-backend matrix for core.DeviceAuthorizationStore (memory / fs / gorm / gae). Merged
281 core.upperUserCode promoted to exported core.UpperUserCode. Four backend copies (core, fs, gorm, gae) collapse to one source of truth. Three redundant drift-catch unit tests removed (the core test now covers all callers). Net -71 / +32 LOC. Merged
282 deviceauthtest/ shared contract suite mirrors appstoretest/ precedent — RunAll(t, factory) runs 10 canonical scenarios against every core.DeviceAuthorizationStore backend. New Backend{Store, Reopen} factory shape expresses RestartPersists uniformly across persistent + in-memory backends. Each backend’s test file collapses to a single Test*_Contract call. Net -525 / +329 LOC. Merged
276 Device-flow arc closed end-to-end: (a) new apiauth.MountDeviceFlow helper stamps the five RFC 8628 routes on an http.ServeMux (mirrors apiauth.MountASMetadata), (b) full e2e test in tests/e2e/device_flow_test.go walks the entire arc with 5 scenarios including issue-266 confidential-auth pin, (c) reference server (cmd/oneauth-server) wires the flow behind a yaml-toggled device_flow: block with four-backend buildDeviceAuthStore. Both production server and e2e test dogfood the same helper. Merged
250 OIDF conformance baseline gaps not gated on #116 closed. Cluster A (scopes_supported / claims_supported) was already shipped in default cmd/oneauth-server populations. Cluster B (5 HTTPS-protocol checks) closed by wiring cmd/oneauth-server’s built-in TLS mode into the OIDF harness — self-signed CA + cert + Java truststore committed under tests/oidf-conformance/certs/. New baseline at tests/oidf-conformance/baselines/2026-06-09/. Discovery plan now passes with 1 remaining expected-fail (gated on #116). Merged
189 /apps/register removed. /apps/dcr (RFC 7591) is the only registration path. Domain-specific quotas (MaxRooms / MaxMsgRate) are no longer OneAuth core concerns — the embedder maintains them in its own store keyed by client_id, syncing via apiauth.ClientHooks.OnRegistered / OnDeleted (option (f) from the design call: existing hooks suffice, no new types in core). Dead documentation + comments + test fixtures cleaned across admin/, apiauth/, keys/, tests/e2e/, docs/, testutil/. Merged
297 RFC 6749 §4.1 Authorization Code Grant + PKCE + RFC 9207 iss emission. apiauth.MountAuthorize stamps GET / POST /authorize; core.AuthorizationCodeStore interface with in-memory + GORM backends (FS and GAE followed in issue 382). AuthorizeVerificationHandler serves the consent screen mirroring DeviceVerificationHandler (shared consent_helpers.go extraction for login redirect + AppStore→client_name lookup). Token endpoint adds grant_type=authorization_code redemption with single-use semantics, S256 PKCE verify (via new oauth2.VerifyPKCE), redirect_uri + client_id binding checks, confidential-client enforcement reusing the device-flow pattern. AS metadata advertises authorization_endpoint + code response type + authorization_code grant. testutil.TestAuthServer gains WithAuthorizeEnabled / WithAuthorizeAutoApproveSubject / WithAuthorizeRedirectOverride so conformance fixtures can drive misbehaving-AS branches (suppress / inject / corrupt iss) a correct production AS cannot simulate. cmd/oneauth-server gains a code_flow: yaml block dogfooding the same helper. Retires the hand-rolled /authorize in tests/e2e/authserver_test.go (mirrors PR 286 → MountDeviceFlow extraction). Unblocks two SKIPPED checks in mcpkit’s auth conformance pillar (mcpkit#382). Merged
298 Retire the APIAuth god struct. auth.go (1614 LOC) deleted; the func (a *APIAuth) handle*Grant methods in the per-grant files removed. Token-endpoint dispatch lives behind focused gRPC-shape interfaces: TokenIssuer.PasswordGrant / RefreshGrant / ClientCredentials (existing) plus new AuthorizationCodeGranter, DeviceCodeGranter, JwtBearerGranter, TokenExchanger peers — composed-interface style per CLAUDE.md. New apiauth.TokenEndpointHandler (peer to IntrospectionHandler / RevocationHandler) owns HTTP-side concerns: form parsing, rate limiting, AuthHooks.OnLoginSuccess / OnLoginFailure firing, refresh-token capture with device info. Grants return typed *GrantError values that the HTTP shim maps to RFC 6749 §5.2 responses. Sessions / API keys / middleware split into sessions_http.go / apikeys.go / middleware.go with focused deps. OneAuthConfig grows fields APIAuth had — AuthorizationCodeStore, DeviceAuthStore, AppStore, TrustedAssertionIssuers, AcceptedAudiences, Authenticator override, VerifyKey, TracerProvider. Migration: &apiauth.APIAuth{...} → apiauth.NewOneAuth(apiauth.OneAuthConfig{...}) + apiauth.NewTokenEndpointHandler(oa); per-handler factories on *OneAuth replace the old method calls. Two real bugs caught en route: handleClientCredentials was re-validating the client secret inside Issuer.ClientCredentials (broke every private_key_jwt deployment); BCL hooks were snapshotted at construction time, so the e2e test ordering had to flip (caught 3 BCL-dispatch e2es that would otherwise have silently regressed). Affected 30+ in-repo consumers across apiauth/, cmd/oneauth-server, testutil, tests/e2e, examples/. Merged

Reference Server (cmd/oneauth-server)

# Item Status
184 Issuer URL fix (drop iss=0.0.0.0 leak) + RS256 token signing mode (jwt.signing_alg: RS256) so JWKS-based remote validation works. Test/dev opts into ephemeral keys via explicit jwt.ephemeral_signing_key: true; production sets jwt.private_key_path. Merged
194 Meta-tracker — promote cmd/oneauth-server from POC to production-grade reference deployment. Catalogs feature gaps (admin UI, MFA, full /authorize, multi-tenant, WebAuthn, etc.) and what’s intentionally not on the roadmap. Living document; not a single PR. Open

Relationship to Existing Work

What this track does NOT change

  • Core library architecture (embeddable, not a service)
  • KeyStore / KeyLookup / KeyStorage interfaces
  • MintResourceToken (single entry point; auto-selects HS256/RS256/ES256 from the key type)
  • AdminAuth interface
  • Three-backend store pattern (FS, GORM, GAE)
  • E2e test suite (make e2e)

What this track complements

  • OAuth for non-browser clients — #54 (headless OAuth + PKCE) and #53 (client_credentials) cover CLI/agent and machine-to-machine flows
  • Redis-backed distributed stores (#115) — introspection endpoint benefits from fast token lookup
  • Token blacklist — introspection checks the blacklist
  • Persist AppRegistrar state (#20) — DCR wrapper benefits from persistent registrations
  • Authlete-superset tracker (#163) — meta-issue aggregating gap-closure work, see docs/gaps/AUTHLETE_GAP_ANALYSIS.md

Positioning vs Keycloak

OneAuth and Keycloak are complementary, not competing:

  • Keycloak is the authorization server / IdP
  • OneAuth helps you build Go services that validate tokens from Keycloak (or any OIDC provider)
  • The Keycloak test suite (#49) makes this relationship explicit and tested