← All plugins
golem15.oauthserver

OAuth server

The compiled OpenID Connect provider for SummerCMS applications: wristband's OIDC flavour at the PHP provider's paths, with its tables, a database signing-key ring encrypted with the application key, server-rendered consent and error pages, and the user data of golem15.user.

summer plugin:install golem15.oauthserver
Latest version
v0.1.8
Framework
v0.6.7
Requires
golem15.user v0.1.17
Category
Users
Go module
git.golem15.com/golem15/sm-oauthserver-plugin

README

golem15.oauthserver

The compiled OpenID Connect provider for SummerCMS applications: wristband's OIDC flavour at the PHP provider's paths, with its tables, a database signing-key ring encrypted with the application key, server-rendered consent and error pages, and the user data of golem15.user.

import _ "git.golem15.com/golem15/sm-oauthserver-plugin"

Module git.golem15.com/golem15/sm-oauthserver-plugin, package oauthserver, plugin ID golem15.oauthserver, requires golem15.user.

Overview

The plugin ports the WinterCMS Golem15.OAuthServer plugin. It builds two wristband servers on one issuer and publishes them as one *oauthserver.Servers value (Servers.OIDC, Servers.MCP, Servers.KeyRing), so an application that looks up its own *wristband.Server is not affected:

  • the OIDC server (wristband.NewOIDCServer) serves discovery, JWKS, authorize with the login handoff, resume, consent and account switching, token and userinfo, and is wired to the plugin's stores through SetOIDCBackend(classes.LazyStore, classes.KeyRing, classes.Host);
  • the MCP server (wristband.NewServer) shares the issuer and is wired to classes.LazyMCPStore; its routes are mounted only with mcp.enabled: true.

The tables keep the PHP names (golem15_oauthserver_clients, _auth_requests, _auth_codes, _access_tokens, _consents, _subjects) and columns, so an import copies rows as they are; _refresh_tokens, _keys, _settings and _mcp_codes are new.

Features

  • PHP paths and bytes. The routes below answer like the PHP provider: the engine writes the redirects, JSON and headers; the plugin adds storage, keys, users and pages.
  • Stores. classes.Store implements wristband.OIDCBackend over GORM, one transaction per call. Clients are read with kind = 'oidc' in SQL. Codes and parked requests are consumed by single guarded UPDATE statements, consents are one row per user and client (scopes merged), subjects are random UUIDs allocated once per user and sector ('' is public), and refresh tokens keep their rotation lineage. classes.LazyStore resolves *gorm.DB at request time, because the generated main publishes it after boot. Every OIDC transaction that touches a user's grant rows first takes that user's grants lock (shared): SubjectFor, ConsentFor and SaveConsent take it on entry, ConsumeCode and RefreshTokenByHashForUpdate after reading the row's user. A revoke or the grant cascade therefore either waits for a resume, consent decision, code exchange, refresh rotation or userinfo call in flight and then deletes what it issued, or runs first.
  • Key ring. The plugin publishes its *classes.KeyRing on the application for the rotate and prune commands. classes.KeyRing implements wristband.KeyStore over golem15_oauthserver_keys. The first key is generated on first use (RS256, or ES256 with key_algorithm: ES256); the partial unique index oas_keys_one_active lets exactly one of several racing instances win. The active kid is read from the database on every signing, so a rotation on one instance reaches all of them; parsed keys are cached per kid. The JWKS holds the active key and the keys retired within rotation_grace_hours. Rotate and Prune serve the rotation and prune commands. The private key is stored as lagoon.Encrypted ciphertext, never serialised, never logged and never shown in the admin.
  • Signed-in user. The authorize routes read the session JWT through golem15.user's classes.RequestUser (bearer header, token and auth_token cookies). Switching account blacklists that JWT and forgets the cookie through classes.EndRequestSession.
  • Pages. classes.Host renders views/consent.html.tmpl and views/error.html.tmpl (ports of the PHP views, same layout, class names and copy) with html/template and the plugin's translations (golem15.oauthserver::lang.*, en and pl). The consent page shows the client's logo (or its initial), the signed-in user with their avatar, the scopes still to consent to, the switch-account form and the decision form; every value is escaped.
  • Branding. The settings row golem15_oauthserver_settings (id 1, models.Settings, logo as the attachOne logo) holds the site name and the page colours, font stylesheet URL, font family and custom CSS. classes.LoadBranding sanitises every value as the PHP plugin did (SanitizeColor: hex of 3 to 8 digits or a 3 to 24 letter name; SanitizeFontFamily; SanitizeCSSURL: https only; SanitizeCustomCSS: tag openers removed, capped at MaxCustomCSS), and BrandingCSS builds the :root override from sanitised values only. The error heading always uses DangerColor. An empty site name falls back to app.name.
  • Consent modes. With consent_mode: page the plugin renders consent. With consent_mode: redirect the browser goes to consent_url?request={id} (or &request=), and the application's page reads and decides the request through GET and POST /oauth/authorize/requests/{request} (controllers.ConsentShow, controllers.ConsentDecide, behind jwt.auth).
  • Claims. classes.Claims releases, for profile, name (the trimmed name, else the email), picture (golem15.user's AvatarURL at picture_size, made absolute: //host becomes https://host, a relative path is joined to app.url), groups (sorted unique group codes, always present) and communities (the user's golem15.userfriends memberships in groups that are not deleted, {id, name, role} sorted by name then id, read only when those tables exist, else []); for email, email with email_verified (whether the account is activated). A deleted or soft-deleted user gets no claims.
  • Authorized apps. GET /oauth/authorizations lists the signed-in user's consents newest first in the PHP shape. Each object ends with kind, always oidc or mcp, taken from the client. DELETE /oauth/authorizations/{client_id} revokes one: inside the transaction classes.LockUserGrants takes the caller's grants lock, then the consent and the pair's authorization codes, MCP codes, access tokens and refresh tokens are deleted. An MCP allow takes the same lock, so a revoke and an allow of the same user never interleave. The OIDC store takes it too (shared), so a revoke never leaves behind a code or a successor token that a silent resume, a code exchange or a refresh rotation in flight issued. Another user's client, an unknown id, or a live MCP grant that has no consent row answers 404 {"error":"not_found"}. The event after commit is unchanged: ClientID is set and TokenID stays zero.
  • User cascade. classes.Cascade listens to golem15.user's user.Deleting (hard delete: access tokens, refresh tokens, OIDC codes, MCP codes, consents and subjects) and user.Deactivating (the same without the subjects, so a restored user keeps the same sub), inside the user change's transaction. After the commit the cascade fires a deleted *pact.MCPSubjectChanged (guard user), and the authorized-apps revocation (DELETE /oauth/authorizations/{client_id}) a revoked one carrying the client's id (ClientID), so the MCP endpoint ends the user's sessions on every instance, or after a revocation only the sessions of that client.
  • Grant revocation on ban, password reset and link changes. Cascade.OnAccessRevoked listens to golem15.user's user.AccessRevoked (AccessRevokedEvent: a ban, a password reset, a password an administrator set, the user's own password change) and, in the event's transaction, ends every OAuth grant of the users created before the event's Before, MCP agents and OIDC sign-ins alike: their access and refresh tokens at mcp and oidc clients get revoked_at, their consents at those clients are deleted (an OIDC client asks for consent again) and their unused OIDC and MCP authorization codes are deleted; subjects stay. golem15.user ends the users' MCP sessions after the commit. Cascade.OnBackendLinked and Cascade.OnBackendUnlinked (OnBackendLinkChanged) listen to user.BackendLinked and user.BackendUnlinked: in the link change's transaction they revoke the frontend user's unrevoked MCP access and refresh tokens whose scopes contain backend, delete the user's unexchanged MCP codes carrying backend and, after the commit, fire a revoked event with each such client's ClientID. A backend grant acts as the linked administrator, so any link change needs a new consent; grants without backend are kept. Every revocation first takes the users' grants advisory locks, which the MCP and OIDC code exchanges and refresh rotations take too (shared, before they lock their row), so a rotation in flight finishes first and its successor is revoked as well. What guarantees that a grant never acts as an administrator the user did not consent to is the consented account it records: the consent decision stores the administrator the page showed on the code (backend_user_id, classes.WithConsentedBackend), the code exchange and every rotation copy it onto the access and refresh tokens (code that mints a grant directly through classes.MCPStore passes the administrator in the context with classes.WithConsentedBackend), the verifier reports it as pact.MCPGrant.BackendUserID, and the framework's MCP endpoint gives the grant a backend subject only while the user's link names that administrator. Upgrade note: backend grants issued before the 202610230001 migration record no administrator and stop acting as one; the user connects the agent again.
  • MCP on the same stores. classes.MCPStore implements wristband.Backend: clients with kind = 'mcp' (dynamic registration with the client cap under an advisory lock, the unconsented sweep), pending requests and codes in golem15_oauthserver_mcp_codes, refresh lineage in _refresh_tokens, and access tokens (oas_at_ + 32 random bytes, stored hashed with the client id) in _access_tokens. An MCP client never passes the OIDC flow and an OIDC client never passes the MCP flow. The MCP consent page is the application's (/connect?request=, where the MCP authorize endpoint sends the browser); it reads and decides the request through the consent JSON GET and POST /oauth/mcp/requests/{request} (controllers.MCPConsentShow, controllers.MCPConsentDecide) as the signed-in frontend user. The body names the client (its name, redirect host and logo_url, an empty string when the client has no logo), the requested scopes as a string array, scope_details (name, label, description, locked — locked only for read), consent_required and the expiry, and, when backend is requested and golem15.user's published pact.MCPLinkedBackendResolver reports a link, the linked admin (backend_admin, shown as "also act as admin "). consent_required is false only when a consent row already holds every requested name. Labels whose catalog text contains :: are resolved with phrasebook.Translator.Get; other catalog text is used as written. backend and offline_access are not catalog names: their labels and descriptions are golem15.oauthserver::lang.consent.mcp.*. allow grants the submitted scopes the client requested (all of them when scopes is absent) and drops backend when the user has no link. When the pending request's offline-access flag is set, the show list includes the word offline_access. That word is the code's offline_access column, not a scope passed to IssueCode. classes.WithGrantedOfflineAccess sets the column only when the decision body included scopes; an omitted scopes field leaves the pending flag. The allow runs in one transaction that first takes the user's grants lock (classes.WithinUserGrantsLock, the exclusive lock revoke and the grant cascade take). In it the code is issued (IssueCode, whose MCP store joins that transaction) and a consent row that already covers the request is only touched (TouchConsent); otherwise the stored scopes become the granted set, including the word offline_access when that flag was granted. That write replaces the array. It does not call SaveConsent, which unions OIDC scopes. A revoke therefore lands before or after both writes, so it is never undone by an allow in flight, and a failed consent write leaves the request pending with no code. A deny leaves the row unchanged. The decision body carries the shown administrator's login as backend_admin: when the grant includes backend, it must name the administrator linked now, and with no link it must be absent, otherwise the answer is 409 {"error":"backend_link_changed"} and the page shows the request again (the request stays pending). The link is read at consent, so a link made later needs a new consent. The MCP server advertises one scope list, and the OIDC server's scopes stay openid, profile and email. The MCP list is always read, write, ai, offline_access and backend, then the declared member scopes (pact.MemberTokenScopeCatalog) in catalog order, except catalog entries named read, write or ai. golem15.oauthserver.mcp_scopes filters that declared tail: unset means every declared name, a YAML list (or the comma-separated env value) means only those names, and an empty list means the five fixed names only. A name in the list that no plugin declares fails boot. classes.AdvertisedMCPScopes builds the slice; NewServers assigns it to the MCP server and stores the same slice on classes.MCPTokenVerifier, whose MCPScopesSupported returns a clone. A client whose dynamic registration stored a non-nil scope ceiling still drops requested names outside that ceiling. This phase does not rewrite ceilings already stored on clients. A grant with backend lets the application's MCP endpoint act as the backend account the user has linked (golem15.user's verified link).
  • MCP access-token verifier. With mcp.enabled, Boot publishes classes.MCPTokenVerifier as pact.MCPTokenVerifier. The same value implements pact.MCPAdvertisedScopes: MCPScopesSupported is the slice the MCP server advertises, and pier copies it into protected-resource metadata when it is non-empty. The endpoint verifies the oas_at_ tokens at the resource: the token must carry the prefix, its hash must name an access token that is neither revoked nor expired, its client must exist with kind = 'mcp', be active and not revoked, its user must still load (a deleted or deactivated user does not) and must not be banned, and the token must not predate the user's tokens_valid_after. The cutoff is stored in whole seconds while created_at is not, so a token created earlier in the cutoff's own second is refused too (created_at before cutoff + 1s). The MCP refresh grant applies the same three refusals (user gone, banned, token before the cutoff) and answers invalid_grant. An OIDC access token, or a token of any other client kind, is refused with pact.ErrMCPTokenInvalid. MCPResource answers mcp.resource; last_used_at is stamped at most once a minute per token.
  • Throttles. The plugin declares the PHP buckets (surf.BucketProvider), shared across instances through surf's store; see Throttles. Discovery and JWKS are never throttled.

Routes

Method and path Group Notes
GET /.well-known/openid-configuration public discovery, Cache-Control: max-age=3600, public
GET /oauth/jwks public active key plus retired keys within the grace window
POST /oauth/token server to server authorization_code (and refresh_token when enabled); client_secret_basic or client_secret_post
GET /oauth/userinfo server to server bearer access token
GET /oauth/authorize browser start: anonymous users go to login_url?redirect=/oauth/authorize/resume/{request}
POST /oauth/authorize browser the consent decision (request_id, consent_token, decision)
GET /oauth/authorize/resume/{request} browser resume after login; silent when the consent covers the request
POST /oauth/authorize/switch-account browser ends the session and returns to the resume path
GET /oauth/authorize/requests/{request} consent JSON (redirect mode only) {request_id, consent_token, client {client_id, name, logo_url}, scopes}; 410 {"error":"expired_request"}
POST /oauth/authorize/requests/{request} consent JSON (redirect mode only) JSON {consent_token, decision} answers {redirect_uri}; 410 as above
GET /oauth/authorizations authorized apps (jwt.auth) {"authorizations":[{client_id, name, logo_url, scopes, first_authorized_at, last_used_at, kind}]}; kind is last and is always oidc or mcp
DELETE /oauth/authorizations/{client_id} authorized apps (jwt.auth) {"revoked":true} after classes.LockUserGrants and deletion of the consent, codes, MCP codes, access tokens and refresh tokens; 404 {"error":"not_found"} when no consent exists
GET /.well-known/oauth-authorization-server MCP (mcp.enabled only) RFC 8414 metadata
GET /oauth/mcp/authorize MCP (mcp.enabled only) parks the request and sends the browser to {issuer}/connect?request= (mcp.consent_path when set; <backend.uri>/connect in backend mode)
POST /oauth/mcp/register MCP (mcp.enabled only) dynamic client registration
POST /oauth/mcp/token MCP (mcp.enabled only) code exchange and refresh rotation
GET /oauth/mcp/requests/{request} MCP consent JSON (mcp.enabled and user mode only, jwt.auth) {request_id, client {name, redirect_host, logo_url}, scopes, expires_at, backend_admin, scope_details, consent_required}; logo_url is "" when the client has no logo; scope_details is {name, label, description, locked} with locked only for read; consent_required is false only when a stored consent already covers the request; backend_admin is {login, name} of the linked backend account when backend is requested and a link exists, else null; 404 {"error":"request_not_found"}
POST /oauth/mcp/requests/{request} MCP consent JSON (mcp.enabled and user mode only, jwt.auth) JSON {decision, scopes, backend_admin} answers {redirect_uri}; 404 as above, 422 {"error":"no_grantable_scopes"}, 409 {"error":"backend_link_changed"} when backend_admin is not the administrator linked now

The browser routes and the consent JSON routes (the MCP ones included) carry throttle:oauth-authorize; the token route oauthserver.body.limit:<token_body_limit> then throttle:oauth-token; userinfo throttle:oauth-userinfo; the authorized-apps routes jwt.auth and throttle:oauth-authorizations, preceded by cors:<cors_profile> when one is set (without a profile there is no OPTIONS route, where PHP answered 204). The MCP routes carry throttle:oauth-mcp-register and oauthserver.body.limit plus throttle:oauth-mcp-token. surf's own body.limit applies to non-raw routes only, so the token route caps its body with the plugin's middleware factory oauthserver.body.limit (BodyLimitMiddleware), placed before the throttle whose key reads the form.

Throttles

Bucket Limit Key
oauth-authorize (BucketAuthorize) 30 a minute oauth-authorize: + the user id of the session JWT (verified with the golem15.user secret, no database lookup), else oauth-authorize-ip: + client IP
oauth-token (BucketToken) 20 a minute oac: + the client_id form field, else oac-ip: + client IP. As in PHP, the Basic header is not read, so client_secret_basic relying parties share their IP's bucket.
oauth-userinfo (BucketUserInfo) 60 a minute oau: + SHA-256 hex of the bearer token (never the token), else oau-ip: + client IP
oauth-authorizations (BucketAuthorizations) 120 a minute oauth-authorizations: + user id, else oauth-authorizations-ip: + client IP
oauth-mcp-register (BucketMCPRegister, with mcp.enabled) 10 a minute oauth-mcp-register-ip: + client IP
oauth-mcp-token (BucketMCPToken, with mcp.enabled) 20 a minute oauth-mcp-token: + the client_id form field, else oauth-mcp-token-ip: + client IP

Client IPs honour http.trusted_proxies (surf.ClientIP).

API reference

  • oauthserver: PluginID, Plugin (with Buckets, MiddlewareFactories, Commands, Schedule, AdminFS, AdminControllers, Settings, Permissions, Navigation and AccountContributions), Servers, Config (with RotationInterval, MCPSubjectMode, MCPConsentPath, OIDCEnabled and BackendMode), AccountContributionMCPConnections, LoadConfig(app), NewServers(app, cfg, views), DefaultTokenBodyLimit, BodyLimitMiddleware, BucketAuthorize, BucketToken, BucketUserInfo, BucketAuthorizations, BucketMCPRegister, BucketMCPToken.
  • classes: Store (NewStore(db), WithClaims, WithinOIDCTx), LazyStore, MCPStore (NewMCPStore(db), WithinTx), LazyMCPStore (BackendSubjects), MCPAccessTokenPrefix, MCPTokenVerifier (NewMCPTokenVerifier(app, resource, scopes), BackendSubjects, MCPVerifyToken, MCPResource, MCPScopesSupported), AdvertisedMCPScopes(app), LockUserGrants(ctx, db, userIDs), WithinUserGrantsLock(ctx, db, userIDs, fn), WithGrantedOfflineAccess(ctx, granted), SubjectModeUser, SubjectModeBackend, WithBackendSubject(ctx), LockBackendGrants(ctx, db, adminIDs), WithinBackendGrantsLock(ctx, db, adminIDs, fn), BackendSubjectCurrent(ctx, db, adminID, at), BackendGrantRef (AdminID, ClientID), RevokeBackendGrants(ctx, tx, adminIDs, clientID), FireBackendRevokedAfterCommit(ctx, app, tx, refs), BackendCascade (OnBackendAccessRevoked), ErrBackendRevocationNoTx, Cascade (OnUserDeleting, OnUserDeactivating, OnAccessRevoked, OnBackendLinked, OnBackendUnlinked, OnBackendLinkChanged), FireSubjectChanged(ctx, app, guard, userID, kind) and FireSubjectChangedAfterCommit(ctx, app, tx, guard, userID, kind) (both delegate to golem15.user's helpers of the same names), ErrDatabaseUnavailable, KeyRing (NewKeyRing(app, cfg), ActiveSigningKey, PublishedKeys, Rotate, Prune, Config), KeyRingConfig (Algorithm, Grace), Claims (IdentityClaims), Community, DefaultPictureSize, AbsoluteURL, DisplayName, Host (NewHost(app, views, opts), Options, ClientLogoURL), HostOptions, ConsentModePage, ConsentModeRedirect, ClientLogoURL(ctx, app, clientID), RevealStore (Park, Take), RevealTTL, DecidePath, SwitchPath, Branding, DefaultBranding, LoadBranding, BrandingCSS, SanitizeColor, SanitizeFontFamily, SanitizeCSSURL, SanitizeCustomCSS, DangerColor, MaxCustomCSS and the Default* colour constants.
  • console: ImportWinter(app) (oauthserver:import-winter), ImportWinterFile(ctx, db, opts, out), ImportKeyDir(ctx, db, dir, out), ImportSettings(ctx, app, db, file, uploadsDir, out), RotateKeys(app) (oauthserver:rotate-keys), Prune(app) (oauthserver:prune), PruneExpired(ctx, db, ring, now), PruneReport (AuthCodes, AccessTokens, AuthRequests, SigningKeys, RefreshTokens, MCPCodes), PruneMargin, WinterOptions (File, KeyDir, Settings, UploadsDir, Force, DryRun), WinterReport (Rows, Keys).
  • controllers: ConsentShow(app, srv), ConsentDecide(app, srv), MCPConsentShow(app, srv), MCPConsentDecide(app, srv), MCPAdminConsent (NewMCPAdminConsent(app, srv), MCPAdminConsentShow, MCPAdminConsentDecide), AuthorizationsIndex(app), AuthorizationsDestroy(app), AdminControllers(app), BackendModeAdminControllers(app), ClientsControllerID, BrandingControllerID, MCPConnectionsControllerID, PermissionManageClients, PermissionManageSettings, PermissionManageMCPConnections, ActionRevokeMCPConnections, ActionRegenerateSecret, and the partial view models SecretRevealView, AuthorizationsView, AuthorizationRow.
  • models: LangPrefix, Client (ClientLogoField, RedirectURIsText, Fillable, Rules, SetPendingSecret, TakePendingSecret), ClientKindOIDC, ClientKindMCP, AuthRequest, AuthCode, AccessToken, RefreshToken, Consent, Subject, SigningKey, Settings (SettingsLogoField), MCPCode, MCPConnection (MCPConnectionsTable), Strings, NewStrings, Uints, NewUints, Register, All.
  • updates: Register, All and the migrations 202610190001_create_golem15_oauthserver_tables, 202610190002_create_golem15_oauthserver_settings and 202610190003_create_golem15_oauthserver_mcp_codes, 202610230001_add_golem15_oauthserver_backend_user_id, 202610280001_backfill_golem15_oauthserver_mcp_consents and 202611200001_add_golem15_oauthserver_backend_subjects.

Configuration

Keys live under golem15.oauthserver.* and are set from the environment as SUMMER_GOLEM15__OAUTHSERVER__<KEY> (nested keys join with __).

Key Default Environment PHP Meaning
issuer "" (falls back to app.url) SUMMER_GOLEM15__OAUTHSERVER__ISSUER OAUTHSERVER_ISSUER the iss of every id_token; trimmed, trailing slash removed. Keep the PHP issuer at cutover.
login_url /login SUMMER_GOLEM15__OAUTHSERVER__LOGIN_URL OAUTHSERVER_LOGIN_URL where anonymous browsers sign in
rotation_grace_hours 24 SUMMER_GOLEM15__OAUTHSERVER__ROTATION_GRACE_HOURS OAUTHSERVER_ROTATION_GRACE_HOURS how long a retired key stays published
rotation_interval "" (off) SUMMER_GOLEM15__OAUTHSERVER__ROTATION_INTERVAL (new) Go duration between scheduled key rotations, for example 2160h; empty schedules none; anything else that is not a positive duration fails boot
key_algorithm RS256 SUMMER_GOLEM15__OAUTHSERVER__KEY_ALGORITHM (new) RS256 or ES256 for generated keys; anything else fails boot
ttl.id_token 3600 SUMMER_GOLEM15__OAUTHSERVER__TTL__ID_TOKEN OAUTHSERVER_TTL_ID_TOKEN seconds
ttl.access_token 3600 SUMMER_GOLEM15__OAUTHSERVER__TTL__ACCESS_TOKEN OAUTHSERVER_TTL_ACCESS_TOKEN seconds
ttl.auth_code 60 SUMMER_GOLEM15__OAUTHSERVER__TTL__AUTH_CODE OAUTHSERVER_TTL_AUTH_CODE seconds
ttl.auth_request 600 SUMMER_GOLEM15__OAUTHSERVER__TTL__AUTH_REQUEST OAUTHSERVER_TTL_AUTH_REQUEST seconds
ttl.refresh_token 2592000 SUMMER_GOLEM15__OAUTHSERVER__TTL__REFRESH_TOKEN (new) seconds
refresh.enabled false SUMMER_GOLEM15__OAUTHSERVER__REFRESH__ENABLED (new) refresh tokens for clients with offline access granted offline_access
picture_size 128 SUMMER_GOLEM15__OAUTHSERVER__PICTURE_SIZE OAUTHSERVER_PICTURE_SIZE avatar size of the picture claim
consent_mode page SUMMER_GOLEM15__OAUTHSERVER__CONSENT_MODE (new) page or redirect; anything else fails boot
consent_url "" SUMMER_GOLEM15__OAUTHSERVER__CONSENT_URL (new) the application's consent page; required with redirect
token_body_limit 65536 SUMMER_GOLEM15__OAUTHSERVER__TOKEN_BODY_LIMIT (new) body cap of POST /oauth/token (and /oauth/mcp/token) in bytes
cors_profile "" SUMMER_GOLEM15__OAUTHSERVER__CORS_PROFILE (new) surf CORS profile (http.cors_profiles.<name>) of the authorized-apps routes
mcp.enabled false SUMMER_GOLEM15__OAUTHSERVER__MCP__ENABLED (new) mounts the MCP routes and publishes the MCP access-token verifier. Leave it off in an application that serves its own MCP authorization server: the paths would collide at boot.
mcp.resource "" SUMMER_GOLEM15__OAUTHSERVER__MCP__RESOURCE (new) the MCP server's resource indicator; must equal the MCP endpoint's mcp.resource. With mcp.enabled, a loopback value (localhost, 127.0.0.1, ::1) on an issuer that is not loopback fails boot in backend mode and logs a warning in user mode: it is a local default the deployment did not override
mcp.subject user SUMMER_GOLEM15__OAUTHSERVER__MCP__SUBJECT (new) who an MCP sign-in authenticates: user (a frontend user of golem15.user) or backend (an administrator, see Backend-subject mode). backend needs mcp.enabled and cannot be combined with mcp_scopes; anything else fails boot. One subject per application for now.
mcp.consent_path "" SUMMER_GOLEM15__OAUTHSERVER__MCP__CONSENT_PATH (new) the path the MCP authorize endpoint appends to the issuer for the consent screen; empty means <backend.uri>/connect in backend mode and /connect in user mode. With mcp.enabled, a value that is not a plain same-origin path (wristband.CheckConsentPath: one leading /, no ?, #, \, @, whitespace or control character) fails boot
oidc.enabled true SUMMER_GOLEM15__OAUTHSERVER__OIDC__ENABLED (new) false mounts none of the OpenID Connect provider routes (discovery, JWKS, authorize, resume, switch account, token, userinfo, the redirect-mode consent JSON); the authorized-apps routes then stay only in user mode
mcp_scopes unset SUMMER_GOLEM15__OAUTHSERVER__MCP_SCOPES (new) declared member scopes advertised besides the fixed names read, write, ai, offline_access and backend, which are always present. Unset: every declared name. A list: only those names. Empty: the five fixed names only. A name no plugin declares fails boot. The env value is comma-separated.

Backend-subject mode

With mcp.subject: backend an MCP sign-in authenticates an administrator (backend_users) instead of a frontend user, for an application whose MCP tools are backend-guarded and which has no frontend users. It is off by default, and with mcp.subject: user every route, scope list, row and test behaves as before. The plugin still requires golem15.user. A typical configuration:

mcp:
  enabled: true
  resource: https://example.test/mcp
  subject: backend
oidc:
  enabled: false
  • Routes. /.well-known/oauth-authorization-server, /oauth/mcp/authorize, /oauth/mcp/register and /oauth/mcp/token as in user mode. The authorize endpoint hands the browser to {issuer}<backend.uri>/connect?request=<id> (or {issuer}<mcp.consent_path>), the admin SPA's consent screen. The user-mode consent JSON /oauth/mcp/requests/{request} is not mounted, so a frontend user can never finish an administrator's pending request. With oidc.enabled: false the OpenID Connect provider routes and the authorized-apps routes are not mounted either.
  • Consent. Boot publishes controllers.MCPAdminConsent as pact.MCPAdminConsent. cabana serves GET and POST {api}/mcp/consent/{request} behind the admin session and applies the personal API token rules: the screen offers only the requested scopes the administrator can use, and * collapses the grant. The provider resolves the pending request and, on Allow, issues the code and replaces the administrator's consent for the client in one transaction under the administrator's grants lock (classes.WithinBackendGrantsLock). Under that lock it reads the administrator again (classes.BackendSubjectCurrent): one who was deactivated or deleted, or whose tokens_valid_after moved after the decision started (a password change or set that committed while the decision waited for the lock), gets 404 and nothing is written. The code exchange of an administrator's code is refused (invalid_grant) the same way when the administrator no longer loads or the code was issued before their tokens_valid_after. A pending row turns into a code once (a conditional UPDATE): of two administrators deciding the same request at the same time, the second gets 404 and the first decision's code stands. The same holds for two decisions in user mode.
  • Scopes. scopes_supported (authorization server metadata, the authorize allow-list and the verifier's MCPScopesSupported, so the MCP endpoint's protected-resource metadata too) is the personal API token catalog (cabana.TokenScopeNames: *, admin:read and the plugins' TokenScopes) plus offline_access. A request that names no scope asks for the whole catalog, never read. A grant is scope-limited exactly like a g15_ token with the same scopes.
  • Storage. The existing tables hold the grants: an administrator's MCP code, access token, refresh token and consent have user_id NULL and name the administrator in backend_user_id (migration 202611200001_add_golem15_oauthserver_backend_subjects: nullable user_id on access tokens, refresh tokens and consents, consents.backend_user_id, the partial unique index oas_consents_backend_client_unique per administrator and client, partial lookup indexes and NOT VALID checks that refuse a row naming no subject). User-mode queries filter on user_id and never see these rows. The migration rewrites no table; its rollback deletes every administrator's grant, because user_id becomes NOT NULL again.
  • Verification. The verifier answers such a token as pact.MCPGrant{UserID: 0, BackendUserID, Subject: pact.MCPGrantSubjectBackend, ...} while cabana.BackendPrincipal still loads the administrator (not deleted, not deactivated) and the token is not older than the administrator's tokens_valid_after. A failed administrator lookup (a database error) is returned as is, so the request fails closed with a server error and the client keeps its grant. Every use stamps last_used_at on the token and, at most once a minute, on the administrator's consent.
  • Refresh. "Stay connected" on the consent screen grants offline_access. A refresh rotation of an administrator's grant takes the administrator's grants lock (shared), keeps user_id NULL and backend_user_id on the new access and refresh tokens, and is refused (invalid_grant) when the administrator no longer loads or the refresh token is older than their tokens_valid_after. The administrator is read through the rotation's own transaction; a failed read answers a server error, not invalid_grant.
  • Revocation. Boot listens to cabana.BackendAccessRevokedEvent in backend mode only (classes.BackendCascade, OnBackendAccessRevoked). cabana fires it inside the save's transaction when an administrator is deleted or deactivated, changes their own password, has a password set by another administrator or reset with admin:reset-password, or has their role, own permissions or superuser flag changed, and for every holder when a role's permissions change. The listener revokes, in that transaction, every access and refresh token of those administrators, deletes their unexchanged codes and their consents (classes.RevokeBackendGrants, under classes.LockBackendGrants), and after the commit fires one pact.MCPSubjectChanged{Guard: "backend", Kind: revoked, ClientID} per client (classes.FireBackendRevokedAfterCommit), which ends exactly those MCP sessions. A failure rolls the administrator change back. An event without a transaction (Tx nil, which cabana never fires) is refused with classes.ErrBackendRevocationNoTx and revokes nothing, because the grants lock and the revocation only hold inside one transaction. Role and permission changes revoke rather than re-list tools. Frontend users' grants, including user-mode grants linked to the same administrators, are never touched. cabana offers no "sign out everywhere", so there is nothing to listen to for it.
  • My account. In backend mode only, the plugin contributes the My account section mcp_connections (AccountContributionMCPConnections): the connector address (mcp.resource) as its status, and one row per client the signed-in administrator connected, most recently used first. A row shows the client name (the client id when it has none), the granted scope labels without offline_access, and "Connected" with "Last used" or "Never used". Its one item action revoke (danger, with a confirmation naming the row) revokes that client's grant only and ends its sessions; a client the administrator did not connect answers 404. User-mode applications get no section.
  • MCP connections screen. In backend mode only, a side-menu entry MCP connections (mcp_connections, icon network, after Clients) opens controllers.MCPConnectionsControllerID (golem15.oauthserver.mcpconnections), gated by the permission golem15.oauthserver.manage_mcp_connections (controllers.PermissionManageMCPConnections, no default role; superusers pass). It lists every administrator's connections (models.MCPConnection, read from the consents): administrator (full name, else login), email, client, scopes, connected and last used, 20 to a page, searchable by administrator, email and client. There is no create button and no record page. The bulk action revoke (controllers.ActionRevokeMCPConnections) revokes the selected connections exactly like the My account action.
  • One subject per application. An application runs either user mode or backend mode for now. User-mode applications see no new route, section, screen or permission. An administrator's grant is honoured in backend mode only: after a switch to mcp.subject: user (with mcp.enabled still on), the verifier refuses administrators' access tokens and the token endpoint refuses their codes and refresh tokens (invalid_grant), because nothing in user mode could list or revoke them (classes.LazyMCPStore.BackendSubjects, classes.MCPTokenVerifier.BackendSubjects, both set by NewServers). Frontend users' grants keep verifying in backend mode.

Admin

The plugin adds a navigation entry OAuth clients (order 560, permission golem15.oauthserver.*) with a Clients side menu, a Settings link OAuth Server to the branding form, and two permissions (PHP codes and labels): golem15.oauthserver.manage_clients (controllers.PermissionManageClients) and golem15.oauthserver.manage_settings (controllers.PermissionManageSettings). Both screens use stock field types only. Backend mode adds the MCP connections side-menu entry and the permission golem15.oauthserver.manage_mcp_connections (see Backend-subject mode).

  • Clients (controllers.ClientsControllerID, golem15.oauthserver.clients, needs manage_clients). The list and the form show OIDC clients only (kind = oidc); MCP clients from dynamic registration are not managed here (D-08). Columns: name, client id, active, development, subject type, created. Fields: name; the client id (read only); redirect URIs as a textarea, one per line (Client.RedirectURIsText, stored in the redirect_uris JSON column), each checked with wristband.RejectRedirectURI, and http:// loopback URIs only on a development client; scopes as a fixed-option taglist (openid is always kept, offline_access is saved only with the offline access switch, which takes effect only with refresh.enabled); the logo (fileupload, image); the active, development and offline access switches; the subject type (public or pairwise) and the sector identifier: a pairwise client must resolve a sector (wristband.SubjectSector), so one whose redirect URIs span two hosts without a sector identifier is refused on save instead of failing at sign-in.
  • One-time secret. Creating a client issues oas_ + 24 hex characters and an oas_cs_ secret (wristband.IssueOIDCClientCredentials); only the SHA-256 hash is stored. The plaintext is parked in classes.RevealStore (Park, Take) in the application cache (cooler.FromApp) under oauthserver:reveal:{admin id}:{record id} for classes.RevealTTL (5 minutes), and the form's secret partial takes it on its first read: the creating administrator sees it once, on that client only. The record action regenerate_secret (controllers.ActionRegenerateSecret, a danger action on the preview screen) replaces the hash, so the old secret fails at /oauth/token at once, and parks the new one the same way. The secret hash is never a field, a column or a JSON member. Multi-instance deployments need cache.driver: redis for the reveal to reach a request that lands on another instance; an administrator who misses the reveal regenerates the secret. The parked plaintext lives in that cache for at most five minutes.
  • Authorized users. The client form lists who consented to the client: name, email, the sub the client sees for them (its sector), the granted scopes, first authorized and last used. Read only; users revoke their own grants through the authorized-apps API.
  • Branding (controllers.BrandingControllerID, golem15.oauthserver.branding, needs manage_settings) is a singleton controller over row 1 of golem15_oauthserver_settings, linked from Settings (code oauthserver_branding), because a cabana settings form refuses file uploads. Fields: site name, logo, the seven colours (hex only), font stylesheet URL (https only), font family and custom CSS (at most 20000 characters). The pages sanitise every stored value again on render. The site logo is shown on the error pages, the client logo on the consent page.
  • The signing-key model is never an admin controller, form or list.

Importing from WinterCMS

oauthserver:import-winter moves a WinterCMS site's provider to the Go plugin without its relying parties noticing: the six PHP tables keep their ids, hashes and timestamps, and the PHP signing keys keep their kids (D-11), so pre-cutover id_tokens still verify against the new JWKS, live access tokens still read userinfo and every client keeps its secret.

  1. Import the users first (golem15.user's import), keeping their ids: the import aborts, naming the count, when a row references a user the application does not have.

  2. Export the provider tables from the PHP site's MariaDB/MySQL (read-only; check the table names first, see the header of the script):

    mysql -N -B --raw <database> < scripts/winter-export.sql > oauthserver.jsonl
    

    The file holds hashes and user ids, never a plaintext secret; keep it out of every repository and delete it afterwards.

  3. Copy the PHP key_dir (storage/app/oauthserver by default: keys.json, {kid}.key, {kid}.pub) to the Go host with its 0700/0600 modes.

  4. Import:

    ./app oauthserver:import-winter --file=oauthserver.jsonl --key-dir=/secure/oauthserver --dry-run
    ./app oauthserver:import-winter --file=oauthserver.jsonl --key-dir=/secure/oauthserver
    

    Add --settings=oauthserver.jsonl to copy the branding (the system_settings item golem15_oauthserver_settings) into settings row 1, and --uploads-dir=<winter>/storage/app/uploads to copy the client and site logos of the export's system_files lines into this application's storage (--uploads-dir needs --settings; the same export file serves both flags).

    --dry-run reports the rows per table and the kids without writing. Non-empty target tables (or kids the ring already holds) are refused unless --force, which replaces them in the same transaction. The id sequences move past the copied ids.

What the import writes:

  • golem15_oauthserver_clients, _subjects, _consents, _auth_requests, _auth_codes, _access_tokens, one transaction. Hashes (secret_hash, code_hash, token_hash, consent_token_hash) are SHA-256 hex in both implementations and are copied as they are. Imported clients are kind = oidc, subject_type = public, without offline access (D-17), with client_secret_basic; imported subjects are public (sector '').
  • With --key-dir, one golem15_oauthserver_keys row per kid of keys.json: the original kid, the public key, the private key encrypted with app.key (lagoon.NewEncrypted), created_at and retired_at from the manifest; only the manifest's active kid is active. A key whose private half does not match its .pub aborts the import. A key the Go ring generated before the import is retired (it stays verifiable for the grace window). The key directory is read and checked before any table is written.
  • With --settings, the branding keys PHP and Go share (unknown keys are reported and ignored, a value longer than its column is reported and skipped); with --uploads-dir, each logo file is stored through lagoon attach (read from {uploads-dir}/{partition}/{disk_name}, or its public/ and protected/ subdirectories) as the client's or the site's logo, replacing the previous one.
  • The output names tables, counts and kids, never a hash, a secret, a token or key material.

Environment mapping (PHP .env to the Go configuration):

PHP Go key Environment
OAUTHSERVER_ISSUER golem15.oauthserver.issuer SUMMER_GOLEM15__OAUTHSERVER__ISSUER
OAUTHSERVER_LOGIN_URL golem15.oauthserver.login_url SUMMER_GOLEM15__OAUTHSERVER__LOGIN_URL
OAUTHSERVER_ROTATION_GRACE_HOURS golem15.oauthserver.rotation_grace_hours SUMMER_GOLEM15__OAUTHSERVER__ROTATION_GRACE_HOURS
OAUTHSERVER_TTL_ID_TOKEN, _ACCESS_TOKEN, _AUTH_CODE, _AUTH_REQUEST golem15.oauthserver.ttl.id_token, .access_token, .auth_code, .auth_request SUMMER_GOLEM15__OAUTHSERVER__TTL__ID_TOKEN and so on
OAUTHSERVER_PICTURE_SIZE golem15.oauthserver.picture_size SUMMER_GOLEM15__OAUTHSERVER__PICTURE_SIZE

At cutover:

  • Keep the issuer identical (relying parties pin it).
  • Stop the PHP scheduler's oauthserver:prune cron; the Go plugin prunes on its own schedule.
  • Do not rotate keys within one hour of the cutover: relying parties cache the JWKS for up to an hour.
  • After verifying the cutover, delete the PHP key_dir and the copied key directory securely; the keys now live encrypted in the database.
  • When you later rotate app.key, keep the old key in app.previous_keys, or the imported keys become unreadable.

Security notes

  • The application key protects the signing keys. Private keys are encrypted with app.key. When you rotate app.key, keep the old key in app.previous_keys, or the ring becomes unreadable and every sign-in fails until new keys are generated (which relying parties will not trust until they refetch the JWKS).
  • Client secrets, codes and access tokens are stored as SHA-256 hex digests only, with the PHP prefixes (oas_cs_, oas_ac_, oas_at_), so imported hashes keep working.
  • The consent form carries a one-shot token bound to the parked request and the user; the pages are never framed (the engine sets X-Frame-Options: DENY and frame-ancestors 'none') and never cached.
  • Branding values are administrator input rendered to every visitor: they pass the sanitisers before they become CSS, and the custom CSS loses every tag opener until none is left (the PHP sanitiser's single pass could rebuild a </style> from <<</style>).
  • Nothing logs a secret, a code, a token or key material.

CLI commands

Command Flags What it does Example
oauthserver:import-winter --file, --key-dir, --settings, --uploads-dir, --force, --dry-run the WinterCMS cutover, see Importing from WinterCMS bin/<app> oauthserver:import-winter --file oauthserver.jsonl --key-dir winter/keys --dry-run
oauthserver:rotate-keys --prune promotes a new signing key (algorithm from key_algorithm) and retires the previous one, which stays in the JWKS and verifiable for rotation_grace_hours; --prune also deletes keys past the grace window. Prints PHP's lines (New signing key: {kid}, Retired previous key {kid} at {time} (verifiable for {n} more hours).); on failure only Key rotation failed: the signing key could not be generated or written. and a non-zero exit, never key material bin/<app> oauthserver:rotate-keys --prune
oauthserver:prune deletes authorization codes, access tokens (expired or revoked), authorization requests, refresh tokens (expired or revoked) and MCP codes more than one day (console.PruneMargin) past expiry, and the signing keys retired before the grace window; prints Authorization codes pruned: {n}, Access tokens pruned: {n}, Authorization requests pruned: {n}, Signing keys pruned: {n} (PHP's four lines), then Refresh tokens pruned: {n} and MCP codes pruned: {n}, and ends with Pruned {rows} expired rows and {keys} signing keys. bin/<app> oauthserver:prune

bin/<app> help <command> shows each command's long help and more examples. The plugin logs through the component oauthserver (log.components.oauthserver in config/log.yaml).

Schedule

oauthserver:prune runs daily. oauthserver:rotate-keys runs every rotation_interval when that key is set (2160h, 90 days, is a sensible value); it is off by default, and a value that is not a positive Go duration fails boot naming golem15.oauthserver.rotation_interval. The framework scheduler runs each job once per period across instances. Switching to ES256 is key_algorithm: ES256 plus a rotation: the JWKS then holds the RS256 and ES256 keys side by side until the grace window ends.

Dependencies

summercms v0.5.0 (backpack, bonfire, bouncer, diary, cabana, cooler, lagoon, lagoon/attach, pact, party, phrasebook, surf, towel, wristband), gocloud.dev/blob (the attachment bucket of the logo import), git.golem15.com/golem15/sm-user-plugin v0.1.11 (with classes.RequestUser, classes.EndRequestSession, classes.AvatarURL and classes.PrincipalByID), gorm.io/gorm, github.com/go-gormigrate/gormigrate/v2, github.com/jackc/pgx/v5. Tests only: github.com/golang-jwt/jwt/v5, github.com/testcontainers/testcontainers-go, and for the relying-party interop test github.com/coreos/go-oidc/v3 (v3.21.0) and golang.org/x/oauth2 (v0.37.0). No production file imports the last two.

During development go.work points summercms at ../summercms.go and sm-user-plugin at the checkout that carries the new exports.

Testing

go vet ./...
go test -short ./...                                   # no Docker
go test ./...                                          # also the Postgres tests (testcontainers)

The Postgres tests skip under -short. TestOIDCFlowSmoke signs a user in end to end (discovery, authorize with the session cookie, resume, consent, code exchange, id_token verified against the served JWKS, userinfo) and checks that the stored private key is ciphertext. TestKeyRingFirstKeyRaceSmoke races eight first-key calls and expects one active key. TestConsentPageBrandingSmoke covers the branding, escaping and framing headers, TestLoginHandoffAndSwitchSmoke the login handoff, account switching and the redirect consent mode, TestBucketKeysSmoke the throttle keys, TestRouteGuardSmoke that /oauth/{provider} routes of another plugin neither shadow nor are shadowed by the provider's paths, TestAuthorizationsSmoke the authorized-apps list and revocation, TestUserCascadeSmoke the delete and deactivate cascade, TestMCPStoreSmoke the MCP flow on the plugin's stores and the off switch, TestMCPConsentSmoke the MCP consent JSON (the backend_admin line and the backend grant with and without a link, the scope intersection, deny, unknown and foreign requests) and the revoked and deleted events, TestMCPTokenVerifierSmoke the resource-side verifier (valid token, OIDC-client token, revoked and expired tokens, revoked client, deactivated user, the last_used_at debounce), and TestMCPRevocationSmoke the revocation chain (a ban revokes the MCP and OIDC grants, the verifier and the refresh grant refuse, and an unlink revokes only the backend grant with a client-specific event). TestMCPVerifierRevocation pins the verifier and refresh refusals without a revoke listener (a token from before tokens_valid_after, the same-second cutoff, the untruncated Before of the access-revoked event, a ban written without moving the cutoff refusing both the verifier and the rotation until unbanned, a rotation of a token from before the cutoff, a deleted user), and TestMCPGrantRevocation the grant revocation (earlier MCP and OIDC tokens revoked and later ones kept, the consent and unused codes deleted, a self-service password change ending a grant its client rotated after the calling session's iat while the session survives, RemoveLink and a new SetLink revoking only backend tokens with client-specific events after the commit, the authorized-apps revoke event with its client). TestMCPBackendBinding pins the consented administrator: the 409 on a decision naming an administrator who is not linked now, backend_user_id from the code through the exchange and every rotation into pact.MCPGrant.BackendUserID, a directly minted grant recording the context's administrator, unexchanged backend codes deleted by a link change, and a revocation that waits for a rotation in flight and revokes its successor. TestMCPConsentAllowSerializesWithRevoke holds the user's grants lock in another transaction: the allow waits and writes nothing, and a revoke queued behind it removes the code and the consent the allow then wrote; TestMCPConsentFailureRollsBackCode shows that a failing consent write rolls the code back and leaves the request decidable. TestOIDCResumeSerializesWithRevoke, TestOIDCRefreshSerializesWithRevoke and TestOIDCExchangeSerializesWithRevoke park a silent resume, a refresh rotation and a code exchange mid-transaction: a revoke that lands then leaves no code or token for the pair, and the exchange does not deadlock with it; TestOIDCConsentAllowThenRevoke shows that a revoke queued behind a consent decision removes the consent and the code that decision issued.

TestImportWinterCutoverSmoke imports a WinterCMS export and a PHP-shaped key_dir and proves the cutover: both kids in the JWKS, pre-cutover id_tokens of either key verify, the old access token reads userinfo with the imported sub, the old client secret redeems an imported code and the new id_token carries the imported active kid, a second import is refused, and new rows get ids above the imported ones.

TestClientsAdminSmoke creates a client through cabana's admin API and checks the one-time reveal (once, only for the creating administrator, never on another client, never a hash in a list or a form), regenerate (the old secret fails at /oauth/token, the new one passes), the redirect URI round trip, the pairwise sector and loopback refusals, the authorized-users partial and the manage_clients permission. TestBrandingAdminSmoke opens the branding singleton from its Settings link, refuses a colour that is not hex, saves an accent colour and a site logo (both on the pages), uploads a client logo (on the consent page) and imports the Winter branding and its logo with ImportSettings.

TestRotateAndPruneSmoke rotates (new active kid, old kid still in the JWKS, a pre-rotation id_token still verifies), prunes rows on both sides of the one-day margin for every kind, prunes the retired key past the grace window, checks the PHP output lines and the fixed failure line. TestCommandsDocumented (no Docker) logs, without failing, each command whose help lacks a description, long help, examples or an option description (bonfire.CheckDocs). TestScheduleSmoke checks the default schedule, the scheduled rotation with rotation_interval: 2160h, and that soon and -1h fail boot.

The PHP parity suite (testdata/parity/, runbook in its README.md) holds ten tide spec flows of the relying-party-visible contract (discovery, JWKS, authorize errors, login handoff, consent allow, silent and deny, token and userinfo errors, authorized apps), the capture rules and the accepted deviations. TestPHPParityReplay replays the PHP recordings against the plugin and fails on any difference deviations.yaml does not explain; TestIDTokenShapeParity compares the id_token header members and claim set with the PHP id_token. Both skip with "no PHP recordings" until the flows are recorded, and fail instead with PHASE194_REQUIRE_PARITY=1. TestParityFixturesHoldNoSecrets checks that nothing under testdata/parity holds a secret, token, key or session cookie.

TestRelyingPartyInterop signs in with a stock relying party built on github.com/coreos/go-oidc/v3 and golang.org/x/oauth2, once against an RS256 ring and once against an ES256 ring: discovery, authorize with PKCE and a nonce, code exchange with client_secret_basic as x/oauth2 sends it, id_token and at_hash verified by the library, the nonce checked by the test (the library does not), userinfo with the same sub, and a silent second sign-in.

Versions

VersionFrameworkRequiresReleased
v0.1.8v0.6.7golem15.user v0.1.172026-11-21
v0.1.7v0.6.0golem15.user v0.1.172026-11-05
v0.1.6v0.6.0golem15.user v0.1.172026-10-30