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 inIdentityEndpoints, for exampledirect-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, serviceidentity.v1.Identity); - WS-Trust over SOAP (
redb.Identity.Soap: Issue, Validate, Cancel, Renew; WSDL on GET; refuses to start without TLS).
- HTTP/HTTPS (
- NuGet packages:
redb.Identity.Core,.Http,.Grpc,.Soap,.Management,.Contracts,.Client,.DataProtection,.Core.Module,.Ldap,.Resource.Dpop. - redb.Tsak modules (
.tpkg) with the contextsidentity.contracts,identity.core,identity.http,identity.grpc(optional) andidentity.soap(optional), configured bycontext.json. - Self-hosting without Tsak:
services.AddRedbIdentityHost()andRedbIdentityHost.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 (
.tpkgandcontext.json). dotnet newtemplateredb-identity-app: a Tsak module next to Identity whose API checks bearer tokens by introspection overdirect-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;
RequirePkcedefaults 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 viaEnableTokenExchange; 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'saudor the client the token was issued to; any other caller getsactive:false./connect/revocation: Token Revocation (RFC 7009); always 200, idempotent./connect/deviceauthorizationand/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) withregistration_access_token.- Resource Indicators (RFC 8707):
resourceon authorize, PAR and token exchange, checked against the scopes' Resources and the client'srsrc:permission; otherwiseinvalid_target. - JWT-Secured Authorization Request (JAR, RFC 9101), opt-in via
Features:EnableJar:- signed request objects only,
alg:noneis refused; Jar:EnforcementModeLogOnly|Enforce,Jar:AllowedSigningAlgorithms(RS/PS/ES 256-512),Jar:MaxRequestObjectLength,Jar:RequireExpiration;request_urifetching (Jar:EnableRequestUri) only for addresses registered in the client'srequest_uris(Jar:RequireRequestUriRegistration, default true);- discovery advertises
request_parameter_supportedand related keys only while JAR is on.
- signed request objects only,
- DPoP (RFC 9449):
cnf.jktbinding (RFC 7800), JWK thumbprint (RFC 7638),DPoP-Nonce(Dpop:RequireNonce,NonceLifetime), a replay store perjkt.- Options:
Dpop:Enabled,Dpop:RequireForAccessTokens,Dpop:AllowedSigningAlgorithms(ES/RS/PS 256-512). Dpop:ReplayStore:Backend:memoryorredis.
- Options:
- Client authentication:
client_secret_basic,client_secret_post,private_key_jwt(RFC 7521/7523), andnonefor public and native clients.- Assertions follow draft-ietf-oauth-rfc7523bis:
typclient-authentication+jwt, the issuer asaud. - Client keys come inline (
jwks) or from ajwks_uri;ClientKeys:CacheLifetime(12 h),MinimumRefreshInterval(5 min),FetchTimeout,MaxCachedKeySets(256).
- Assertions follow draft-ietf-oauth-rfc7523bis:
- 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/parand/connect/register.
OpenID Connect
- OIDC Core 1.0: ID token,
/connect/userinfo(GET, POST),prompt=login|consent|none,max_age,acr_values, theclaimsparameter, 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/logoutwith apost_logout_redirect_uriallow-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=). amrvalues per RFC 8176 (pwd,mfa,otp,hwkand others).
Tokens and keys
- Access tokens follow the JWT profile (RFC 9068),
typat+jwt. - Access token claims:
iss,exp,aud,sub,client_id,iat,jti,auth_time,acr,amr,scope,roles,groups. audis composed from the scopes' Resources, the application'sAccessTokenAudiencesandDefaultAccessTokenAudience.- Access tokens are encrypted by default;
DisableAccessTokenEncryptiongives plain JWTs for third-party resource servers. - Default lifetimes:
AccessTokenLifetime1 h,RefreshTokenLifetime14 d,AuthorizationCodeLifetime5 min,IdentityTokenLifetime5 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 bykid); rotated keys stay in JWKS until theirNotAfter. - 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.
Clients, scopes, resources, consent
- 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.
- a server-signed consent ticket (
- Claims engine:
- claim definitions:
/api/v1/identity/claim-definitions; - declarative claim mappers:
/claim-mappers; - reusable claim-scope bundles with assignment per application:
/claim-scopes.
- claim definitions:
- Roles:
/api/v1/identity/roles, assigned to users and groups, with scopes attached to a role. AdminScopeEntitlement(GatedPrefixesidentity:,GatedScopesscim): a gated scope reaches a token only for users whose roles carry it.ScopeRequiredGroupslimits a scope to members of given groups.- Management scopes:
identity:manage; granularidentity:*:read/write(for exampleidentity:users:read,identity:webhooks:write);identity:accountfor self-service;scimfor 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 inIdentityTransport: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,RecoveryCodePreviousPeppersfor rotation).
- MFA endpoints: self-service
/me/mfaand/me/webauthn, admin/api/v1/identity/mfa. - Password hashing:
PasswordHashing:AlgorithmArgon2id(default;MemoryKib65536,Iterations3,Parallelism4) orBcrypt(WorkFactor12); hashes are upgraded at sign-in. PasswordPolicydefaults:MinLength12,MaxLength512,RequireDigit,RequireUppercase,RequireLowercase,RequireSpecial(off),HistoryCount5,MaxAge90 days.- Brute-force limits:
RateLimit:PerIpPerMinute30;- a failure ceiling per IP and username,
RateLimit:PerIpUsernameFailures5 in 15 minutes; RateLimit:Backendmemory(per node) orredis(cluster-wide).
- MFA lockout per account;
MfaLockoutClockSkew. - External sign-in:
- federation providers stored in redb,
Kindoidc(any OIDC provider via discovery) orgithub;AutoProvision,ClaimMappings;Features:EnableFederation; - admin at
/api/v1/identity/federation-providers; - users link and unlink their own accounts at
/me/federated-identities.
- federation providers stored in redb,
- 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 byBootstrap:Enabledand aBootstrap:Secretof 32 or more characters.
Sessions
- Server-side sessions:
SessionIdleTimeout24 h,SessionAbsoluteTimeout30 d,SessionCookieLifetime. - Session cookie settings under
Cookies;SameSite; the__Host-prefix only withSecure. - 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
ApiExceptionwith 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
*Propsschemes (identity.application,identity.token,identity.session,identity.user,identity.mfaand others); code-first, no migrations. - Audit and the delivery outbox are relational tables:
identity_audit_log,identity_delivery_outbox. - Users are redb users (the
_userstable); profile data sits inUserProps, keyed by the user id. - Named redb instance
Identity:RedbInstanceName:identity-sqlitein the images,identity-pgandidentity-mssqlpredefined; 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
OutboundUrlGuardcovers every address a client can make the server call:jwks_uri, JARrequest_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',nosniffandReferrer-Policy. - A foreign
Origin/Refereron login, consent and MFA POSTs gets 403. - Reserved internal headers are stripped from every inbound transport.
- Trusted proxies (
ReverseProxies):X-Forwarded-Foris sanitized before rate limiting and lockout. - Secrets go into Tsak override environment variables (
Tsak__Contexts__identity.core__Override__Identity__*), not intocontext.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
identityunder Tsak's/api/health/{startup,live,ready}: probesdb,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.
- Query:
- 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 inX-RedbIdentity-Delivery; - at least once, no ordering;
Delivery:PollInterval,BatchSize,MaxParallel,MaxParallelPerDestination.
- HMAC-SHA256 signature in
- 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(contextidentity.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
issresponse 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:BreachCheckEnableddoes 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:
oidcandgithubonly; 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
redisbackend.
Sources and documentation: github.com/redbase-app/redb-identity, redbase.app.