Skip to main content

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 read DESIGN.md (§12 of DESIGN.md carries 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)​

AreaCapabilities
Identity & credentialsUser accounts (sign-up, sign-in, sign-out, email verification, password reset), sessions, app passwords, MFA factors (TOTP, backup codes), passkeys (WebAuthn), recovery flows
OAuth / OIDCAuthorization-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 substrateRoles (with hierarchy/nesting), groups, memberships, role assignment, API keys, OAuth client registry (including DCR + management), M2M scope grants
Consent grantsFAPI 2.0 standing consent records; tokens embed a grant id so revocation cascades
Enterprise federationOIDC and SAML connections for enterprise single sign-on
ProvisioningMembership provisioning API (roles/groups/users into a target environment) used by Sentin8:Sys for org/env/app provisioning; SCIM Bulk
Wallet credentialsOID4VCI-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 tokensTime-boxed, fully audited delegated-actor tokens for admin-assistant (sentin8or) flows
WebhooksWebhook endpoint registry, signed (HMAC) delivery with retries, delivery attempt history
Security profilesPer-platform / per-org / per-env security profile configuration (FAPI 2.0 default)
Brandable sign-inPer-tenant branded sign-in experience via branding metadata
Notification emailsTransactional email (via Sentin8:Post) - sign-up, reset, and MFA emails
AuditLocal audit journal with spill-to-Sys; admin audit query surface

What the service does NOT own (business boundary)​

Out of scopeOwner
Organization/environment/app recordsSentin8:Sys
Authorization policy storage & decisionsShield (Sentin8:Policy - storage substrate in Sys)
Sending emailsSentin8:Post (auth only enqueues + pushes post_outbox)
E-signature / QES ceremoniesSentin8:Sign (core platform service; auth contributes identity assurance + approval consent only)
Invitation recordsSentin8:Sys (auth proxies to sys)

3. Business Capabilities​

3.1 User Authentication​

CapabilityBusiness rule
Sign-upSelf-service registration with email verification; per-environment user uniqueness (email unique per env)
Sign-inPassword sign-in with anti-enumeration protection (uniform login failure; dummy bcrypt compare on unknown accounts)
Identifier-first sign-inThe 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 pageTenant-branded pages; a server-rendered HTML login additionally serves automated clients (conformance browsers, CI)
SessionsServer-verified sessions with expiry; sign-out and admin termination; every revocation pushes immediate invalidation events
Password resetSelf-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
PasskeysWebAuthn 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 passwordsPer-app passwords for apps without OAuth support
Enterprise SSOOIDC and SAML connections to enterprise IdPs; federated credentials
Bot protectionIP 10/min + email 5/min rate limits; 5 failures → durable account lockout

3.2 Token Issuance (all families)​

CapabilityBusiness rule
User access tokens900s lifetime (FAPI default), grant-bound
Refresh tokens30-day, rotated on use, replay detection (consumed jti denylist)
ID tokensOIDC 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 tokensAPI keys for non-OAuth programmatic access
Actor tokensTime-boxed (≤3600s), fully audited, revocable by jti
Delegated tokensCert-bound delegated access via the Delegation Gateway (act chain audits the origin user)
Authorization grantsStanding consent records per (env, user, client); idempotent - widened/narrowed not duplicated; grant_id embedded in tokens; revocation cascades
CIBADecoupled approval bound to the approving user's session; poll and ping delivery modes
Device flowCLI 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 exchangeOAuth token exchange grant (publisher/delegation paths)
IntrospectionHonest introspection - none-auth clients hard-rejected; signed JWT responses per profile
OIDC claim scopesAll 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
RevocationOAuth revocation with grant cascade; uniform protocol errors (no existence oracles)
Session-state surfaceThe 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 loginClients 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 channelsBeyond 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 bindingDPoP 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 issuanceSD-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​

CapabilityBusiness rule
UsersFull CRUD, status (active/suspended/archived/locked), role and group assignment, phone + postal-address profile data (feeds the phone/address claim scopes)
RolesFull CRUD, nesting (hierarchy), platform role catalog seeding
GroupsFull CRUD, membership + role binding
OAuth clientsFull CRUD, authentication method, grant types, TLS subject DN/thumbprint, consent requirement, DPoP exemption
Dynamic client registrationSelf-service client registration + management (read/update/delete) with a registration access token; secrets shown once
API keysIssuance and lifecycle management
Sessions adminListing, inspection, termination of any user's session
Provisioning APIIdempotent 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 adminPlatform/org/env-level security profile configuration
AuditAdmin-facing audit query surface

3.4 Notifications & Events​

CapabilityBusiness rule
Event emissionEvery 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
WebhooksSigned (HMAC-SHA256) delivery to registered endpoints with retry (exponential backoff ×5) and attempt history
EmailsTransactional emails (verification, reset, MFA) delivered via Sentin8:Post
Session invalidationsentin8:auth:session:revoked pushed for every revocation path; the BFF session-reaper consumes them so cached sessions die immediately
Grant eventsStanding-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}.

EventWhen
sentin8:auth:user:created/updated/deletedUser lifecycle
sentin8:auth:role:created/updated/deletedRole lifecycle
sentin8:auth:group:created/updated/deletedGroup lifecycle
sentin8:auth:client:created/updated/deletedOAuth client lifecycle
sentin8:auth:credential:issued/revokedWallet credential lifecycle
sentin8:auth:apikey:created/revokedAPI key lifecycle
sentin8:auth:session:revoked/terminatedSession end; session:revoked carries a payload-complete envelope so BFF kills cached sessions immediately
sentin8:auth:membership:changedGroup/role membership provisioning
sentin8:auth:dcr:registeredDynamic client registration
sentin8:auth:connection:created/updated/deletedEnterprise connection lifecycle
sentin8:auth:mfa:enabled/disabledMFA factor changes
sentin8:auth:passkey:enrolled/removedPasskey lifecycle
sentin8:auth:actortoken:issued/revokedActor token lifecycle
sentin8:auth:securityprofile:updatedSecurity profile changes
sentin8:auth:webhook:created/updated/deletedWebhook endpoint lifecycle
sentin8:auth:grant:recorded/revokedConsent grant lifecycle
sentin8:auth:ciba:createdCIBA 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)​

  1. Single issuer. No other service mints tokens or publishes JWKS.
  2. M2M tokens are certificate-bound by default - a stolen token without the private key is useless.
  3. Authorization decisions are live - no roles/groups embedded in JWTs; Shield resolves per request.
  4. Refresh token replay is detectable and denied - rotation + jti denylist.
  5. No existence oracles - uniform error responses prevent email/client-method enumeration.
  6. Tenant-scoped uniqueness - emails/roles/groups unique per (env_id, …).
  7. Actor tokens are time-boxed (≤ 3600s) and fully audited; revocable by jti.
  8. Signing keys are encrypted at rest; a wrong/rotated master key refuses boot.
  9. No unsafe code in the service.
  10. Session/grant/admin tenant resolution happens inside one transaction (RLS context is transaction-local).
  11. Webhook deliveries and audit events ride the durable outbox - never fire-and-forget HTTP.
  12. CIBA approval binds to the approving session - approval cannot be replayed across sessions.
  13. DCR for client_credentials requires an mTLS client certificate - there is no plaintext M2M credential path.
  14. 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).
  15. DPoP proofs are single-use within their window, keyed per client key - replayed or cross-client proofs are rejected.
  16. Client registration secrets appear exactly once (at registration time) and are never echoed back by reads or logged.

6. Target-User Roles & Use Cases​

PersonaWhat they do with Sentin8:Auth
End userSigns in/out, manages own MFA, passkeys, app passwords, sessions, consents, password reset
Platform / org adminCreates users, assigns roles/groups, manages OAuth clients, API keys, security profiles, webhooks, sessions
Enterprise IdP / directorySCIM provisioning of users and groups; OIDC/SAML enterprise federation
Developer / CLI userDevice flow sign-in; API keys for programmatic access
Native appOAuth flows for mobile/desktop apps; app passwords for non-OAuth legacy
Wallet holderReceives/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 RPEmbeds the OP status iframe and reacts to live session changes (single sign-on status tracking)
Conformance auditorDrives 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:DBPostgreSQL persistence (schema auth)
Sentin8:BusPublishing identity lifecycle events (local outbox → Bus produce)
Sentin8:PostTransactional email delivery (verification/reset/MFA)
Sentin8:SysAudit spill; provisioning callbacks; invitations proxy
ValkeyAuth codes, PAR, CIBA, device codes, denylists, nonce TTLs, rate/lockout counters
Shield (Sentin8:Policy)Authorization decisions on admin endpoints (roles resolved live)
Sentin8:AcmePlatform certificates (incl. the M2M workload certs)
Sentin8:AppOwner-API lookup for customer-mode instances at sign-up provisioning

9. Acceptance Criteria (what "done" looks like for the business)​

  1. A brand-new user can self-register, verify email, sign in, enroll MFA and passkeys, and recover access via self-service reset.
  2. An admin can create users/roles/groups/clients, assign permissions, and see the effect on the next request (no token-expiry wait).
  3. A backend workload can register via DCR with a certificate and source cert-bound tokens; a stolen token alone grants nothing.
  4. Revoking a session kills cached downstream access immediately (BFF session-reaper via sentin8:auth:session:revoked).
  5. 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.
  6. 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).
  7. 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.
  8. SCIM directory sync provisions users/groups without bespoke connectors, including Bulk.
  9. Enterprise SSO works via OIDC federation (SAML beyond metadata/ACS is a declared non-goal).
  10. Every lifecycle change emits a payload-complete domain event; a Bus outage never loses events (outbox durability).
  11. Emails (verification/reset/MFA) arrive via Sentin8:Post.
  12. All admin surfaces are exposed via SDUI admin UI pages.
  13. Build clean, zero warnings; all service tests pass; every OIDF profile in scope is conformance-green locally before submission.
  14. 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.
  15. 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_request endpoint returns NOT IMPLEMENTED until that integration lands.
  • Webhook deliveries gain a DLQ replay surface mirroring post's replay_dlq shape.
  • 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.