redb.Identity capabilities

redb.Identity is an OAuth 2.1 and OpenID Connect server for .NET, built on OpenIddict 7 and redb.Route, under Apache 2.0. Every endpoint is a route, reachable over HTTP, gRPC or SOAP, or directly from another module in the same process. Its data lives in redb on PostgreSQL, SQL Server or SQLite.

What it is and how it ships

  • An OAuth 2.1 / OpenID Connect server for .NET, built on OpenIddict 7 and redb.Route; Apache 2.0.
  • Every endpoint is a direct-vm:// route (constants in IdentityEndpoints, for example direct-vm://identity-token); another module in the same process calls it without HTTP.
  • Transport facades on the same routes:
    • HTTP/HTTPS (redb.Identity.Http);
    • gRPC (redb.Identity.Grpc, service identity.v1.Identity);
    • WS-Trust over SOAP (redb.Identity.Soap: Issue, Validate, Cancel, Renew; WSDL on GET; refuses to start without TLS).
  • NuGet packages: redb.Identity.Core, .Http, .Grpc, .Soap, .Management, .Contracts, .Client, .DataProtection, .Core.Module, .Ldap, .Resource.Dpop.
  • redb.Tsak modules (.tpkg) with the contexts identity.contracts, identity.core, identity.http, identity.grpc (optional) and identity.soap (optional), configured by context.json.
  • Self-hosting without Tsak: services.AddRedbIdentityHost() and RedbIdentityHost.StartAsync(provider, configuration, ...).
  • The start fails with the missing key named (Identity:Issuer; a key source).
  • Four cosign-signed images on ghcr.io/redbase-app:
    • redb-identity-backend (worker and Identity);
    • redb-identity-managed (adds the Tsak dashboard);
    • redb-identity-full (adds the web BFF and the admin UI);
    • redb-identity-web (the BFF only).
  • Each GitHub release carries a standalone archive per runtime and a modules archive (.tpkg and context.json).
  • dotnet new template redb-identity-app: a Tsak module next to Identity whose API checks bearer tokens by introspection over direct-vm, plus a Blazor web server with OpenID Connect sign-in; options --web, --framework.
  • Reference BFF and admin UI: redb.Identity.Web, Blazor Server; shipped as source and as an image, not as a NuGet package.

OAuth 2.x grants and endpoints

  • Authorization Code with PKCE (RFC 7636): S256 only, plain is refused; RequirePkce defaults to true.
  • Client Credentials.
  • Refresh Token with rotation (RefreshTokenReuseLeeway).
  • Device Authorization Grant (RFC 8628): Features:EnableDeviceCodeFlow, DeviceCodeLifetime, DeviceCodePollingInterval.
  • Resource Owner Password grant: opt-in via EnablePasswordFlow, off by default.
  • Token Exchange (RFC 8693), grant urn:ietf:params:oauth:grant-type:token-exchange: opt-in via EnableTokenExchange; delegation and impersonation; TokenExchangeAllowImpersonation, TokenExchangeMaxDelegationDepth.
  • /connect/token (POST): RFC 6749 §5.2 error mapping, single-use authorization code, Cache-Control: no-store.
  • /connect/authorize (GET, POST): response_mode=form_post (OIDC Form Post Response Mode).
  • /connect/par: Pushed Authorization Requests (RFC 9126); Features:EnablePushedAuthorization, RequirePushedAuthorizationRequests, PushedAuthorizationRequestLifetime.
  • /connect/introspect: Token Introspection (RFC 7662). It answers only a client in the token's aud or the client the token was issued to; any other caller gets active:false.
  • /connect/revocation: Token Revocation (RFC 7009); always 200, idempotent.
  • /connect/deviceauthorization and /connect/device/verify (RFC 8628 §3.3).
  • /connect/register: Dynamic Client Registration (RFC 7591); Features:EnableDynamicRegistration, DynamicRegistrationInitialAccessToken, DynamicRegistrationAllowedScopes, DynamicRegistrationAllowedGrantTypes, and its own throttle.
  • /connect/register/{client_id} GET/PUT/DELETE: DCR Management (RFC 7592) with registration_access_token.
  • Resource Indicators (RFC 8707): resource on authorize, PAR and token exchange, checked against the scopes' Resources and the client's rsrc: permission; otherwise invalid_target.
  • JWT-Secured Authorization Request (JAR, RFC 9101), opt-in via Features:EnableJar:
    • signed request objects only, alg:none is refused;
    • Jar:EnforcementMode LogOnly | Enforce, Jar:AllowedSigningAlgorithms (RS/PS/ES 256-512), Jar:MaxRequestObjectLength, Jar:RequireExpiration;
    • request_uri fetching (Jar:EnableRequestUri) only for addresses registered in the client's request_uris (Jar:RequireRequestUriRegistration, default true);
    • discovery advertises request_parameter_supported and related keys only while JAR is on.
  • DPoP (RFC 9449): cnf.jkt binding (RFC 7800), JWK thumbprint (RFC 7638), DPoP-Nonce (Dpop:RequireNonce, NonceLifetime), a replay store per jkt.
    • Options: Dpop:Enabled, Dpop:RequireForAccessTokens, Dpop:AllowedSigningAlgorithms (ES/RS/PS 256-512).
    • Dpop:ReplayStore:Backend: memory or redis.
  • Client authentication: client_secret_basic, client_secret_post, private_key_jwt (RFC 7521/7523), and none for public and native clients.
    • Assertions follow draft-ietf-oauth-rfc7523bis: typ client-authentication+jwt, the issuer as aud.
    • Client keys come inline (jwks) or from a jwks_uri; ClientKeys:CacheLifetime (12 h), MinimumRefreshInterval (5 min), FetchTimeout, MaxCachedKeySets (256).
  • Native apps (RFC 8252): private-use URI schemes; loopback redirects on 127.0.0.1 and [::1] with any port (AllowLoopbackRedirectPortWildcard, default true).
  • 429 Too Many Requests with Retry-After (RFC 6585) on /connect/token, /connect/par and /connect/register.

OpenID Connect

  • OIDC Core 1.0: ID token, /connect/userinfo (GET, POST), prompt=login|consent|none, max_age, acr_values, the claims parameter, the full §5.1 profile claim set.
  • Discovery: /.well-known/openid-configuration (OIDC Discovery 1.0), /.well-known/oauth-authorization-server (RFC 8414), /.well-known/jwks (RFC 7517).
  • RP-Initiated Logout 1.0: /connect/logout with a post_logout_redirect_uri allow-list.
  • Back-Channel Logout 1.0 / RFC 8417 logout tokens, pushed to relying parties.
  • A pull feed of revoked session ids for relying parties with several replicas: /api/v1/identity/revoked-sids (add, since?cursor=).
  • amr values per RFC 8176 (pwd, mfa, otp, hwk and others).

Tokens and keys

  • Access tokens follow the JWT profile (RFC 9068), typ at+jwt.
  • Access token claims: iss, exp, aud, sub, client_id, iat, jti, auth_time, acr, amr, scope, roles, groups.
  • aud is composed from the scopes' Resources, the application's AccessTokenAudiences and DefaultAccessTokenAudience.
  • Access tokens are encrypted by default; DisableAccessTokenEncryption gives plain JWTs for third-party resource servers.
  • Default lifetimes: AccessTokenLifetime 1 h, RefreshTokenLifetime 14 d, AuthorizationCodeLifetime 5 min, IdentityTokenLifetime 5 min.
  • Signing: RS256 with RSA 2048 keys. Keys come from:
    • UsePropsSigningKeyStore: keys stored in redb and encrypted with DataProtection, for several replicas;
    • SigningCredentials / EncryptionCredentials (certificates);
    • AllowEphemeralKeys, for development only.
  • Key rotation: /api/v1/identity/signing-keys (list, rotate, retire by kid); rotated keys stay in JWKS until their NotAfter.
  • DataProtection key ring stored in redb (redb.Identity.DataProtection), shared by every node; XmlRepositoryRefreshInterval.
  • A resource-server DPoP validator for your own APIs: redb.Identity.Resource.Dpop.
  • Applications: /api/v1/identity/applications (CRUD, /{id}/rotate-secret).
  • Scopes: /api/v1/identity/scopes, each scope with its Resources.
  • Consent:
    • a server-signed consent ticket (/consent?ct=...), with the decision bound to the session cookie;
    • an admin view at /api/v1/identity/consents, self-service at /me/consents.
  • Claims engine:
    • claim definitions: /api/v1/identity/claim-definitions;
    • declarative claim mappers: /claim-mappers;
    • reusable claim-scope bundles with assignment per application: /claim-scopes.
  • Roles: /api/v1/identity/roles, assigned to users and groups, with scopes attached to a role.
  • AdminScopeEntitlement (GatedPrefixes identity:, GatedScopes scim): a gated scope reaches a token only for users whose roles carry it.
  • ScopeRequiredGroups limits a scope to members of given groups.
  • Management scopes: identity:manage; granular identity:*:read/write (for example identity:users:read, identity:webhooks:write); identity:account for self-service; scim for SCIM.

Users, sign-in, MFA, passwords

  • Users: /api/v1/identity/users (CRUD, search, change-password, admin-reset-password).
  • Hierarchical groups: /api/v1/identity/groups (children, members, move, path, tree).
  • Custom user attributes through UserProps.CustomClaims, with no migration.
  • Hosted login, consent and MFA pages: LoginPath, ConsentPath, MfaPath, MfaRecoveryPath.
  • Branding of the hosted pages: IdentityTransport:Branding (LoginTitle, LogoUrl, PrimaryColor, PrimaryColorHover, CustomCss); page paths in IdentityTransport:Paths.
  • Self-registration at /api/v1/identity/account/register: Registration:Enabled (default false), SendVerifyEmail, RequireUniqueEmail.
  • Password recovery at /api/v1/identity/password (forgot, reset); e-mail verification; change of e-mail with confirmation.
  • Mail goes through Smtp (Smtp:Enabled, Host, Port, Security, FromAddress) or the host's own e-mail channel.
  • MFA methods:
    • TOTP (RFC 6238, with replay protection);
    • e-mail OTP and SMS OTP (OtpCooldown, OtpMaxPerHour);
    • WebAuthn / FIDO2 Level 2: WebAuthn:RpId, Origins, UserVerification, Attestation, UseFidoMetadataService, AaguidBlocklist;
    • one-time recovery codes (RecoveryCodePepper, RecoveryCodePreviousPeppers for rotation).
  • MFA endpoints: self-service /me/mfa and /me/webauthn, admin /api/v1/identity/mfa.
  • Password hashing: PasswordHashing:Algorithm Argon2id (default; MemoryKib 65536, Iterations 3, Parallelism 4) or Bcrypt (WorkFactor 12); hashes are upgraded at sign-in.
  • PasswordPolicy defaults: MinLength 12, MaxLength 512, RequireDigit, RequireUppercase, RequireLowercase, RequireSpecial (off), HistoryCount 5, MaxAge 90 days.
  • Brute-force limits:
    • RateLimit:PerIpPerMinute 30;
    • a failure ceiling per IP and username, RateLimit:PerIpUsernameFailures 5 in 15 minutes;
    • RateLimit:Backend memory (per node) or redis (cluster-wide).
  • MFA lockout per account; MfaLockoutClockSkew.
  • External sign-in:
    • federation providers stored in redb, Kind oidc (any OIDC provider via discovery) or github; AutoProvision, ClaimMappings; Features:EnableFederation;
    • admin at /api/v1/identity/federation-providers;
    • users link and unlink their own accounts at /me/federated-identities.
  • LDAP / Active Directory: redb.Identity.Ldap, search and bind sign-in, group mapping, user sync.
  • Admin impersonation: /api/v1/identity/admin/impersonate.
  • First administrator:
    • SeedAdmin:Password, with a warning at every start while the default is in use;
    • a one-time POST /internal/bootstrap-admin, enabled by Bootstrap:Enabled and a Bootstrap:Secret of 32 or more characters.

Sessions

  • Server-side sessions: SessionIdleTimeout 24 h, SessionAbsoluteTimeout 30 d, SessionCookieLifetime.
  • Session cookie settings under Cookies; SameSite; the __Host- prefix only with Secure.
  • Self-service at /me/sessions (list, revoke the current one or the others); admin at /api/v1/identity/sessions (revoke one or all, prune).
  • Token admin: /api/v1/identity/tokens (list, revoke by subject, prune).

Administration

  • Management REST API at /api/v1/identity/*, with a Bearer token and scopes; a token in the query string is refused.
  • Every management call is also available in-process over direct-vm (IdentityEndpoints.AuthManagement, AuthzCheck, Manage*).
  • SCIM 2.0 (RFC 7643/7644): /scim/v2/Users, /scim/v2/Groups (CRUD and PATCH), /scim/v2/Bulk, ServiceProviderConfig, ResourceTypes, Schemas.
    • Features:EnableScim, EnableScimBulk, ScimBulkMaxOperations, ScimBulkMaxPayloadSize;
    • ETag / If-Match, with 412 on stale writes.
  • Typed .NET SDK: redb.Identity.Client.
    • IIdentityClient, AddIdentityClient (BaseUrl, Authority, ClientId, ClientSecret, Scopes), AddClientCredentialsTokenProvider;
    • errors surface as ApiException with RFC 7807 ProblemDetails.
  • Admin UI (redb.Identity.Web): users, groups, applications, scopes, claim mappers, federation providers, sessions, tokens, audit, a SCIM browser, settings.
  • Self-service pages: profile, password, MFA, WebAuthn, sessions, linked accounts, consents.
  • Service client created at start: SeedBackchannelClient (Enabled, ClientId, ClientSecret, Scopes); web console client: SeedWebClient.
  • Idempotent management writes (Idempotency); one-time secrets are never replayed.

Storage

  • Data lives in redb as typed *Props schemes (identity.application, identity.token, identity.session, identity.user, identity.mfa and others); code-first, no migrations.
  • Audit and the delivery outbox are relational tables: identity_audit_log, identity_delivery_outbox.
  • Users are redb users (the _users table); profile data sits in UserProps, keyed by the user id.
  • Named redb instance Identity:RedbInstanceName: identity-sqlite in the images, identity-pg and identity-mssql predefined; a separate database or the one of your business module.
  • Providers: PostgreSQL 15+, SQL Server 2019+, SQLite 3.44+, through redb.Postgres(.Pro), redb.MSSql(.Pro), redb.SQLite(.Pro); no Identity code changes between them.

Security defaults and outbound guards

  • OutboundUrlGuard covers every address a client can make the server call: jwks_uri, JAR request_uri, backchannel_logout_uri.
    • Refused targets: loopback, RFC 1918, link-local including 169.254.169.254, RFC 6598.
    • The connection goes only to an address approved at connect time; redirects are not followed.
  • Private-network targets only by explicit opt-in: ClientKeys:AllowPrivateNetworkTargets, Jar:RequestUriAllowPrivateNetworkTargets, BackchannelLogout:AllowPrivateNetworkTargets.
  • https is required by default: Jar:RequestUriRequireHttps, BackchannelLogout:RequireHttps.
  • Access tokens that are revoked or belong to a deleted client are refused at once by the management API, SCIM and the account endpoints.
  • Facade pages send X-Frame-Options DENY, frame-ancestors 'none', nosniff and Referrer-Policy.
  • A foreign Origin/Referer on login, consent and MFA POSTs gets 403.
  • Reserved internal headers are stripped from every inbound transport.
  • Trusted proxies (ReverseProxies): X-Forwarded-For is sanitized before rate limiting and lockout.
  • Secrets go into Tsak override environment variables (Tsak__Contexts__identity.core__Override__Identity__*), not into context.json.
  • CORS: IdentityTransport:Http:CorsEnabled, CorsRegisteredClientOriginsEnabled (default true), AdditionalAllowedOrigins. TLS: Http:Ssl, SslCertPath.
  • Unsigned (alg:none) request objects are refused, as FAPI 2.0 requires.

Conformance

  • Run against the official OpenID Foundation conformance suite over native HTTPS, with the Config OP and Basic OP plans.
  • Latest published run, 2026-11-03: Config OP with zero failures; Basic OP, 35 modules, zero failures.
  • Not OpenID Certified; no formal certification submission.

Health, metrics, audit, events

  • Health module identity under Tsak's /api/health/{startup,live,ready}: probes db, signing-keys, data-protection.
  • Degraded when the delivery backlog is older than Delivery:DegradedAfter.
  • gRPC facade: grpc.health.v1.Health/Check.
  • OpenTelemetry meter RedbIdentity:
    • identity.login.attempts, identity.login.failures, identity.mfa.verifications, identity.mfa.lockouts;
    • identity.tokens.issued, identity.tokens.errors, identity.rate_limit.rejections;
    • identity.password.verify.duration, identity.unique_violation, identity.audit.write_failures;
    • identity.delivery.attempts, identity.delivery.pending, identity.delivery.oldest_pending_age.
  • Security log category RedbIdentity.Security.
  • Audit: 109 typed events in 7 categories (authentication, authorization, admin, federation, mfa, scim, system), stored in identity_audit_log.
    • Query: GET /api/v1/identity/audit;
    • options Audit:Enabled, Audit:Filter, Audit:TapConcurrency.
  • External audit targets Audit:Targets: Kafka, Elasticsearch, RabbitMQ, an SQL table, a log.
  • Audit targets are delivered at least once through the outbox with retries; per target MaxAttempts, RetryBackoffMs, TimeoutMs.
  • Outgoing webhooks: /api/v1/identity/webhooks.
    • HMAC-SHA256 signature in X-RedbIdentity-Signature, delivery id in X-RedbIdentity-Delivery;
    • at least once, no ordering;
    • Delivery:PollInterval, BatchSize, MaxParallel, MaxParallelPerDestination.
  • Delivery inspection and redelivery: /api/v1/identity/webhooks/deliveries, /deliveries/{id}/redeliver.

Cluster

  • Runs on several replicas.
  • Shared through redb: the DataProtection key ring and the signing keys; the first key is generated under a distributed lock.
  • Cleanup timers run on the leader only in a Tsak cluster: tokens, sessions, MFA OTP, WebAuthn challenges, revoked sids, idempotency, delivery.

Configuration sections (Identity:*, context identity.core)

  • Engine: Issuer, RedbInstanceName, Features, Jar, Dpop, ClientKeys, BackchannelLogout.
  • Users and security: PasswordPolicy, PasswordHashing, RateLimit, ReverseProxies, WebAuthn, Smtp, PasswordRecovery, EmailVerification, ChangeEmail, Registration.
  • Platform: Cookies, DataProtection, Idempotency, Delivery, Audit, AdminScopeEntitlement, FederationProviders, FederationState, Validation, Ldap.
  • Start-up: Bootstrap, SeedAdmin, SeedWebClient, SeedBackchannelClient.
  • Transport: IdentityTransport (context identity.http; Http:PublicPort, Http:Host, ManagementPort), with matching sections for the gRPC and SOAP facades.

Platforms

  • .NET 10 and .NET 11 (packages and modules); the reference web BFF runs on .NET 10.
  • Databases: PostgreSQL 15+, SQL Server 2019+, SQLite 3.44+.

Not supported

  • No SAML 2.0 in either direction (no IdP, no SP).
  • No mutual-TLS client authentication and no certificate-bound tokens (RFC 8705).
  • No RFC 9207 iss response parameter, no Rich Authorization Requests (RFC 9396), no Step-up Authentication Challenge (RFC 9470).
  • No FAPI 2.0 profile, no CIBA, no OpenID Federation 1.0.
  • No SMS gateway ships: SMS OTP needs a delivery channel registered by the host.
  • PasswordPolicy:BreachCheckEnabled does nothing unless a checker is registered, and none ships.
  • Management operations are not on gRPC; browser flows and DPoP are HTTP only.
  • Message-bus facades (RabbitMQ, IBM MQ, SignalR, Kafka) are not shipped.
  • Federation kinds: oidc and github only; other social providers go through generic OIDC.
  • No risk-adaptive authentication.
  • The in-memory rate limit counts per node; a cluster-wide limit needs the redis backend.

Sources and documentation: github.com/redbase-app/redb-identity, redbase.app.