Skip to content

Configuration ​

Authora reads its settings from appsettings.json, appsettings.{Environment}.json, environment variables and command-line arguments, in this order; later sources win.

  • Environment variables use __ instead of :, e.g. Authora__OAuth__Issuer. List items get an index: Authora__Oidc__AdditionalKeyPaths__0.
  • Durations use the format [d.]hh:mm:ss, e.g. 00:15:00 for 15 minutes or 90.00:00:00 for 90 days. A plain number is read as days (15 is 15 days), and the upper limits make startup fail on that mistake.
  • Validation: Authora checks every setting at startup and refuses to start with an invalid one, naming the setting.

Required settings ​

SettingDescription
ConnectionStrings:DatabasePostgreSQL connection string, e.g. Host=db;Database=authora;Username=authora_app;Password=….
Authora:OAuth:IssuerThe public URL of Authora, e.g. https://auth.example.com. HTTPS; HTTP only for loopback hosts in Development and Testing. No query, no fragment, no trailing /. All endpoint URLs and the iss claim are built from it. Use a dedicated host without a path: Authora serves its endpoints at the root, so a path prefix is not supported.
Authora:Oidc:SigningKeyPathPEM file with the RSA private key (at least 2048 bits, unencrypted) that signs ID Tokens. Relative paths are resolved against the content root.
AllowedHostsHost names Authora answers to, separated by ;, e.g. auth.example.com. Outside Development and Testing, it must be set and must not contain *.

OAuth ​

SettingDefaultLimitsDescription
Authora:OAuth:AuthorizationCodeLifetime00:01:00at most 10 minutesLifetime of Authorization Codes.
Authora:OAuth:GrantLifetime90.00:00:00at most 365 daysAbsolute lifetime of a Grant, counted from the code exchange. No token of the Grant expires later, so rotating Refresh Tokens cannot keep it alive; afterwards the User has to approve the Client again.
Authora:OAuth:CorsOriginsCacheDuration00:01:00at most 1 hourHow long the allowed CORS origins (from the Redirect URIs of enabled Clients) are cached. 00:00:00 disables the cache.

Lifetimes of Access and Refresh Tokens are set per Client, in the admin interface or API: Access Tokens 3600 seconds by default (at most 1 day), Refresh Tokens 86400 seconds by default (at most 90 days, and always longer than the Access Token lifetime).

OpenID Connect ​

SettingDefaultLimitsDescription
Authora:Oidc:SigningKeyPath– (required)See above. Startup fails if the file is missing, unreadable, encrypted, not RSA, shorter than 2048 bits or only a public key.
Authora:Oidc:AdditionalKeyPaths[]PEM files with RSA keys that are only published in the JWKS, for key rotation. Public keys are enough.
Authora:Oidc:IdTokenLifetime00:05:00at most 1 hourLifetime of ID Tokens.
Authora:Oidc:KeyReloadInterval00:01:0010 seconds to 1 hourHow often the key files are checked for changes. Changing it needs a restart.

Sign-in and Sessions ​

SettingDefaultLimitsDescription
Authora:SignIn:SessionIdleTimeout02:00:00at most 24 hoursA Session ends after this time without use. Keep it longer than the Access Token lifetime of the admin interface's Client, or active administrators are asked for their password again.
Authora:SignIn:SessionLifetime12:00:00at most 7 days, not shorter than the idle timeoutA Session ends after this time regardless of use.
Authora:SignIn:MaxFailedAttempts51 to 100Failed sign-ins in a row that lock a User out.
Authora:SignIn:LockoutDuration00:15:00at most 1 hourHow long a User stays locked out. Kept short, because anyone who knows an Email can trigger a lockout.

Rate limits ​

Per client IP address. Behind a reverse proxy, configure Authora:ForwardedHeaders, or all clients share one limit.

SettingDefaultLimitsDescription
Authora:RateLimiting:SignInPermitsPerMinute101 to 100000Sign-in attempts per minute.
Authora:RateLimiting:TokenPermitsPerMinute3001 to 100000Requests to /oauth/token, /oauth/revoke, /admin/callback and /admin/session/refresh per minute. /oauth/introspect is not limited.

Requests over the limit get 429 Too Many Requests.

Reverse proxy ​

SettingDefaultLimitsDescription
Authora:ForwardedHeaders:KnownProxies[]valid IP addressesProxies whose X-Forwarded-For and X-Forwarded-Proto headers are trusted.
Authora:ForwardedHeaders:KnownNetworks[]CIDR, at most /8 (IPv4) or /7 (IPv6) broad, not containing ::ffff:0:0/96Networks whose forwarded headers are trusted.
Authora:ForwardedHeaders:ForwardLimit11 to 10Number of proxies in front of Authora.

The forwarded headers are only read when one of the lists is set. See Configure a reverse proxy.

Data Protection ​

SettingDefaultDescription
Authora:DataProtection:KeysPathnot setDirectory for the keys that encrypt antiforgery tokens and admin interface cookies, shared by all instances. Without it, keys are kept in the home directory of the user that runs Authora, or only in memory. The container image sets /var/lib/authora/keys.
Authora:DataProtection:CertificatePathnot setPKCS#12 file (.pfx) with a certificate and its private key that encrypts the keys at rest. Requires KeysPath.
Authora:DataProtection:CertificatePasswordnot setPassword of the certificate file.

See Persist Data Protection keys.

Bootstrap ​

Used when Authora starts. Nothing is created a second time.

SettingDefaultDescription
Authora:Bootstrap:Administrator:Emailnot setEmail of the first administrator. If no administrator who can sign in exists and this is set, Authora creates one with the admin Role.
Authora:Bootstrap:Administrator:Passwordnot setInitial password, 12 to 128 characters. Required while the administrator still has to be created. Remove it afterwards; Authora logs event 7007 while it is set.
Authora:Bootstrap:Administrator:FirstNameAuthora
Authora:Bootstrap:Administrator:LastNameAdministrator
Authora:Bootstrap:Client:NameAuthora AdminName of an optional Public Client for the admin API.
Authora:Bootstrap:Client:RedirectUris[]If set, Authora creates that Client, allowed the Scope authora.admin, as long as no enabled Client other than the admin interface's own is allowed authora.admin. Useful for scripts, see Call the admin API.

Admin interface ​

SettingDefaultDescription
Authora:AdminUi:EnabledtrueWhen false, /admin/* answers 404 and its Client is not created. An existing Client is kept.

Cleanup ​

A background service deletes expired data.

SettingDefaultLimitsDescription
Authora:Cleanup:Interval01:00:001 minute to 1 dayHow often the cleanup runs. The first run is one interval after startup.
Authora:Cleanup:Retention7.00:00:00at least 1 dayHow long Authorization Codes, Grants, tokens and Sessions are kept after they expired or were revoked. Reuse of a consumed code or Refresh Token is only detected while its row exists.
Authora:Cleanup:BatchSize10001 to 10000Rows deleted per statement.
Authora:Cleanup:AuditRetention365.00:00:00at least 30 daysHow long audit events are kept.

Audit log ​

SettingDefaultLimitsDescription
Authora:Audit:SealInterval00:00:051 second to 5 minutesHow often new audit events are sealed into the hash chain.
Authora:Audit:BatchSize10001 to 10000Events sealed or verified per batch.

ASP.NET Core settings ​

Standard ASP.NET Core settings work as usual, for example:

SettingUse
ASPNETCORE_ENVIRONMENTProduction (default), Development. Only Development serves Swagger UI and relaxes the production checks.
ASPNETCORE_URLS, ASPNETCORE_HTTP_PORTSWhere Kestrel listens. The container image listens on HTTP port 8080.
Kestrel:Certificates:Default:Path, …:KeyPath, …:PasswordTLS certificate when Kestrel terminates TLS.
Logging:LogLevel:*Log levels.

Released under the MIT License.