This page comes from docs/configuration-reference.md in the repository.
Do not edit this file. The program makes it from the table of keys in src/config/keys.rs. To make it again, run scripts/cargo.sh run --quiet -- config-reference > docs/configuration-reference.md in the root of the repository. A test makes sure that this file and the table agree.
Rules
- An unknown block, an unknown attribute or a duplicate attribute stops the start.
- A value that is not in its range stops the start. The error gives the key and the line.
- A key without a value in the file has its default value. A key with
(required)must have a value. - A file needs one
accessblock. The block has modeauthzenor modeopen. - A file needs one
bucketblock or onevolumeblock at least. Abucketblock needs anauthblock. - A duration is one whole number and one unit:
ms,s,morh. For example:500ms,30s,5m,1h. A sign, a fraction, a space or two units (1m30s) stops the start. stowr print-config -c <file>checks the file, writes the value of each key and its source, and exits with status 0. The source isfile,env:<VAR>,file:<path>ordefault. The output hides each secret.- At start, the server writes the same values in its log.
Values from the environment or from a file
The column Forms gives the forms of each key:
value:<name> = "...". The value is in the file._env:<name>_env = "VAR". The value is in the environment variableVAR._file:<name>_file = "/path". The value is the content of the file, without the last line end. A relative path starts at the directory of the configuration file.
Give one form only. Two forms stop the start. A variable that does not exist, an empty value, or a file that the server cannot read stops the start. The server reads each variable and each file one time, at start. The server reads no environment variable that the file does not name.
A secret key has yes in the column Secret. A secret accepts only _env and _file: a secret in clear text in the file stops the start. The output of print-config and the log show <hidden> for it.
No change of a value
The value in the file is the value that applies. The server does not remove spaces, does not change the case, and does not add or remove a /. A value that does not fit stops the start. The error gives the key, the expected form and the value.
An error about a secret does not show the value. A text value must not be empty. It must not have a space at the start or at the end. To use the default of a key, remove the key.
server
Syntax: server { ... }. Zero or one block. The listener, the logs and the limits of the process.
| Key | Type | Default | Range | Forms | Secret | Use |
|---|---|---|---|---|---|---|
listen | text | ":8080" | a numeric host:port, not a URL | value | no | The address and the port that the server listens on. |
job_history_limit | integer | 10 | 1 to 20 | value | no | The number of finished background jobs that the process keeps in memory. |
access_mode | text | "inherit_credentials" | inherit_credentials or force_read_only | value | no | force_read_only refuses each write and each delete. |
log_mode | text | "anonymous" | anonymous or detailed | value | no | anonymous keeps the object keys out of the request log. detailed writes them. |
allow_full_object_fallback | boolean | false | value | no | Let a parser read a full object when a format has no range reader. | |
memory_limit_bytes | integer | 0 | 0, or 33554432 to 1125899906842624 | value | no | A soft limit of the memory of the process. 0 sets no limit. The server accepts the value and shows it. |
max_storage_bytes_per_request | integer | 274877906944 | 1048576 to 1125899906842624 | value | no | The provider bytes that one HTTP request can transfer. |
max_storage_requests_per_request | integer | 4096 | 1 to 10000000 | value | no | The provider calls that one HTTP request can make. |
max_range_cache_bytes | integer | 8388608 | 1048576 to 4294967296 | value | no | The memory cache of one range reader session. |
max_concurrent_storage_requests | integer | 4 | 1 to 1024 | value | no | The provider calls that run at the same time, for all the buckets. |
max_concurrent_requests_per_storage | integer | 2 | 1 to 256, and not more than max_concurrent_storage_requests | value | no | The provider calls that run at the same time for one bucket. |
session_ttl_seconds | integer | 1200 | 30 to 604800 | value | no | The life of a preview session in memory. |
max_stats_folders | integer | 1000 | 100 to 1000000 | value | no | The folder totals that one Insights result keeps. |
max_archive_entries | integer | 10000 | 1 to 1000000 | value | no | The entries of a ZIP central directory that the server reads, and the members that a request can select. |
max_background_storage_bytes | integer | 274877906944 | 1048576 to 1125899906842624 | value | no | The provider bytes that one background job can transfer. |
max_background_storage_requests | integer | 100000 | 1 to 10000000 | value | no | The provider calls that one background job can make. |
access
Syntax: access { ... }. Exactly one block. Required. It sets the policy of access (docs/ACCESS.md). Without it, the start stops.
| Key | Type | Default | Range | Forms | Secret | Use |
|---|---|---|---|---|---|---|
mode | text | (required) | authzen or open (lower case) | value | no | authzen: the server checks the identity token and asks the PDP. open: the server makes no check and writes a warning at start. |
access.identity
Syntax: access { identity { ... } }. One block with mode authzen. No block with mode open. The rules to check the identity token.
| Key | Type | Default | Range | Forms | Secret | Use |
|---|---|---|---|---|---|---|
header | text | "X-Identity-Token" | 1 to 64 characters: letters, digits and "-". Not Cookie, Authorization, Proxy-Authorization, Host, Content-Type or Content-Length | value | no | The name of the HTTP header that holds the identity token. |
issuer | text | (required) | 1 to 1024 bytes of UTF-8, without a control character | value | no | The iss of the identity tokens that the server accepts. |
audience | text | (required) | 1 to 256 bytes of UTF-8, without a control character | value | no | The id of this service. It is the aud of the tokens, the server of the action document and the root of each chain of resources. |
public_keys | text | (required) | PEM (1 to 16 -----BEGIN PUBLIC KEY----- blocks) or a JWK Set (RFC 7517) with 1 to 16 keys. Each key is Ed25519 or P-256 | value, _env, _file | no | The public keys of the issuer. A text that starts with "{" is a JWK Set, other text is PEM. The server checks the signature of each identity token with them. It is not a secret: print-config shows the type and the kid of each key. |
max_age | duration | "5m" | 1s to 24h, whole seconds | value | no | The longest life (exp minus iat) of an identity token. |
clock_skew | duration | "60s" | 0s to 5m, whole seconds | value | no | The difference between the clock of the server and the clock of the issuer that the server accepts. |
access.pdp
Syntax: access { pdp { ... } }. One block with mode authzen. No block with mode open. The connection to the policy decision point (PDP).
| Key | Type | Default | Range | Forms | Secret | Use |
|---|---|---|---|---|---|---|
url | URL | (required) | http or https, with a host, without credentials, query or fragment, and without a "/" at the end | value, _env, _file | no | The base URL of the PDP. The server reads the endpoints from the metadata of the PDP: /.well-known/authzen-configuration after the host, then the path of the URL. For example, https://pdp.example/t gives https://pdp.example/.well-known/authzen-configuration/t. When the PDP has no metadata (status 404, 405, 410 or 501), the server adds /access/v1/evaluation and /access/v1/evaluations to the URL. |
plain_http | boolean | false | true with an http URL. false with an https URL | value | no | true accepts an http URL: the server then sends the token and the questions without TLS. Use it only on a trusted network. |
token | text | (required) | 1 to 4096 bytes, no space and no control character | _env, _file | yes | The bearer token that the server sends to the PDP. It is a secret: the form in clear text stops the start. |
timeout | duration | "500ms" | 10ms to 1m | value | no | The deadline of one request to the PDP, without context.usage. |
usage_timeout | duration | "6s" | 100ms to 1m, and not less than timeout | value | no | The shortest wait for one question with context.usage. The server waits for the longer of this value and procurauth_usage_max_seconds plus 1s. |
cache_ttl | duration | "30s" | 0s to 1h | value | no | The life of an answer of the PDP in memory. 0s keeps no answer. |
max_evaluations | integer | 64 | 1 to 1024 | value | no | The most items in one Access Evaluations request. |
auth
Syntax: auth "<id>" { ... }. One or more blocks. A credential set and an endpoint that one or more buckets use.
| Key | Type | Default | Range | Forms | Secret | Use |
|---|---|---|---|---|---|---|
provider | text | (required) | s3 or gcs (lower case) | value | no | The storage protocol. |
mode | text | s3: access_key with credentials, else anonymous. gcs: service_account with credentials_file, else anonymous | s3: access_key or anonymous. gcs: service_account or anonymous | value | no | How the server signs the provider requests. |
endpoint | URL | s3: (required). gcs: https://storage.googleapis.com | http or https, without credentials, query or fragment, and without a "/" at the end | value | no | The base URL of the provider. |
region | text | s3: (required) | value | no | The region that the S3 signature uses. | |
access_key_id | text | (none) | s3 access_key mode only; no space at the start or at the end | value, _env, _file | no | The S3 access key id. It is an identifier, not a secret: print-config shows it. |
secret_access_key | text | (none) | s3 access_key mode only; no space and no control character | _env, _file | yes | The S3 secret access key. It is a secret: the form in clear text stops the start. |
session_token | text | (none) | s3 only; no space and no control character | _env, _file | yes | The S3 session token. It is a secret: the form in clear text stops the start. |
credentials_file | file path | (none) | gcs service_account mode only | value | no | The JSON file of a GCS service account. A relative path starts at the directory of the configuration file. |
insecure_skip_verify | boolean | false | value | no | Do not verify the TLS certificate of the provider. Use it only for a test. |
auth.usage
Syntax: auth "<id>" { usage { ... } }. Zero or one block in an auth block with provider "s3". The admin API that gives the usage and the quota of the buckets of the auth block (docs/ARCHITECTURE.md, "Usage and quota of a bucket"). Without it, the interface shows no usage and no quota.
| Key | Type | Default | Range | Forms | Secret | Use |
|---|---|---|---|---|---|---|
source | text | (required) | garage, seaweedfs or minio, exact (lower case) | value | no | The reader of the usage and of the quota. The server never guesses it from the provider. |
endpoint | URL | garage: (required), the admin API. seaweedfs: (required), the master. minio: the endpoint of the auth block | http or https, without credentials, query or fragment, and without a "/" at the end | value | no | The base URL of the admin API. print-config and the effective configuration in the log show it. The answers of the server and the error messages never show it. |
filer_endpoint | URL | seaweedfs: (required). Other sources: (none) | seaweedfs only. http or https, without credentials, query or fragment, and without a "/" at the end | value | no | The base URL of the filer of SeaweedFS. The filer gives the quota of a bucket. |
token | text | garage: (required). Other sources: (none) | garage only; 1 to 4096 bytes, no space and no control character | _env, _file | yes | The admin token of Garage. It is a secret: the form in clear text stops the start. minio signs with the S3 credentials of the auth block. seaweedfs sends no credential. |
bucket
Syntax: bucket "<id>" { ... }. One or more blocks. One bucket that the browser shows. The label is the id of the bucket in the URL.
| Key | Type | Default | Range | Forms | Secret | Use |
|---|---|---|---|---|---|---|
name | text | the label of the block | value | no | The name that the user interface shows. | |
auth | text | (required) | the label of an auth block | value | no | The auth block that this bucket uses. |
bucket | text | (required) | value | no | The name of the bucket at the provider. | |
permissions | list of text | (none: no ceiling) | read, write, delete (lower case, each one time) | value | no | The operations that the server can do on this bucket. It is a ceiling: the provider can refuse more. |
root_prefix | text | "" | "", or a prefix that ends with "/" and does not start with "/" | value | no | The part of the bucket that the browser shows. The keys are relative to it. |
max_scan_pages | integer | 1 | 0 to 1000000 | value | no | The 1000-entry provider pages that one listing combines. 0 = no limit. |
encryption | text | "" | "" or sse-s3, exact (lower case). SSE-C and SSE-KMS are not supported. Only for an s3 auth block | value | no | The server-side encryption that the server asks for each object that it writes: upload, copy, move, rename, metadata edit, restore of a version, extraction. sse-s3 sends x-amz-server-side-encryption: AES256. "" sends no encryption header: the default encryption of the bucket applies. |
quota_bytes | integer | (none: the limit of the provider, or no limit) | 1 to 1152921504606846976. Only with a usage block in the auth block | value | no | The size limit of the bucket that the interface shows when the provider gives no limit. The server does not enforce it. |
volume
Syntax: volume "<id>" { ... }. Zero or more blocks. One folder of the server that the browser shows as a bucket: a Docker volume, an NFS, CephFS or FUSE mount (docs/ARCHITECTURE.md, "Volumes"). The label is the id of the volume in the URL (/-/volume/<id>/). A file needs one bucket block or one volume block at least.
| Key | Type | Default | Range | Forms | Secret | Use |
|---|---|---|---|---|---|---|
name | text | the label of the block | value | no | The name that the user interface shows. | |
path | file path | (required) | an absolute path, without "/" at the end and without an empty, "." or ".." part. The folder must exist at start, and the process must read it | value | no | The folder of the volume. The server reads and writes its files with the identity of the process. The start writes and removes a test file when permissions has write or delete, or when it is absent. A folder that the process cannot write stops the start. |
permissions | list of text | (none: read, write and delete) | read, write, delete (lower case, each one time) | value | no | The operations that the server can do in this volume. It is a ceiling: the file system can refuse more. Give ["read"] for a folder that the process cannot write. |
root_prefix | text | "" | "", or a relative folder path that ends with "/", without an empty, "." or ".." part. The folder must exist at start | value | no | The folder of path that the browser shows. The keys are relative to it. A symbolic link that leaves it is not followed. |
max_scan_pages | integer | 1 | 0 to 1000000 | value | no | The 1000-entry pages of a folder that one listing combines. 0 = no limit. |