OAuth/OIDC Integration Profile
Candidate profile — 2 August 2026 This document describes the target integration contract and the currently intended first-client topology. It is not a public claim that every OIDC discovery endpoint or grant is already available.
Objective
Section titled “Objective”ANUKA needs reusable sign-in without turning identity into blanket authorization, cross-product surveillance, or a global reputation system.
The governing rule is:
Authenticate a person at the right boundary; authorize every product action at the product boundary.
auth.anuka.pro is the user-facing login and consent host. The first relying product is ANUKA Goals at goals.anuka.pro. The authorization service behind the consent host issues and validates the authorization result; the product owns its own session, data, and permissions.
Roles and current first-client topology
Section titled “Roles and current first-client topology”| Role | Initial value | Responsibility |
|---|---|---|
| Authorization/consent host | https://auth.anuka.pro | sign-in, account recovery, consent display, safe handoff |
| OAuth/OIDC authorization service | configured service behind the consent host | authorization request, authorization code, token issuance and revocation |
| Relying party / client | https://goals.anuka.pro | user experience, local session, product authorization and data |
| Registered callback | https://goals.anuka.pro/auth/callback | exact code-and-state return endpoint |
The exact issuer, discovery URL, signing key set, token endpoint, and client-registration mechanism must be recorded in ADR-001 through ADR-003 before claiming full OIDC discovery conformance.
Browser authorization-code flow
Section titled “Browser authorization-code flow”Interactive authorization flow
One consented handoff, not blanket access
Select a step to see the security boundary that must hold before the flow continues.
User
Start. A person chooses sign-in in ANUKA Goals.
Security boundary Goals must begin a new, product-scoped authorization transaction.
Goals
Prepare. Goals creates state, nonce, and a PKCE verifier and challenge.
Security boundary Secrets and correlation values stay bound to the local browser session.
Goals
Request. Goals sends an authorization request with its client ID, exact callback, scope, state, and PKCE challenge.
Security boundary The redirect URI and requested scope must match the registered client record.
auth.anuka.pro
Consent. The login and consent surface identifies the client, destination, requested scope, and cancellation route.
Security boundary The person can understand and decline the request before any product session exists.
User
Decision. The person approves or denies the consent request.
Security boundary Approval is purpose-bound; denial returns a safe error rather than partial access.
Authorization service
Callback. The service returns an authorization code and state, or an error, only to the exact registered callback.
Security boundary No open redirect or user-supplied destination can influence this handoff.
Goals
Validate. Goals validates state and nonce and binds the code to the originating session.
Security boundary A mismatched, expired, or replayed response stops the flow.
Goals
Exchange. Goals exchanges the code with the PKCE verifier; confidential credentials remain server-side.
Security boundary The browser never receives a confidential client secret.
Authorization service
Claims. The service issues tokens or claims for the registered audience.
Security boundary Goals validates issuer, audience, signature, expiry, client, nonce, and binding before use.
Goals
Local session. Goals creates its own product-local session and authorizes only product actions.
Security boundary Authentication does not grant access to other ANUKA products or data.
- 1. Start. A person chooses sign-in in ANUKA Goals.
- 2. Prepare. Goals creates state, nonce, and a PKCE verifier and challenge.
- 3. Request. Goals sends an authorization request with its client ID, exact callback, scope, state, and PKCE challenge.
- 4. Consent. The login and consent surface identifies the client, destination, requested scope, and cancellation route.
- 5. Decision. The person approves or denies the consent request.
- 6. Callback. The service returns an authorization code and state, or an error, only to the exact registered callback.
- 7. Validate. Goals validates state and nonce and binds the code to the originating session.
- 8. Exchange. Goals exchanges the code with the PKCE verifier; confidential credentials remain server-side.
- 9. Claims. The service issues tokens or claims for the registered audience.
- 10. Local session. Goals creates its own product-local session and authorizes only product actions.
Mandatory safeguards
Section titled “Mandatory safeguards”- Use authorization code with PKCE (
S256) for browser and native public clients. Do not use the implicit flow. - Register exact redirect URIs; reject wildcards, fragments, open redirects, and unregistered schemes except separately approved native-app patterns.
- Generate high-entropy
state; validate it before accepting a response. Use and validatenoncefor OIDC ID tokens. - Bind the authorization code to the client, redirect URI, PKCE challenge, user session, and short expiry. Never log authorization codes, verifier values, access tokens, refresh tokens, or goal content.
- Treat
auth.anuka.proredirects as security-sensitive allowlists. User-providedredirect_tomust never determine an arbitrary destination. - Keep confidential client secrets server-side. A browser exchanges via a same-origin backend when client authentication is required; it never receives the secret.
- Validate issuer, audience, signature, expiry, authorized party/client, nonce where applicable, and token binding before creating a client session.
- Rotate signing and client credentials; publish a revocation, logout, recovery, and incident path.
Minimal claims and scopes
Section titled “Minimal claims and scopes”The first client asks for the smallest account-access information necessary to create a local Goals session.
| Item | Initial policy |
|---|---|
| stable subject | a pairwise or otherwise product-scoped subject is preferred; do not expose a universal public identifier by default |
| profile fields | no optional profile, organization, reputation, or contribution claims without a documented product need and consent |
| request only if required for account recovery, notification, or another documented purpose | |
| scopes | narrow account/session scope; any product API scope is separately named, limited, and revocable |
| assurance | Goals begins at A1 account-controlled participation; sensitive actions may add explicit step-up later |
Authentication success alone does not prove legal identity, organizational authority, eligibility, reputation, or consent to share data with another product.
Consent, session, logout, and recovery
Section titled “Consent, session, logout, and recovery”The consent screen must identify the client, exact redirect destination, requested scope, and cancellation route in understandable language. A previous grant does not override a changed client, redirect URI, scope, purpose, or material policy change.
Goals maintains its own product-local session. Single logout and back-channel logout are deferred until an ADR defines the security and user-experience semantics. A user must be able to sign out of Goals without implying deletion of the shared account; deletion and recovery are purpose- and service-specific.
Client registration and operations
Section titled “Client registration and operations”Initial registration is manual and reviewable. Every client record has an owner, product, environment, exact redirect URIs, allowed grants, scopes, token lifetime policy, audience/resource policy, data purpose, support contact, and review date. Register development, preview, and production clients separately. Disable a client immediately when its ownership or redirect safety is uncertain.
The authorization host and the first client must test approval, denial, expired request, expired code, PKCE failure, state/nonce mismatch, redirect mismatch, account recovery, logout, revoked grant, and unavailable-service states. Security events capture minimal metadata necessary to investigate; product content remains outside identity logs.
Interoperability path
Section titled “Interoperability path”The first implementation may operate with a configured authorization endpoint and a consent UI before all OIDC discovery endpoints are published. When discovery is adopted, publish and version the issuer configuration, authorization endpoint, token endpoint, JWKS URI, supported response/grant types, PKCE methods, scopes, claims, authentication methods, and end-session/revocation endpoints only after they are verified in production-like tests.