Operations
Configuration
Every setting of the database server, and how to set it.
The database server reads its settings from appsettings.json, appsettings.{Environment}.json, environment
variables and command-line arguments, in that order. In environment variables, use __ for ::
OmniCore__Auth__Audience. With occtl, put extra settings in the deployment file's
env maps.
Host
Section OmniCore.
| Setting | Default | Description |
|---|---|---|
DataDirectory | data | The folder for every database file. Relative paths are from the content root. In Docker: /data. |
DurableWrites | true | Flush every write to disk before answering. false survives a process crash but not a power cut, and is faster. |
SeedSampleSchema | false (true in Development) | Define the sample Contact, Customer and Staff schema at start-up when the schema is empty. |
DefaultPageSize | 100 | Page size for lists and queries when $take isn't given. |
MaxPageSize | 1000 | The largest $take a client may ask for. |
InstallBuiltInWebParts | true | Write OmniCore's own web part packages (the charts and the basic parts) into the resources at start-up, unless the same version is there. A package that can't be written is logged, and the server starts without it. |
Authentication
Section OmniCore:Auth. See Authentication and identity for examples.
| Setting | Default | Description |
|---|---|---|
Enabled | true | When false, every request is treated as a System Admin, with a warning. Local experiments only. |
Authority | — | The identity provider's issuer URL, such as https://login.microsoftonline.com/{tenant}/v2.0. Keys and the issuer are read from its OpenID metadata. |
MetadataAddress | {Authority}/.well-known/openid-configuration | Where to read the metadata, when the server shouldn't use the public authority URL (in a cluster, the identity server's internal address). Tokens must still carry the public authority as their issuer. |
Audience | omnicore-api | The audience tokens must be issued for, usually the API's application id. |
Issuer | — | The expected issuer. Taken from the metadata if not set; required with SigningKey. |
SigningKey | — (a dev key in Development) | A shared HMAC-SHA256 key of at least 32 bytes, instead of an authority. Development and tests only. |
SubjectClaim | sub | The claim that identifies the caller, matched against role assignments. Use oid for Entra ID. |
RoleClaim | — | A claim (such as roles) whose values also count as roles. |
ClientId | — | The public client id tools such as OmniCore Admin should sign in with; advertised by /api/auth/config. |
BootstrapAdmins | [] (["dev-admin"] in Development) | Subjects that are always System Admins. |
RequireHttpsMetadata | true | Require HTTPS for the authority's metadata. false only for a local http:// provider. |
EnableDevTokens | false (true in Development) | Turns on POST /api/dev/token. Works only in Development with a SigningKey. |
A JSON
nullin appsettings binds as an empty string. The server treats blank values as not set.
Resources
Section OmniCore:Resources.
| Setting | Default | Description |
|---|---|---|
MaxFileBytes | 67108864 (64 MB) | The largest file that can be uploaded (413 above it). |
MaxTotalBytes | — (no limit) | Uploads are refused (507) once all resources together would pass this. |
MaxBytesPerUser | — (no limit) | Uploads are refused (507) once one user's resources would pass this. System Admins are exempt. Replacing a file counts only the difference. |
AdditionalContentTypes | {} | Extra extension-to-type mappings, which win over the built-in table: { ".owp": "application/zip" }. |
Start-up checks
Outside Development, authentication is on, and the server refuses to start until it has an identity provider:
Authentication is enabled but neither OmniCore:Auth:Authority (your identity provider) nor OmniCore:Auth:SigningKey is set.
This is deliberate. Configure an Authority, or set OmniCore:Auth:Enabled=false for local experiments only.
Examples
# Environment variables, for a container
$env:OmniCore__DataDirectory = "/data"
$env:OmniCore__Auth__Authority = "https://login.microsoftonline.com/<tenant-id>/v2.0"
$env:OmniCore__Auth__Audience = "<api application id>"
$env:OmniCore__MaxPageSize = "500"# In an OmniCoreDeployment file
spec:
database:
env:
OmniCore__MaxPageSize: "500"
OmniCore__Resources__MaxBytesPerUser: "1073741824"The identity provider
OmniCore.Identity's settings are in the Identity section; see
Authentication and identity.