Sentin8:Auth - Business Requirements & Functionality
Audience: product owners, business analysts, and anyone evaluating what Sentin8:Auth does for the business. For architecture read
README.md; for wire-level detail readDESIGN.md(§12 ofDESIGN.mdcarries the full standards register each rule below is built on).
1. Business Purpose
Sentin8:Auth is the platform's single identity plane. It is the only issuer of every credential the platform trusts - no other service can mint tokens or publish signing keys. The business value it delivers:
- One sign-in plane for every product. A single user identity works across the platform dashboard, native apps, CLI, and every vertical - users sign in once, tokens are issued per product with the exact permissions that user holds.
- Regulatory-grade security posture by default. Financial-grade (FAPI 2.0 security profiles), sender-constrained tokens (DPoP and mTLS certificate binding), and post-quantum signing keys are the default posture - not add-ons.
- Zero-trust authorization. A user's actual permissions are resolved live at request time; demoting an employee takes effect on their next request, not at token expiry. Revoking a session kills downstream cached access immediately (push-based invalidation).
- Enterprise-ready workforce identity. SCIM 2.0 provisioning, OIDC and SAML enterprise federation, and passkey/MFA authentication out of the box.
- Digital wallet credentials. Issuance and verification of SD-JWT wallet credentials (EUDI-style) for regulated use cases.
- Certified conformance. The service is conformance-tested against the OIDF suite locally per profile (OIDC Core Basic/Config/Dynamic, Logout, Session Management, Third-Party-Initiated Login, the joint Back-Channel + RP-Initiated Logout plan, the Implicit + Hybrid + Form-Post OP families, FAPI 2 Security Profile + Message Signing, FAPI 1 Advanced, CIBA poll + ping, OID4VCI issuer + OID4VCI HAIP issuer (client-attestation wallets), OID4VP verifier, eKYC-IDA) with a zero-warning gate before any certification submission - every module-variant terminal green, no sanctioned failures or skips.
2. Business Scope (What the Service Provides)
| Area | Capabilities |
|---|---|
| Identity & credentials | User accounts (sign-up, sign-in, sign-out, email verification, password reset), sessions, app passwords, MFA factors (TOTP, backup codes), passkeys (WebAuthn), recovery flows |
| OAuth / OIDC | Authorization-code + PKCE, refresh rotation with replay detection (unconditional issuance under every sender-constrained profile - FAPI, CIBA, OID4VCI HAIP - with the attestation instance-key binding across refreshes), device code flow, CIBA (decoupled approval, poll + ping), token exchange, client credentials (M2M), PAR, JAR request objects, JARM, introspection (JSON + signed JWT), revocation, userinfo, issuer response parameter, the implicit + hybrid + form-post response channels (per security profile), and logout signaling: RP-initiated, Back-Channel (sid-bound fan-out to exactly the RPs the session logged in) and the OIDC Session Management state surface |
| RBAC substrate | Roles (with hierarchy/nesting), groups, memberships, role assignment, API keys, OAuth client registry (including DCR + management), M2M scope grants |
| Consent grants | FAPI 2.0 standing consent records; tokens embed a grant id so revocation cascades |
| Enterprise federation | OIDC and SAML connections for enterprise single sign-on |
| Provisioning | Membership provisioning API (roles/groups/users into a target environment) used by Sentin8:Sys for org/env/app provisioning; SCIM Bulk |
| Wallet credentials | OID4VCI-style credential issuance (config + identifier forms, nonce, batch), SD-JWT selective disclosure, mdoc (ISO/mSO) credentials under the ISO 18013-5 certificate profile (document-signer certificates with the mdoc EKU + CRL-backed revocation, per-issuing-CA CRL publication), key binding (incl. key attestation verification), status lists (revocation); OID4VP presentation verification (signed DCQL request objects, encrypted direct-post responses, key-binding + trusted-issuer + status checks) |
| Actor tokens | Time-boxed, fully audited delegated-actor tokens for admin-assistant (sentin8or) flows |
| Webhooks | Webhook endpoint registry, signed (HMAC) delivery with retries, delivery attempt history |
| Security profiles | Per-platform / per-org / per-env security profile configuration (FAPI 2.0 default) |
| Brandable sign-in | Per-tenant branded sign-in experience via branding metadata |
| Notification emails | Transactional email (via Sentin8:Post) - sign-up, reset, and MFA emails |
| Audit | Local audit journal with spill-to-Sys; admin audit query surface |
What the service does NOT own (business boundary)
| Out of scope | Owner |
|---|---|
| Organization/environment/app records | Sentin8:Sys |
| Authorization policy storage & decisions | Shield (Sentin8:Policy - storage substrate in Sys) |
| Sending emails | Sentin8:Post (auth only enqueues + pushes post_outbox) |
| E-signature / QES ceremonies | Sentin8:Sign (core platform service; auth contributes identity assurance + approval consent only) |
| Invitation records | Sentin8:Sys (auth proxies to sys) |
3. Business Capabilities
3.1 User Authentication
| Capability | Business rule |
|---|---|
| Sign-up | Self-service registration with email verification; per-environment user uniqueness (email unique per env) |
| Sign-in | Password sign-in with anti-enumeration protection (uniform login failure; dummy bcrypt compare on unknown accounts) |
| Identifier-first sign-in | The hosted sign-in asks for the email first, then shows the right credential step for that account: password, passkey, or MFA expectation. Unknown emails get the same experience shape so the flow never tells probers more than sign-up already does, and the same abuse limits throttle it |
| Branded login page | Tenant-branded pages; a server-rendered HTML login additionally serves automated clients (conformance browsers, CI) |
| Sessions | Server-verified sessions with expiry; sign-out and admin termination; every revocation pushes immediate invalidation events |
| Password reset | Self-service reset tokens with expiry and one-time use |
| MFA (TOTP) | Enrollment, verify, disable; secrets encrypted at rest; a TOTP user's sign-in session stays "pending MFA" (usable for nothing else) until their authenticator code activates it - the second factor gates every session-authenticated action, including device approval |
| Passkeys | WebAuthn enrollment + verification (passwordless login). A user with an active passkey can sign in with the passkey alone - the account's credential step offers it directly |
| App passwords | Per-app passwords for apps without OAuth support |
| Enterprise SSO | OIDC and SAML connections to enterprise IdPs; federated credentials |
| Bot protection | IP 10/min + email 5/min rate limits; 5 failures → durable account lockout |
3.2 Token Issuance (all families)
| Capability | Business rule |
|---|---|
| User access tokens | 900s lifetime (FAPI default), grant-bound |
| Refresh tokens | 30-day, rotated on use, replay detection (consumed jti denylist) |
| ID tokens | OIDC ID tokens with nonce/at_hash/c_hash/s_hash bindings; OIDC claim scopes honored |
| M2M (client_credentials) | Certificate-bound by default; mTLS-only registration path; a stolen token alone grants nothing |
| API-client tokens | API keys for non-OAuth programmatic access |
| Actor tokens | Time-boxed (≤3600s), fully audited, revocable by jti |
| Delegated tokens | Cert-bound delegated access via the Delegation Gateway (act chain audits the origin user) |
| Authorization grants | Standing consent records per (env, user, client); idempotent - widened/narrowed not duplicated; grant_id embedded in tokens; revocation cascades |
| CIBA | Decoupled approval bound to the approving user's session; poll and ping delivery modes |
| Device flow | CLI and device-based sign-in (RFC 8628): the device displays a short code + verification URL; the user opens the URL on a second device (typed code or complete-link), signs in there - including MFA - and approves or DENIES; only a fully-authenticated (MFA-complete) session can approve |
| Token exchange | OAuth token exchange grant (publisher/delegation paths) |
| Introspection | Honest introspection - none-auth clients hard-rejected; signed JWT responses per profile |
| OIDC claim scopes | All four claim scopes (email, profile, phone, address) are advertised and served: the consented scope selects the claim family; every advertised scope is demonstrable end-to-end, and delivers nothing when not consented |
| Revocation | OAuth revocation with grant cascade; uniform protocol errors (no existence oracles) |
| Session-state surface | The OP tracks per-session login state for the embedded status iframe: an Relying Party can live-poll whether its session is unchanged or changed; the state is minted on every interactive sign-in, destroyed with the logout (logout is therefore observable the moment it happens), and id_tokens carry the session id so the Back-Channel Logout token matches |
| Third-party-initiated login | Clients can register an https initiate-login URI through dynamic registration or client management; the contract is validated and echoed back at both registration surfaces |
| Response channels | Beyond the standard code redirect, per-profile environments serve the legacy fragment channels (implicit / hybrid response types at the authorize response) and the form-post channel (a 200 auto-submit HTML form to the client callback, no code/error in the URL) - each certified by its own OIDF plan; the standard platform profile keeps the code-only OAuth 2.1 posture |
| Token binding | DPoP proof validation with jti replay protection; mTLS cert thumbprint binding; HTTP message signatures (FAPI2-MS); the PAR-to-token sender-constraint journey - the key bound at the pushed request must be the key at the token endpoint (mismatch = rejected grant); a reused request_uri after an authorization outcome is refused; an unresolvable or foreign (different client) request_uri rejects with the OAuth error redirect invalid_request_uri on the client's registered callback - the browser-driven RP always receives the error back, never an off-callback JSON body |
| Wallet/SD-JWT issuance | SD-JWT selective disclosure, key binding (embedded jwk, key attestation verified against exactly one trusted key), status-list revocation enforcement, hour-rounded time claims (batch linkability protection) |
3.3 RBAC & Client Administration
| Capability | Business rule |
|---|---|
| Users | Full CRUD, status (active/suspended/archived/locked), role and group assignment, phone + postal-address profile data (feeds the phone/address claim scopes) |
| Roles | Full CRUD, nesting (hierarchy), platform role catalog seeding |
| Groups | Full CRUD, membership + role binding |
| OAuth clients | Full CRUD, authentication method, grant types, TLS subject DN/thumbprint, consent requirement, DPoP exemption |
| Dynamic client registration | Self-service client registration + management (read/update/delete) with a registration access token; secrets shown once |
| API keys | Issuance and lifecycle management |
| Sessions admin | Listing, inspection, termination of any user's session |
| Provisioning API | Idempotent upserts of roles, role nesting, groups, group roles, group members, user roles into a target environment (env-scoped header) |
| Admin UI (SDUI) | Server-Driven UI pages for all admin surfaces |
| Security profiles admin | Platform/org/env-level security profile configuration |
| Audit | Admin-facing audit query surface |
3.4 Notifications & Events
| Capability | Business rule |
|---|---|
| Event emission | Every identity lifecycle change (user/role/group/client/apikey/session/membership/dcr/connection/mfa/passkey/actortoken/securityprofile/webhook/grant/ciba) emits a payload-complete domain event via the local outbox, in the same transaction as the change |
| Webhooks | Signed (HMAC-SHA256) delivery to registered endpoints with retry (exponential backoff ×5) and attempt history |
| Emails | Transactional emails (verification, reset, MFA) delivered via Sentin8:Post |
| Session invalidation | sentin8:auth:session:revoked pushed for every revocation path; the BFF session-reaper consumes them so cached sessions die immediately |
| Grant events | Standing-consent creation/revocation emitted as the seed of open-banking grant truth for downstream consent authorities |
4. Business Events (Outbound)
Event family auth; names follow sentin8:auth:{resource}:{operation}.
| Event | When |
|---|---|
sentin8:auth:user:created/updated/deleted | User lifecycle |
sentin8:auth:role:created/updated/deleted | Role lifecycle |
sentin8:auth:group:created/updated/deleted | Group lifecycle |
sentin8:auth:client:created/updated/deleted | OAuth client lifecycle |
sentin8:auth:credential:issued/revoked | Wallet credential lifecycle |
sentin8:auth:apikey:created/revoked | API key lifecycle |
sentin8:auth:session:revoked/terminated | Session end; session:revoked carries a payload-complete envelope so BFF kills cached sessions immediately |
sentin8:auth:membership:changed | Group/role membership provisioning |
sentin8:auth:dcr:registered | Dynamic client registration |
sentin8:auth:connection:created/updated/deleted | Enterprise connection lifecycle |
sentin8:auth:mfa:enabled/disabled | MFA factor changes |
sentin8:auth:passkey:enrolled/removed | Passkey lifecycle |
sentin8:auth:actortoken:issued/revoked | Actor token lifecycle |
sentin8:auth:securityprofile:updated | Security profile changes |
sentin8:auth:webhook:created/updated/deleted | Webhook endpoint lifecycle |
sentin8:auth:grant:recorded/revoked | Consent grant lifecycle |
sentin8:auth:ciba:created | CIBA flow creation |
Inbound (consumed): none on the protocol path - auth is a producer on the Bus and a consumer of no upstream domain state (its dependency plane is certs/Auth-local identity, DB, Valkey, and the owner-API seeds only).
5. Business Rules & Invariants (the "always true" guarantees)
- Single issuer. No other service mints tokens or publishes JWKS.
- M2M tokens are certificate-bound by default - a stolen token without the private key is useless.
- Authorization decisions are live - no roles/groups embedded in JWTs; Shield resolves per request.
- Refresh token replay is detectable and denied - rotation + jti denylist.
- No existence oracles - uniform error responses prevent email/client-method enumeration.
- Tenant-scoped uniqueness - emails/roles/groups unique per
(env_id, …). - Actor tokens are time-boxed (≤ 3600s) and fully audited; revocable by jti.
- Signing keys are encrypted at rest; a wrong/rotated master key refuses boot.
- No
unsafecode in the service. - Session/grant/admin tenant resolution happens inside one transaction (RLS context is transaction-local).
- Webhook deliveries and audit events ride the durable outbox - never fire-and-forget HTTP.
- CIBA approval binds to the approving session - approval cannot be replayed across sessions.
- DCR for
client_credentialsrequires an mTLS client certificate - there is no plaintext M2M credential path. - No per-pass identity churn in background pushers - long-lived pushers bind their identity for the process lifetime (self-heal on 401, not per-pass rebuilds).
- DPoP proofs are single-use within their window, keyed per client key - replayed or cross-client proofs are rejected.
- Client registration secrets appear exactly once (at registration time) and are never echoed back by reads or logged.
6. Target-User Roles & Use Cases
| Persona | What they do with Sentin8:Auth |
|---|---|
| End user | Signs in/out, manages own MFA, passkeys, app passwords, sessions, consents, password reset |
| Platform / org admin | Creates users, assigns roles/groups, manages OAuth clients, API keys, security profiles, webhooks, sessions |
| Enterprise IdP / directory | SCIM provisioning of users and groups; OIDC/SAML enterprise federation |
| Developer / CLI user | Device flow sign-in; API keys for programmatic access |
| Native app | OAuth flows for mobile/desktop apps; app passwords for non-OAuth legacy |
| Wallet holder | Receives/holds SD-JWT wallet credentials; presents them for verification |
| Backend service (out-of-band M2M) | Registers via DCR with a certificate; sources cert-bound tokens |
| Relying party (verifier) | Verifies presented credentials via the OID4VP verifier surface |
| Admin assistant (sentin8or) | Operates via time-boxed actor tokens |
| Verifier relying party (credential checker) | Creates signed OID4VP presentation requests and verifies presented wallet credentials through the verifier surface |
| Session-aware RP | Embeds the OP status iframe and reacts to live session changes (single sign-on status tracking) |
| Conformance auditor | Drives the OIDF suite against the local rig to certify each profile |
7. KPIs / Success Criteria
- Security: zero plaintext M2M credentials; refresh-token replay attempts denied; no account-enumeration oracles; TOTP secrets encrypted at rest.
- Availability: identity plane outage = platform outage - health endpoint up, JWKS continuously available, boot fails closed on missing master key.
- Authorization freshness: role/consent changes take effect on the next request; session revocation kills cached access immediately.
- Compliance: FAPI 2.0 posture by default; post-quantum-signed keys; status-list revocation enforced.
- Conformance: every certified profile runs zero FAILED / INTERRUPTED / SKIPPED / WARNING locally before submission (no-skip rule).
8. Dependencies & Reliance on Other Services
| The business relies on… | For |
|---|---|
| Sentin8:DB | PostgreSQL persistence (schema auth) |
| Sentin8:Bus | Publishing identity lifecycle events (local outbox → Bus produce) |
| Sentin8:Post | Transactional email delivery (verification/reset/MFA) |
| Sentin8:Sys | Audit spill; provisioning callbacks; invitations proxy |
| Valkey | Auth codes, PAR, CIBA, device codes, denylists, nonce TTLs, rate/lockout counters |
| Shield (Sentin8:Policy) | Authorization decisions on admin endpoints (roles resolved live) |
| Sentin8:Acme | Platform certificates (incl. the M2M workload certs) |
| Sentin8:App | Owner-API lookup for customer-mode instances at sign-up provisioning |
9. Acceptance Criteria (what "done" looks like for the business)
- A brand-new user can self-register, verify email, sign in, enroll MFA and passkeys, and recover access via self-service reset.
- An admin can create users/roles/groups/clients, assign permissions, and see the effect on the next request (no token-expiry wait).
- A backend workload can register via DCR with a certificate and source cert-bound tokens; a stolen token alone grants nothing.
- Revoking a session kills cached downstream access immediately (BFF
session-reaper via
sentin8:auth:session:revoked). - Every OAuth/OIDC flow works per profile: PKCE, refresh rotation with replay detection, device, CIBA (poll + ping), introspection, revocation, userinfo, back-channel logout, PAR, signed request objects, issuer response parameter.
- Every OIDC claim scope advertised in discovery (
email,profile,phone,address) delivers its claim family when consented - and delivers nothing when not consented; the conformance suite runs zero SKIPPED tests against the platform (no-skip rule). - Wallet credential issuance (both configuration forms + nonce + batch) and SD-JWT verification with key binding (attestation-verified) and status-list revocation work end-to-end, certified by the OID4VCI issuer plan.
- SCIM directory sync provisions users/groups without bespoke connectors, including Bulk.
- Enterprise SSO works via OIDC federation (SAML beyond metadata/ACS is a declared non-goal).
- Every lifecycle change emits a payload-complete domain event; a Bus outage never loses events (outbox durability).
- Emails (verification/reset/MFA) arrive via Sentin8:Post.
- All admin surfaces are exposed via SDUI admin UI pages.
- Build clean, zero warnings; all service tests pass; every OIDF profile in scope is conformance-green locally before submission.
- A verifier relying party can request a wallet credential presentation and receive a verified, revocation-checked answer (key binding + trusted-issuer signature + status list) with the wallet always answered - success points at its redirect URI, errors consume the request once.
- An embedded session-status iframe reports unchanged/changed for its RP session, and the state flips at logout - no staleness window.
10. Open Business Questions
- QES e-signature ceremonies are owned by the core platform's
Sentin8:Sign service; the
signature_requestendpoint returns NOT IMPLEMENTED until that integration lands. - Webhook deliveries gain a DLQ replay surface mirroring post's
replay_dlqshape. - Continuous access evaluation: risk-signal gating of new token issuance layers on top of the live authorization already implemented.
- Hardware-backed key attestation (WebAuthn attestation conveyance) as the wallet-proof trust anchor beyond x5c self-consistency.
Architecture & Design: sentin8:auth and its underlying concepts were designed by Hamid Jahanzad.