Skip to content

Configuration Keys — All Settings Reference

This page lists every configuration section and Options class provided by Granit packages. Developers should use it as the canonical lookup when adding or overriding configuration keys.

Every Granit Options class declares a public const string SectionName that follows a single rule:

Hierarchical, colon-separated, namespace-aligned. Strip the internal Granit prefix from the project namespace and replace the remaining dots with colons: Granit.Foo.Bar.Baz → "Foo:Bar:Baz".

Examples:

ProjectSectionName
Granit.BlobStorageBlobStorage
Granit.Wolverine.PostgresqlWolverine:Postgresql
Granit.Notifications.SmtpNotifications:Smtp
Granit.Identity.Federated.KeycloakIdentity:Federated:Keycloak
Granit.Authentication.JwtBearer.KeycloakAuthentication:Keycloak
Granit.Http.OutputCaching.StackExchangeRedisHttp:OutputCaching:Redis

Forbidden patterns (enforced by Granit.ArchitectureTests.SectionNameConventionTests):

  • "Granit:..." as a root — Granit is the code namespace, not a config root. Use the bare hierarchical path.
  • PascalCase-glued compound names ("WolverinePostgresql", "BlobStorageEndpoints") — must be split with :.
  • Two Options classes pointing at the same section path (silent override).

Single-segment SectionName values are allowed only for the small set of top-level root modules (Notifications, Authentication, Vault, BlobStorage, Cache, Bff, …). Any compound concept must be hierarchical.

Typical binding in a module:

services.Configure<ObservabilityOptions>(
configuration.GetSection(ObservabilityOptions.SectionName));

In appsettings.json you can write the section either nested (idiomatic) or flat with the colon literal — both bind to the same path:

// Nested (idiomatic for hand-written files)
{
"Wolverine": {
"Postgresql": { "TransportConnectionString": "..." }
}
}
// Flat (equivalent — matches the SectionName literally)
{
"Wolverine:Postgresql": { "TransportConnectionString": "..." }
}

Most examples on this page use the flat form so the table rows and the appsettings excerpts read against the exact SectionName constant.

The .NET configuration system merges sources in order of precedence (last wins):

  1. appsettings.json — base defaults, committed to the repository.
  2. appsettings.{ASPNETCORE_ENVIRONMENT}.json — environment overrides (Development, Staging, Production).
  3. Environment variables — deployed via Kubernetes ConfigMaps or container orchestrators.
  4. HashiCorp Vault (via Granit.Vault) — secrets and dynamic credentials injected at startup.

.NET maps configuration keys to environment variables using the double underscore (__) separator in place of ::

appsettings pathEnvironment variable
Cache:Redis:ConfigurationCache__Redis__Configuration
Observability:OtlpEndpointObservability__OtlpEndpoint
Notifications:Email:ProviderNotifications__Email__Provider
BlobStorage:ServiceUrlBlobStorage__ServiceUrl

For arrays, use the index as a key segment:

Terminal window
Wolverine__RetryDelays__0=00:00:05
Wolverine__RetryDelays__1=00:00:30

KeyTypeDefaultDescription
Section—(none — configured in code)
Package—Granit.Timing
DefaultTimezonestring?nullIANA timezone (e.g. Europe/Brussels). null = no conversion, dates remain UTC.
KeyTypeDefaultDescription
Section—(configured in code)
Package—Granit.Guids
DefaultSequentialGuidTypeSequentialGuidType?nullnull = SequentialAsString (PostgreSQL-optimized).

Authentication (JWT Bearer) — JwtBearerAuthOptions

Section titled “Authentication (JWT Bearer) — JwtBearerAuthOptions”
KeyTypeDefaultDescription
Section—Authentication
Package—Granit.Authentication.JwtBearer
Authoritystring""OIDC authority URL.
Audiencestring""Expected JWT audience.
RequireHttpsMetadatabooltrueRequire HTTPS for OIDC metadata.
NameClaimTypestring"sub"Claim mapped to IIdentity.Name.
BackChannelLogout:EnabledboolfalseEnable OIDC back-channel logout.
BackChannelLogout:EndpointPathstring"/auth/back-channel-logout"Logout endpoint route.
BackChannelLogout:SessionRevocationTtlTimeSpan01:00:00How long revoked session IDs stay in cache.

Keycloak authentication — KeycloakOptions

Section titled “Keycloak authentication — KeycloakOptions”
KeyTypeDefaultDescription
Section—Authentication:Keycloak
Package—Granit.Authentication.JwtBearer.Keycloak
Authoritystring""OIDC authority URL.
ClientIdstring""Keycloak client ID.
ClientSecretstring""Client secret (load from Vault).
RequireHttpsMetadatabooltrueRequire HTTPS for OIDC metadata.
Audiencestring?nullExpected audience. Defaults to ClientId.
AdminRolestring"admin"Keycloak realm role for admins.
RoleClaimsSourcestring"realm_access""realm_access" or "resource_access".

Entra ID authentication — EntraIdOptions

Section titled “Entra ID authentication — EntraIdOptions”
KeyTypeDefaultDescription
Section—Authentication:EntraId
Package—Granit.Authentication.JwtBearer.EntraId
Instancestring"https://login.microsoftonline.com/"Azure AD instance URL.
TenantIdstring""Azure AD tenant ID.
ClientIdstring""App registration client ID.
RequireHttpsMetadatabooltrueRequire HTTPS for OIDC metadata.
AdminRolestring"admin"Admin App Role name.
KeyTypeDefaultDescription
Section—Authentication:Cognito
Package—Granit.Authentication.JwtBearer.Cognito
UserPoolIdstring""Cognito User Pool ID.
ClientIdstring""Cognito app client ID.
Regionstring""AWS region (e.g. eu-west-1).
KeyTypeDefaultDescription
Section—(configured via authentication scheme)
Package—Granit.Authentication.ApiKeys
CacheDurationTimeSpan00:05:00Cache TTL for API key lookups. TimeSpan.Zero to disable.
TrackLastUsedbooltrueUpdate LastUsedAt on each request.

API key endpoints — ApiKeysEndpointsOptions

Section titled “API key endpoints — ApiKeysEndpointsOptions”
KeyTypeDefaultDescription
Section—Authentication:ApiKeys:Endpoints
Package—Granit.Authentication.ApiKeys.Endpoints
RoutePrefixstring"api-keys"Route prefix.
TagNamestring"API Keys"OpenAPI tag.
RequiredRolestring"granit-apikeys-admin"Fallback authorization role.
AllowedEnvironmentsstring[]["live","test","dev"]Allowed environments for key creation.

Authorization — GranitAuthorizationOptions

Section titled “Authorization — GranitAuthorizationOptions”
KeyTypeDefaultDescription
Section—Authorization
Package—Granit.Authorization
AdminRolesstring[]["admin"]Roles that bypass all permission checks.
CacheDurationTimeSpan00:05:00Permission check cache TTL.
AlwaysAllowboolfalseSkip permission checks entirely (dev only).

Authorization endpoints — AuthorizationEndpointsOptions

Section titled “Authorization endpoints — AuthorizationEndpointsOptions”
KeyTypeDefaultDescription
Section—Authorization:Endpoints
Package—Granit.Authorization.Endpoints
RoutePrefixstring"auth"Route prefix.
TagNamestring"Authorization"OpenAPI tag.
KeyTypeDefaultDescription
Section—Vault
Package—Granit.Vault.HashiCorp
Addressstring""Vault server URL.
AuthMethodstring"Kubernetes""Kubernetes" or "Token".
Tokenstring?nullVault token (dev only).
KubernetesRolestring"my-backend"K8s auth role.
KubernetesTokenPathstring/var/run/secrets/.../tokenPath to K8s service account JWT.
DatabaseMountPointstring"database"Database engine mount point.
DatabaseRoleNamestring"readwrite"Dynamic credential role.
TransitMountPointstring"transit"Transit engine mount point.
LeaseRenewalThresholddouble0.75Lease renewal at 75% of TTL.
KeyTypeDefaultDescription
Section—Encryption
Package—Granit.Encryption
PassPhrasestring""AES key derivation passphrase (from Vault).
KeySizeint256AES key size in bits.
ProviderNamestring"Aes""Aes", "Vault", or "AzureKeyVault".
VaultKeyNamestring"string-encryption"Transit key name (when provider is Vault).
KeyTypeDefaultDescription
Section—Vault:Azure
Package—Granit.Vault.Azure
VaultUristring""Azure Key Vault URI (e.g. https://my-vault.vault.azure.net/).
EncryptionKeyNamestring"string-encryption"Key name for encrypt/decrypt operations.
EncryptionAlgorithmstring"RSA-OAEP-256"Algorithm: RSA-OAEP-256 or RSA-OAEP.
DatabaseSecretNamestring?nullSecret name for DB credentials. Omit to disable credential rotation.
RotationCheckIntervalMinutesint5Secret version polling interval (minutes).
TimeoutSecondsint30Azure SDK operation timeout.
KeyTypeDefaultDescription
Section—Privacy
Package—Granit.Privacy
ExportTimeoutMinutesint5GDPR export saga timeout.
ExportMaxSizeMbint100Maximum export archive size (MB).
DefaultGracePeriodDaysint30Deferred-deletion cooling-off window.
MaxGracePeriodDaysint90Upper bound on a requested cooling-off window.
ReminderDaysBeforeint3Days before the deadline to send the deletion reminder.
DeletionAcknowledgementTimeoutMinutesint720Max wait for provider erasure acknowledgements after fan-out before a deletion is marked PartiallyExecuted.

Privacy export download endpoints — PrivacyBlobStorageEndpointsOptions

Section titled “Privacy export download endpoints — PrivacyBlobStorageEndpointsOptions”
KeyTypeDefaultDescription
Section—Privacy:BlobStorage:Endpoints
Package—Granit.Privacy.BlobStorage.Endpoints
RoutePrefixstring"privacy"Route prefix for the export download endpoint.
TagNamestring"Privacy"OpenAPI tag.

IP geolocation — GranitIpGeolocationOptions

Section titled “IP geolocation — GranitIpGeolocationOptions”
KeyTypeDefaultDescription
Section—IpGeolocation
Package—Granit.IpGeolocation
CacheKeySecretstring?nullHMAC key for cache-key hashing. Unset = reversible SHA-256 hash of the IP (GDPR risk on a shared cache). Source from Vault, stable across instances.
CacheDurationTimeSpan01:00:00TTL for positive and negative results.
ResolvePrivateAddressesboolfalseWhen false, short-circuit private/loopback/link-local IPs to null.
ProviderOrderstring[][]Provider fallback order; empty = registration order.

IP geolocation — ipinfo — IpInfoIpGeolocationOptions

Section titled “IP geolocation — ipinfo — IpInfoIpGeolocationOptions”
KeyTypeDefaultDescription
Section—IpGeolocation:IpInfo
Package—Granit.IpGeolocation.IpInfo
ProviderNamestring"IpInfo"Identifier used in ProviderOrder.
ApiTokenstring?nullipinfo.io token sent as Bearer; tokenless tier is rate-limited.
BaseAddressUrihttps://ipinfo.ioProvider base address. Must be HTTPS for non-loopback hosts — the request carries the client IP and the API token, so a plaintext http URL to a remote host is rejected at startup (loopback allowed for dev/mocks).
TimeoutTimeSpan00:00:03Per-request timeout.
MaxResponseSizeByteslong65536Max buffered response size.

IP geolocation — MaxMind — MaxMindIpGeolocationOptions

Section titled “IP geolocation — MaxMind — MaxMindIpGeolocationOptions”
KeyTypeDefaultDescription
Section—IpGeolocation:MaxMind
Package—Granit.IpGeolocation.MaxMind
DatabasePathstring(required)Path to the .mmdb file; must exist at startup.
ProviderNamestring"MaxMind"Identifier used in ProviderOrder.
ReloadOnChangebooltrueReload the database when the file changes.
FileAccessenumMemoryMemory (load to RAM, release handle) or MemoryMapped.

User session anomaly detection — IdentityAnomalyDetectionOptions

Section titled “User session anomaly detection — IdentityAnomalyDetectionOptions”
KeyTypeDefaultDescription
Section—Identity:AnomalyDetection
Package—Granit.Identity.AnomalyDetection
MaxAiCallsPerHourPerUserint50AI assessments per user per hour. Checked before the per-tenant cap.
MaxAiCallsPerHourPerTenantint500AI assessments per tenant per hour.
MaxTravelKilometersPerHourdouble1000Impossible-travel speed threshold.

Keycloak Admin API — KeycloakAdminOptions

Section titled “Keycloak Admin API — KeycloakAdminOptions”
KeyTypeDefaultDescription
Section—Identity:Federated:Keycloak
Package—Granit.Identity.Federated.Keycloak
BaseUrlstring""Keycloak server base URL.
Realmstring""Realm name.
ClientIdstring""Service account client ID.
ClientSecretstring""Service account client secret (from Vault).
UseTokenExchangeForDeviceActivityboolfalseUse token exchange for device-level session info.
TimeoutSecondsint30HTTP request timeout.
DirectAccessClientIdstring?nullPublic client for credential verification.

Entra ID Admin API — EntraIdAdminOptions

Section titled “Entra ID Admin API — EntraIdAdminOptions”
KeyTypeDefaultDescription
Section—Identity:Federated:EntraId
Package—Granit.Identity.Federated.EntraId
TenantIdstring""Azure AD tenant ID.
ClientIdstring""Service principal client ID.
ClientSecretstring""Service principal secret (from Vault).
ServicePrincipalObjectIdstring""Enterprise app Object ID for App Role ops.
DefaultDomainstring?nullDomain for userPrincipalName construction.
TimeoutSecondsint30Microsoft Graph request timeout.
GraphBaseUrlstring"https://graph.microsoft.com"Graph API base URL.
RopcClientIdstring?nullPublic client for ROPC credential verification.
KeyTypeDefaultDescription
Section—Identity:Federated:Cognito
Package—Granit.Identity.Federated.Cognito
UserPoolIdstring""Cognito User Pool ID.
Regionstring""AWS region (e.g. eu-west-1).
AccessKeyIdstring?nullAWS access key (optional — uses default credential chain if omitted).
SecretAccessKeystring?nullAWS secret key (from Vault).
TimeoutSecondsint30HTTP request timeout.
KeyTypeDefaultDescription
Section—Identity:Federated:UserCache
Package—Granit.Identity.Federated.EntityFrameworkCore
StalenessThresholdTimeSpan1.00:00:00Duration before a cached user is stale.
EnableLoginTimeSyncbooltrueAuto-sync user from JWT on each request.
IncrementalSyncBatchSizeint50Max stale entries per incremental sync batch.

Identity endpoints — IdentityEndpointsOptions

Section titled “Identity endpoints — IdentityEndpointsOptions”
KeyTypeDefaultDescription
Section—Identity:Endpoints
Package—Granit.Identity.Endpoints
RoutePrefixstring"identity/users"Route prefix.
TagNamestring"Identity User Cache"OpenAPI tag.
RequiredRolestring"granit-identity-admin"Fallback authorization role.

Identity webhook — IdentityWebhookOptions

Section titled “Identity webhook — IdentityWebhookOptions”
KeyTypeDefaultDescription
Section—Identity:Webhook
Package—Granit.Identity.Endpoints
Secretstring""Required. HMAC-SHA256 shared secret. Webhook rejects all requests when empty (fail-closed).
SignatureHeaderNamestring"X-Webhook-Signature"HTTP header carrying the signature.

KeyTypeDefaultDescription
Section—Cache
Package—Granit.Caching
KeyPrefixstring"dd"Prefix for all cache keys.
DefaultAbsoluteExpirationRelativeToNowTimeSpan?01:00:00Default absolute expiration.
EncryptValuesboolfalseForce AES-256 encryption for all L2 values. [CacheEncrypted] types (BFF tokens, idempotency entries) are encrypted regardless once a key resolves. Non-Development hosts with Redis L2 fail startup if neither a key nor this flag is set.

Cache encryption — CacheEncryptionOptions

Section titled “Cache encryption — CacheEncryptionOptions”
KeyTypeDefaultDescription
Section—Cache:Encryption
Package—Granit.Caching
Keystring?nullAES-256 key (base64, 32 bytes). From Vault in production. A resolvable key alone arms the encryptor — EncryptValues need not be set.
KeyTypeDefaultDescription
Section—Cache:FusionCache
Package—Granit.Caching
DefaultEntryOptions:DurationTimeSpan00:05:00Default cache entry duration.
KeyTypeDefaultDescription
Section—Cache:Redis
Package—Granit.Caching.StackExchangeRedis
IsEnabledbooltrueEnable Redis provider (false = Memory fallback).
Configurationstring"localhost:6379"StackExchange.Redis connection string.
InstanceNamestring"dd:"Redis key prefix for app isolation.
KeyTypeDefaultDescription
Section—MultiTenancy
Package—Granit.MultiTenancy
IsEnabledbooltrueEnable tenant resolution middleware.
TenantIdClaimTypestring"tenant_id"JWT claim for tenant ID.
TenantIdHeaderNamestring"X-Tenant-Id"HTTP header for tenant ID.
HeaderTrustModeTenantHeaderTrustModeUnrestrictedUnrestricted or CrossValidate (match header against JWT claim).

Tenant isolation — TenantIsolationOptions

Section titled “Tenant isolation — TenantIsolationOptions”
KeyTypeDefaultDescription
Section—MultiTenancy:TenantIsolation
Package—Granit.Persistence
StrategyTenantIsolationStrategySharedDatabaseSharedDatabase, TenantPerSchema, or TenantPerDatabase.
KeyTypeDefaultDescription
Section—MultiTenancy:TenantSchema
Package—Granit.Persistence
NamingConventionTenantSchemaNamingConventionTenantIdTenantId, TenantName, or Custom.
Prefixstring"tenant_"Schema name prefix. Must match ^[a-z][a-z0-9_]*$ (validated at startup).

Data migrations — MigrationStartupOptions

Section titled “Data migrations — MigrationStartupOptions”
KeyTypeDefaultDescription
Section—Persistence:Migrations
Package—Granit.Persistence.Migrations
DefaultBatchSizeint500Rows per batch when resuming pending cycles.
BatchExecutionTimeoutTimeSpan00:05:00Timeout per migration batch.
KeyTypeDefaultDescription
Section—Settings
Package—Granit.Settings
CacheExpirationTimeSpan00:30:00Settings cache entry lifetime.

Settings endpoints — SettingsEndpointsOptions

Section titled “Settings endpoints — SettingsEndpointsOptions”
KeyTypeDefaultDescription
Section—Settings:Endpoints
Package—Granit.Settings.Endpoints
UserRoutePrefixstring"settings/user"User-scoped settings route.
GlobalRoutePrefixstring"settings/global"Global settings route.
TenantRoutePrefixstring"settings/tenant"Tenant-scoped settings route.
TagNamestring"Settings"OpenAPI tag.
KeyTypeDefaultDescription
Section—ReferenceData
Package—Granit.ReferenceData
CacheTimeToLiveTimeSpan01:00:00In-memory cache TTL for reference data.

Reference data extension — ReferenceDataExtensionOptions

Section titled “Reference data extension — ReferenceDataExtensionOptions”
KeyTypeDefaultDescription
Section—(configured in code via fluent API)
Package—Granit.ReferenceData
TableNamestring"ref_data"Database table name for the dynamic type.
IsHierarchicalboolfalseEnable parent-child hierarchy via ParentCode.
PropertyMappingsList<...>[]Dynamic SQL column mappings via MapProperty<T>().

Reference data endpoints — ReferenceDataEndpointsOptions

Section titled “Reference data endpoints — ReferenceDataEndpointsOptions”
KeyTypeDefaultDescription
Section—(configured in code)
Package—Granit.ReferenceData.Endpoints
RoutePrefixstring"reference-data"Route prefix.
TagNamestring"Reference Data"OpenAPI tag.
AdminPolicyNamestring?"ReferenceData.Admin"Admin authorization policy. null = no auth.
RequiredRolestring"granit-reference-data-admin"Fallback admin role.
KeyTypeDefaultDescription
Section—QueryEngine
Package—Granit.QueryEngine
DefaultPageSizeint20Default page size for paginated queries.
MaxPageSizeint100Maximum allowed page size.
MaxStreamSizeint100000Maximum items returned by streaming queries.
MaxGroupCountint1000Maximum groups returned by grouped queries. Prevents OOM from high-cardinality fields.
MaxSavedViewsPerUserint100Maximum saved views per user per entity type. Prevents storage exhaustion.
CursorHmacKeystring?nullBase64-encoded HMAC-SHA256 key for cursor signing. When null, cursors are unsigned.
KeyTypeDefaultDescription
Section—QueryEngine:AI
Package—Granit.QueryEngine.AI
WorkspaceNamestring"default"AI workspace for NLQ translation.
TimeoutSecondsint5Timeout for LLM calls. Validated at startup (must be > 0).

API documentation — ApiDocumentationOptions

Section titled “API documentation — ApiDocumentationOptions”
KeyTypeDefaultDescription
Section—Http:ApiDocumentation
Package—Granit.Http.ApiDocumentation
MajorVersionsint[][1]Major versions to route (URL segment) and document — single source of truth.
DefaultMajorVersionint1Default API version when client omits it. Must be in MajorVersions (validated at startup).
ReportApiVersionsbooltrueInclude api-supported-versions / api-deprecated-versions headers.
Titlestring"API"OpenAPI document title.
Descriptionstring?nullMarkdown description in OpenAPI info.
ContactEmailstring?nullContact email in OpenAPI info.
LogoUrlstring?nullLogo image URL (x-logo extension).
EnableTenantHeaderboolfalseDocument tenant header on endpoints.
TenantHeaderNamestring"X-Tenant-Id"Tenant header name.
OAuth2:AuthorizationUrlstring?nullOAuth2 authorization endpoint.
OAuth2:TokenUrlstring?nullOAuth2 token endpoint.
OAuth2:Scopesstring[]["openid"]OAuth2 scopes to request.

The former Granit.Http.ApiVersioning package (section Http:ApiVersioning) was merged into Granit.Http.ApiDocumentation — DefaultMajorVersion and ReportApiVersions moved here.

API documentation — Scalar UI — ScalarOptions

Section titled “API documentation — Scalar UI — ScalarOptions”
KeyTypeDefaultDescription
Section—Http:ApiDocumentation:Scalar
Package—Granit.Http.ApiDocumentation.Scalar
FaviconUrlstring?nullFavicon URL for the Scalar page.
EnableInProductionboolfalseExpose the UI in Production.
AuthorizationPolicystring?nullPolicy for doc/UI endpoints. null = inherit, "" = anonymous.
OAuth2:ClientIdstring?nullPublic OAuth2 client ID (PKCE-capable, browser client).
OAuth2:EnablePkcebooltrueEnable PKCE with S256.
OAuth2:RedirectUristring?nullOverride the OAuth2 redirect URI.

Exception handling — ExceptionHandlingOptions

Section titled “Exception handling — ExceptionHandlingOptions”
KeyTypeDefaultDescription
Section—(configured in code)
Package—Granit.Http.ExceptionHandling
ExposeInternalErrorDetailsboolfalseShow internal error messages in ProblemDetails. Never true in production (ISO 27001).
KeyTypeDefaultDescription
Section—Http:Cors
Package—Granit.Http.Hosting
AllowedOriginsstring[][]Allowed CORS origins. Wildcard * forbidden outside Development (ISO 27001).
AllowCredentialsboolfalseInclude Access-Control-Allow-Credentials.
AutoRegisterMiddlewarebooltruePrepend UseCors() automatically via IStartupFilter.

Response compression — GranitResponseCompressionOptions

Section titled “Response compression — GranitResponseCompressionOptions”
KeyTypeDefaultDescription
Section—Http:ResponseCompression
Package—Granit.Http.Hosting
EnableForHttpsbooltrueCompress HTTPS responses (BREACH mitigated by antiforgery + CORS + SameSite).
EnableBrotlibooltrueEnable the Brotli provider.
EnableGzipbooltrueEnable the gzip fallback provider.
BrotliLevelCompressionLevelFastestBrotli compression level.
GzipLevelCompressionLevelFastestGzip compression level.
KeyTypeDefaultDescription
Section—Http:Cookies
Package—Granit.Http.Cookies
ThrowOnUnregisteredbooltrueFail-fast on unregistered cookies.
DefaultRetentionDaysint365Default cookie retention period.
ThirdPartyServicesarray[]Third-party services for CMP setup (see below).

Each entry in ThirdPartyServices:

KeyTypeDescription
NamestringService identifier (e.g. "matomo").
CategoryCookieCategoryGDPR consent category.
CookiePatternsstring[]Regex patterns matching service cookies.

Cookies — CookieConsent CMP — CookieConsentOptions

Section titled “Cookies — CookieConsent CMP — CookieConsentOptions”
KeyTypeDefaultDescription
Section—Http:Cookies:CookieConsent
Package—Granit.Http.Cookies.CookieConsent
CookieNamestring"cc_cookie"CookieConsent cookie name.
FunctionalCategoryNamestring"functional"CMP category mapped to CookieCategory.Preferences.
AnalyticsCategoryNamestring"analytics"CMP category mapped to CookieCategory.Analytics.
MarketingCategoryNamestring"marketing"CMP category mapped to CookieCategory.Marketing.
SaleOrSharingCategoryNamestring"sale_or_sharing"CMP category mapped to CookieCategory.SaleOrSharing.
Section titled “Cookie consent endpoints — CookieConsentEndpointsOptions”
KeyTypeDefaultDescription
Section—Http:Cookies:Endpoints
Package—Granit.Http.Cookies.Endpoints
RoutePrefixstring"cookies"Route prefix (cookie config + POST /cookies/consent).
TagNamestring"Cookies"OpenAPI tag.

The consent endpoint (POST /cookies/consent) is anonymous, idempotent (optional Idempotency-Key), and gated by the cookie-consent rate-limit policy — configure it under RateLimiting:Policies:cookie-consent. Ledger persistence lives in Granit.Http.Cookies.EntityFrameworkCore; table naming is set by the static GranitHttpCookiesDbProperties (DbTablePrefix default cookie_consent_, DbSchema), not a bound options section.

KeyTypeDefaultDescription
Section—Http:Idempotency
Package—Granit.Http.Idempotency
HeaderNamestring"Idempotency-Key"HTTP header name.
KeyPrefixstring"idp"Redis key prefix.
CompletedTtlTimeSpan1.00:00:00TTL for completed entries.
InProgressTtlTimeSpan00:00:30TTL for in-progress lock.
ExecutionTimeoutTimeSpan00:00:25Max downstream handler execution time.
MaxBodySizeBytesint1048576Max request body size to hash (1 MiB).
AllowInMemoryStoreboolfalseAllow a non-distributed IIdempotencyStore outside Development (fail-loud guard).

Idempotency — Redis store — RedisIdempotencyOptions

Section titled “Idempotency — Redis store — RedisIdempotencyOptions”
KeyTypeDefaultDescription
Section—Http:Idempotency:Redis
Package—Granit.Http.Idempotency.StackExchangeRedis
IsEnabledbooltrueToggle the Redis store module.
Configurationstring"localhost:6379"StackExchange.Redis configuration string.
InstanceNamestring"dd:"Application-scoped Redis key prefix.
RequireTlsbooltrueForce Ssl = true on the connection.

The Redis store encrypts every entry at rest with AES-256-GCM (unconditional). Outside Development, startup fails closed unless a base64 256-bit Cache:Encryption:Key is configured — the same key Granit.Caching uses.

Rate limiting — GranitRateLimitingOptions

Section titled “Rate limiting — GranitRateLimitingOptions”
KeyTypeDefaultDescription
Section—RateLimiting
Package—Granit.RateLimiting
EnabledbooltrueEnable rate limiting.
KeyPrefixstring"rl"Redis key prefix for counters.
FallbackOnCounterStoreFailureCounterStoreFailureBehaviorDenyBehavior when Redis is unavailable.
BypassRolesstring[][]Roles exempt from rate limiting.
UseFeatureBasedQuotasboolfalseUse Granit.Features for plan-based quotas.
AllowInMemoryCounterStoreboolfalseAllow an in-memory counter store outside Development (per-replica limits; fail-loud guard).
PoliciesDictionary{}Named rate limit policies (see below).

Each entry in Policies:

KeyTypeDefaultDescription
AlgorithmRateLimitAlgorithmSlidingWindowSlidingWindow, FixedWindow, or TokenBucket.
PartitionByRateLimitPartitionTenantKey partition: Tenant, TenantAndIp, Ip, User, TenantAndUser.
PermitLimitint1000Max permits per window.
WindowTimeSpan00:01:00Time window for sliding/fixed algorithms.
SegmentsPerWindowint6Segments per sliding window (1—60).
TokenLimitint50Max tokens for TokenBucket.
TokensPerPeriodint10Tokens added per replenishment.
ReplenishmentPeriodTimeSpan00:00:10Interval between replenishments.
FeatureNamestring?nullFeature name override for quota resolution.

Bulkhead isolation — GranitBulkheadOptions

Section titled “Bulkhead isolation — GranitBulkheadOptions”
KeyTypeDefaultDescription
Section—Bulkhead
Package—Granit.Bulkhead
EnabledbooltrueEnable bulkhead isolation.
BypassRolesstring[][]Roles exempt from bulkhead checks.
UseFeatureBasedQuotasboolfalseUse Granit.Features for dynamic limits.
IdleTimeoutTimeSpan00:30:00TTL for idle limiters before eviction.
CleanupIntervalTimeSpan00:05:00Interval between cleanup sweeps.
PoliciesDictionary{}Named bulkhead policies (see below).

Each entry in Policies:

KeyTypeDefaultDescription
PermitLimitint10Max concurrent operations per tenant (1—10,000).
QueueLimitint0Max queued operations. 0 = reject immediately.
QueueTimeoutTimeSpan00:00:30Max time in queue before rejection.
FeatureNamestring?nullFeature name override for dynamic resolution.

Wolverine (core) — WolverineMessagingOptions

Section titled “Wolverine (core) — WolverineMessagingOptions”
KeyTypeDefaultDescription
Section—Wolverine
Package—Granit.Wolverine
RetryDelaysTimeSpan[][00:00:05, 00:00:30, 00:05:00]Cooldown delays between retry attempts.
MaxRetryAttemptsint3Maximum retry attempts.
CodeGenerationModeTypeLoadModeDynamicWolverine codegen mode. Static in production after dotnet run -- codegen write.

Wolverine PostgreSQL — WolverinePostgresqlOptions

Section titled “Wolverine PostgreSQL — WolverinePostgresqlOptions”
KeyTypeDefaultDescription
Section—Wolverine:Postgresql
Package—Granit.Wolverine.Postgresql
TransportConnectionStringstring?nullPostgreSQL connection string for outbox tables. Takes priority over the name below.
TransportConnectionStringNamestring?nullName resolved from ConnectionStrings:{name} (Aspire integration).
SchemaNamestring?nullSchema for envelope tables. Falls back to HostDbSchema, then Wolverine’s default.
TransactionModeTransactionMiddlewareModeEagerEager (ISO 27001-recommended) or Lightweight.

Wolverine SQL Server — WolverineSqlServerOptions

Section titled “Wolverine SQL Server — WolverineSqlServerOptions”
KeyTypeDefaultDescription
Section—Wolverine:SqlServer
Package—Granit.Wolverine.SqlServer
TransportConnectionStringstring?nullSQL Server connection string for outbox tables. Takes priority over the name below.
TransportConnectionStringNamestring?nullName resolved from ConnectionStrings:{name} (Aspire integration).
SchemaNamestring?nullSchema for envelope tables. Falls back to HostDbSchema, then Wolverine’s default (dbo).
TransactionModeTransactionMiddlewareModeEagerEager (ISO 27001-recommended) or Lightweight.
KeyTypeDefaultDescription
Section—Webhooks
Package—Granit.Webhooks
HttpTimeoutSecondsint10HTTP delivery timeout (5—120).
MaxParallelDeliveriesint20Parallel deliveries on the local queue (1—100).
StorePayloadboolfalsePersist delivery payloads (GDPR: validate with DPO).

Notifications (engine) — NotificationsOptions

Section titled “Notifications (engine) — NotificationsOptions”
KeyTypeDefaultDescription
Section—Notifications
Package—Granit.Notifications
MaxParallelDeliveriesint8Max parallel delivery messages.

Notification endpoints — NotificationEndpointsOptions

Section titled “Notification endpoints — NotificationEndpointsOptions”
KeyTypeDefaultDescription
Section—Notifications:Endpoints
Package—Granit.Notifications.Endpoints
RoutePrefixstring"notifications"Route prefix.
TagNamestring"Notifications"OpenAPI tag.
KeyTypeDefaultDescription
Section—Notifications:Email
Package—Granit.Notifications.Email
Providerstring"Smtp"Keyed service provider ("Smtp", "Brevo", "AzureCommunicationServices", "Scaleway", "SendGrid").
SenderAddressstring""Default sender email.
SenderNamestring""Default sender display name.
KeyTypeDefaultDescription
Section—Notifications:Smtp
Package—Granit.Notifications.Smtp
Hoststring"localhost"SMTP server hostname.
Portint587SMTP server port.
UseSslbooltrueUse SSL/TLS.
Usernamestring?nullSMTP username.
Passwordstring?nullSMTP password (from Vault).
TimeoutSecondsint30Connection/send timeout.
KeyTypeDefaultDescription
Section—Notifications:Brevo
Package—Granit.Notifications.Brevo
ApiKeystring""Brevo API key (from Vault).
DefaultSenderEmailstring""Default sender email.
DefaultSenderNamestring""Default sender name.
DefaultSmsSenderIdstring""Default SMS sender ID.
BaseUrlstring"https://api.brevo.com/v3"Brevo API base URL.
TimeoutSecondsint30HTTP request timeout.
KeyTypeDefaultDescription
Section—Notifications:Scaleway
Package—Granit.Notifications.Scaleway
SecretKeystring""Scaleway API secret key (from Vault).
ProjectIdstring""Scaleway project ID.
DefaultSenderEmailstring""Default sender email (must be verified in Scaleway TEM).
DefaultSenderNamestring""Default sender display name.
Regionstring"fr-par"Scaleway region.
BaseUrlstring"https://api.scaleway.com"Scaleway API base URL.
TimeoutSecondsint30HTTP request timeout.
KeyTypeDefaultDescription
Section—Notifications:SendGrid
Package—Granit.Notifications.SendGrid
ApiKeystring""SendGrid API key (from Vault).
DefaultSenderEmailstring""Default sender email (must be verified in SendGrid).
DefaultSenderNamestring""Default sender display name.
SandboxModeboolfalseEnable SendGrid sandbox mode (no actual delivery).
TimeoutSecondsint30HTTP request timeout.
KeyTypeDefaultDescription
Section—Notifications:Twilio
Package—Granit.Notifications.Twilio
AccountSidstring""Twilio Account SID.
AuthTokenstring""Twilio Auth Token (from Vault).
DefaultSmsFromstring""Default SMS sender number (E.164 format) or Messaging Service SID.
DefaultWhatsAppFromstring""Default WhatsApp sender (e.g. whatsapp:+14155238886).
MessagingServiceSidstring?nullTwilio Messaging Service SID (overrides DefaultSmsFrom when set).
TimeoutSecondsint30HTTP request timeout.
KeyTypeDefaultDescription
Section—Notifications:Sms
Package—Granit.Notifications.Sms
Providerstring""Keyed service provider ("Brevo", "AzureCommunicationServices", "AwsSns", "Twilio").
SenderIdstring?nullDefault sender ID.

WhatsApp channel — WhatsAppChannelOptions

Section titled “WhatsApp channel — WhatsAppChannelOptions”
KeyTypeDefaultDescription
Section—Notifications:WhatsApp
Package—Granit.Notifications.WhatsApp
Providerstring""Keyed service provider ("Brevo", "Twilio").
DefaultLanguagestring"fr"Terminal fallback for the template language. Resolution cascade: context.Culture → recipient.PreferredCulture → Granit.Localization.PreferredCulture setting (User → Tenant → Global) → this value.
KeyTypeDefaultDescription
Section—Notifications:WebPush
Package—Granit.Notifications.WebPush
VapidSubjectstring""VAPID subject (mailto: or https: URL).
VapidPublicKeystring""VAPID public key (base64 URL-safe).
VapidPrivateKeystring""VAPID private key (from Vault).
KeyTypeDefaultDescription
Section—Notifications:MobilePush
Package—Granit.Notifications.MobilePush
Providerstring"GoogleFcm"Keyed service provider.

Firebase Cloud Messaging — GoogleFcmOptions

Section titled “Firebase Cloud Messaging — GoogleFcmOptions”
KeyTypeDefaultDescription
Section—Notifications:GoogleFcm
Package—Granit.Notifications.GoogleFcm
ProjectIdstring""Firebase project ID.
ServiceAccountJsonstring""Service account JSON key (from Vault). Consumed to mint OAuth2 bearer tokens for the FCM HTTP v1 API (cached, 5-minute refresh margin, single-flight).
BaseAddressstring"https://fcm.googleapis.com/"FCM API base address.
TimeoutSecondsint30Request timeout.
KeyTypeDefaultDescription
Section—Notifications:AzureCommunicationServices:Email
Package—Granit.Notifications.AzureCommunicationServices
ConnectionStringstring?nullACS connection string. Mutually exclusive with Endpoint.
Endpointstring?nullACS endpoint URI (uses DefaultAzureCredential).
SenderAddressstring""Sender email address (must be verified in ACS).
TimeoutSecondsint120Send operation timeout (ACS emails can take time).
KeyTypeDefaultDescription
Section—Notifications:AzureCommunicationServices:Sms
Package—Granit.Notifications.AzureCommunicationServices
ConnectionStringstring?nullACS connection string. Mutually exclusive with Endpoint.
Endpointstring?nullACS endpoint URI (uses DefaultAzureCredential).
FromPhoneNumberstring""Sender phone number in E.164 format (must start with +).
TimeoutSecondsint30Send operation timeout.

Azure Notification Hubs — AzureNotificationHubsOptions

Section titled “Azure Notification Hubs — AzureNotificationHubsOptions”
KeyTypeDefaultDescription
Section—Notifications:AzureNotificationHubs
Package—Granit.Notifications.AzureNotificationHubs
ConnectionStringstring""Notification Hub connection string.
HubNamestring""Notification Hub name.
TimeoutSecondsint30Send operation timeout.
KeyTypeDefaultDescription
Section—Notifications:SignalR
Package—Granit.Notifications.SignalR
RedisConnectionStringstring?nullRedis connection for SignalR backplane (multi-pod).
KeyTypeDefaultDescription
Section—Notifications:Sse
Package—Granit.Notifications.Sse
HeartbeatIntervalSecondsint30Keep-alive heartbeat interval.

SSE Redis backplane — SseRedisBackplaneOptions

Section titled “SSE Redis backplane — SseRedisBackplaneOptions”
KeyTypeDefaultDescription
Section—Notifications:Sse:StackExchangeRedis
Package—Granit.Notifications.Sse.StackExchangeRedis
ChannelNamestring"granit-notifications-sse"Redis pub/sub channel for cross-replica SSE delivery.
KeyTypeDefaultDescription
Section—Notifications:Zulip
Package—Granit.Notifications.Zulip
DefaultStreamstring"alerts"Default Zulip stream.
DefaultTopicstring"system"Default Zulip topic.
KeyTypeDefaultDescription
Section—Notifications:Zulip:Bot
Package—Granit.Notifications.Zulip
BaseUrlstring""Zulip server base URL.
BotEmailstring""Bot email address.
ApiKeystring""Bot API key (from Vault).
TimeoutSecondsint30Request timeout.

Templating endpoints — TemplatingEndpointsOptions

Section titled “Templating endpoints — TemplatingEndpointsOptions”
KeyTypeDefaultDescription
Section—Templating:Endpoints
Package—Granit.Templating.Endpoints
RoutePrefixstring"templates"Route prefix.
TagNamestring"Templates"OpenAPI tag.
KeyTypeDefaultDescription
Section—DocumentGeneration:Pdf
Package—Granit.DocumentGeneration.Pdf
PaperFormatstring"A4"Paper format (A4, A5, Letter).
LandscapeboolfalseLandscape orientation.
MarginTopstring"10mm"Top margin (CSS units).
MarginBottomstring"10mm"Bottom margin.
MarginLeftstring"10mm"Left margin.
MarginRightstring"10mm"Right margin.
HeaderTemplatestring?nullHTML header template (PuppeteerSharp classes).
FooterTemplatestring?nullHTML footer template.
PrintBackgroundbooltruePrint background graphics.
ChromiumExecutablePathstring?nullCustom Chromium path. null = PuppeteerSharp-managed.
MaxConcurrentPagesint4Max parallel Chromium tabs (1—32).

KeyTypeDefaultDescription
Section—DataExchange
Package—Granit.DataExchange
DefaultMaxFileSizeMbint50Max file size (MB) unless overridden per definition.
DefaultBatchSizeint500Default import batch size.
FuzzyMatchThresholddouble0.8Minimum fuzzy matching score for mapping suggestions.
KeyTypeDefaultDescription
Section—DataExchange:Export
Package—Granit.DataExchange

The section currently has no settings of its own — every export is dispatched asynchronously via ICommandSender, so there is no background-vs-synchronous row-count threshold to configure. Export sizing/dispatch is controlled entirely by the caller’s request and each writer’s own limits (e.g. the Excel 1,048,576-row worksheet cap).

Data exchange endpoints — DataExchangeEndpointsOptions

Section titled “Data exchange endpoints — DataExchangeEndpointsOptions”
KeyTypeDefaultDescription
Section—DataExchange:Endpoints
Package—Granit.DataExchange.Endpoints
RoutePrefixstring"data-exchange"Route prefix.
RequiredRolestring"granit-data-exchange-admin"Fallback authorization role.
TagNamestring"Data Exchange"OpenAPI tag.

Data exchange retention (GDPR sweep) — DataExchangeRetentionOptions

Section titled “Data exchange retention (GDPR sweep) — DataExchangeRetentionOptions”
KeyTypeDefaultDescription
Section—DataExchange:Retention
Package—Granit.DataExchange.BackgroundJobs
ImportFileRetentionTimeSpan30.00:00:00 (30 days)How long an uploaded import file is kept after the job reaches a terminal state before the sweep purges it from blob storage.
ExportFileRetentionTimeSpan7.00:00:00 (7 days)How long a generated export file is kept before purge. Shorter than import retention by default — an export is a derived, re-downloadable artifact.
JobRecordRetentionTimeSpan365.00:00:00 (365 days)How long a terminal job’s database row (metadata, not the file) is kept before hard-delete.
StuckJobTimeoutTimeSpan06:00:00 (6 hours)How long a job may sit in a non-terminal executing state before the sweep treats it as stranded and force-fails it.
SweepBatchSizeint500Max jobs processed per category, per run.

Validated at startup by DataExchangeRetentionOptionsValidator (TimeSpan values can’t be expressed with [Range]). Opt-in via [DependsOn(typeof(GranitDataExchangeBackgroundJobsModule))] — the base Granit.DataExchange module does not schedule the sweep on its own.


Workflow endpoints — WorkflowEndpointsOptions

Section titled “Workflow endpoints — WorkflowEndpointsOptions”
KeyTypeDefaultDescription
Section—Workflow:Endpoints
Package—Granit.Workflow.Endpoints
RoutePrefixstring"workflow"Route prefix.
RequiredRolestring"granit-workflow-admin"Fallback authorization role.
TagNamestring"Workflow"OpenAPI tag.

KeyTypeDefaultDescription
Section—Observability
Package—Granit.Observability
ServiceNamestring"unknown-service"OTEL service name.
ServiceVersionstring"0.0.0"Service version.
OtlpEndpointstring"http://localhost:4317"OTLP gRPC endpoint.
ServiceNamespacestring"my-company"OTEL service namespace.
Environmentstring"development"Deployment environment.
EnableTracingbooltrueEnable trace export.
EnableMetricsbooltrueEnable metrics export.
KeyTypeDefaultDescription
Section—(configured in code)
Package—Granit.Diagnostics
LivenessPathstring"/health/live"Liveness probe path.
ReadinessPathstring"/health/ready"Readiness probe path.
StartupPathstring"/health/startup"Startup probe path.
DefaultCacheDurationTimeSpan00:00:10Health check cache duration.

Timeline endpoints — TimelineEndpointsOptions

Section titled “Timeline endpoints — TimelineEndpointsOptions”
KeyTypeDefaultDescription
Section—Timeline:Endpoints
Package—Granit.Timeline.Endpoints
RoutePrefixstring"timeline"Route prefix.
RequiredRolestring"granit-timeline-user"Fallback authorization role.
TagNamestring"Timeline"OpenAPI tag.

Blob storage (core) — BlobStorageOptions

Section titled “Blob storage (core) — BlobStorageOptions”
KeyTypeDefaultDescription
Section—BlobStorage
Package—Granit.BlobStorage
UploadUrlExpiryTimeSpan00:15:00Pre-signed upload URL TTL.
DownloadUrlExpiryTimeSpan00:05:00Pre-signed download URL TTL.

Extends BlobStorageOptions with S3-specific settings. Bound from the same BlobStorage section.

KeyTypeDefaultDescription
Section—BlobStorage
Package—Granit.BlobStorage.S3
ServiceUrlstring""S3-compatible endpoint URL.
AccessKeystring""S3 access key (from Vault).
SecretKeystring""S3 secret key (from Vault).
Regionstring"us-east-1"S3 region identifier.
DefaultBucketstring""Default bucket name.
ForcePathStylebooltrueUse path-style URLs (required for MinIO).
TenantIsolationBlobTenantIsolationPrefixPrefix or BucketPerTenant.

Extends BlobStorageOptions with Azure Blob-specific settings. Bound from the same BlobStorage section.

KeyTypeDefaultDescription
Section—BlobStorage
Package—Granit.BlobStorage.AzureBlob
ConnectionStringstring""Azure Storage connection string (from Vault).
DefaultContainerstring""Default blob container name.
UseManagedIdentityboolfalseUse Azure Managed Identity instead of connection string.
ServiceUristring""Storage account URI (required when UseManagedIdentity = true).
TenantIsolationBlobTenantIsolationPrefixPrefix or Container (one per tenant).

Blob storage FileSystem — FileSystemBlobOptions

Section titled “Blob storage FileSystem — FileSystemBlobOptions”

Extends BlobStorageOptions with local file system settings. Bound from the same BlobStorage section.

KeyTypeDefaultDescription
Section—BlobStorage
Package—Granit.BlobStorage.FileSystem
BasePathstring""Root directory for blob storage (required).

Blob storage DbStore — DbStoreBlobOptions

Section titled “Blob storage DbStore — DbStoreBlobOptions”

Extends BlobStorageOptions with database storage settings. Bound from the same BlobStorage section.

KeyTypeDefaultDescription
Section—BlobStorage
Package—Granit.BlobStorage.DbStore
MaxBlobSizeByteslong10485760 (10 MB)Maximum blob size accepted by the provider.

Configuration for the proxy endpoint provider used by FileSystem and DbStore providers. Bound from the BlobStorage:Proxy section.

KeyTypeDefaultDescription
Section—BlobStorage:Proxy
Package—Granit.BlobStorage.Proxy
BaseUrlstring""Public URL of the API server (required).
RoutePrefixstring"/api/blobs"Route prefix for proxy endpoints.
MaxUploadByteslong104857600 (100 MB)Maximum upload size through proxy.

KeyTypeDefaultDescription
Section—BackgroundJobs
Package—Granit.BackgroundJobs
ModeJobStoreModeInMemoryInMemory (dev) or Durable (EF Core).
ConnectionStringstring""DB connection string (required when Mode is Durable).

Background jobs endpoints — BackgroundJobsEndpointsOptions

Section titled “Background jobs endpoints — BackgroundJobsEndpointsOptions”
KeyTypeDefaultDescription
Section—BackgroundJobs:Endpoints
Package—Granit.BackgroundJobs.Endpoints
RoutePrefixstring"background-jobs"Route prefix.
RequiredRolestring"granit-background-jobs-admin"Fallback authorization role.
TagNamestring"Background Jobs"OpenAPI tag.

Localization — GranitLocalizationOptions

Section titled “Localization — GranitLocalizationOptions”
KeyTypeDefaultDescription
Section—(configured in code via lambda)
Package—Granit.Localization
EnableAutoDiscoveryboolfalseAuto-discover JSON localization resources by naming convention.

GranitLocalizationOptions is primarily configured through code (services.AddGranitLocalization(options => ...)) rather than appsettings.json. Properties like Languages, Resources, and FormattingCultures are populated programmatically.

Localization overrides cache — LocalizationOverridesCacheOptions

Section titled “Localization overrides cache — LocalizationOverridesCacheOptions”
KeyTypeDefaultDescription
Section—(configured in code)
Package—Granit.Localization
CacheTtlTimeSpan00:05:00In-memory TTL for DB override dictionaries.

Localization endpoints — LocalizationEndpointsOptions

Section titled “Localization endpoints — LocalizationEndpointsOptions”
KeyTypeDefaultDescription
Section—Localization:Endpoints
Package—Granit.Localization.Endpoints
RoutePrefixstring"localization"Route prefix.
TagNamestring"Localization"OpenAPI tag.