Skip to content

server: Valkey adapter for OidcAuthorizationStore and Postgres adapter for FederatedAccounts #460

Description

@justin13888

Follow-up to #407 (PR #459), which lands the OIDC relying party with in-memory adapters only.

What is owed

  1. store::OidcAuthorizationStore — Valkey adapter. The pending authorization (state → nonce, PKCE verifier, redirect URI, issued_at) with the store's fixed ten-minute TTL and a destructive consume (a GETDEL, or GET + DEL in one MULTI). Register it on ValkeyStores and drop the Option from store::conformance::Harness::oidc_authorizations() together with the run_all skip — both exist only so a container-backed harness written before this adapter keeps compiling.
  2. auth::oidc::FederatedAccounts — Postgres adapter, over the same account table as AccountDirectory/AccountRegistry/AccountProfiles. resolve_or_create is one statement: look up (issuer, subject); if absent and the asserted address already has a row, AddressTaken; otherwise insert an account row with a null credential and the federated link. The adapter contract: an account row whose credential is null makes AccountDirectory::authenticate and authenticate_user return Refused (after the timing-equalized miss), never Granted — "no password for OIDC accounts" made structural. Add that as a suite row beside the port.
  3. The development profile. auth::oidc::InMemoryFederatedAccounts holds its own rows, separate from auth::accounts_memory::InMemoryAccounts, because the two live in different files and the lane that wrote it could not edit the latter. Consequences under serve --memory today: an OIDC identity whose address matches a password account is not refused with 409 error.auth.oidc_address_taken, and an OIDC account has no profile row (GET /v1/auth/profile answers 404 for it). Fold the federated rows into InMemoryAccounts (an Option<String> credential, a (issuer, subject) index) so the development profile has the same shape as Postgres.

Until then

boot::assemble refuses OIDC_ISSUER under the durable backends by name (BootError::AdapterUnavailable { key: "OIDC_ISSUER", .. }), so a durable profile never mixes an in-memory ceremony double (design/filesystem/server.md).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions