Version 0.3.1 Generated from the code

Configuration reference

Each key with its type, its default, its range and its forms. The program makes this page from its table of keys.

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 access block. The block has mode authzen or mode open.
  • A file needs one bucket block or one volume block at least. A bucket block needs an auth block.
  • A duration is one whole number and one unit: ms, s, m or h. 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 is file, env:<VAR>, file:<path> or default. 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 variable VAR.
  • _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.

KeyTypeDefaultRangeFormsSecretUse
listentext":8080"a numeric host:port, not a URLvaluenoThe address and the port that the server listens on.
job_history_limitinteger101 to 20valuenoThe number of finished background jobs that the process keeps in memory.
access_modetext"inherit_credentials"inherit_credentials or force_read_onlyvaluenoforce_read_only refuses each write and each delete.
log_modetext"anonymous"anonymous or detailedvaluenoanonymous keeps the object keys out of the request log. detailed writes them.
allow_full_object_fallbackbooleanfalsevaluenoLet a parser read a full object when a format has no range reader.
memory_limit_bytesinteger00, or 33554432 to 1125899906842624valuenoA soft limit of the memory of the process. 0 sets no limit. The server accepts the value and shows it.
max_storage_bytes_per_requestinteger2748779069441048576 to 1125899906842624valuenoThe provider bytes that one HTTP request can transfer.
max_storage_requests_per_requestinteger40961 to 10000000valuenoThe provider calls that one HTTP request can make.
max_range_cache_bytesinteger83886081048576 to 4294967296valuenoThe memory cache of one range reader session.
max_concurrent_storage_requestsinteger41 to 1024valuenoThe provider calls that run at the same time, for all the buckets.
max_concurrent_requests_per_storageinteger21 to 256, and not more than max_concurrent_storage_requestsvaluenoThe provider calls that run at the same time for one bucket.
session_ttl_secondsinteger120030 to 604800valuenoThe life of a preview session in memory.
max_stats_foldersinteger1000100 to 1000000valuenoThe folder totals that one Insights result keeps.
max_archive_entriesinteger100001 to 1000000valuenoThe entries of a ZIP central directory that the server reads, and the members that a request can select.
max_background_storage_bytesinteger2748779069441048576 to 1125899906842624valuenoThe provider bytes that one background job can transfer.
max_background_storage_requestsinteger1000001 to 10000000valuenoThe 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.

KeyTypeDefaultRangeFormsSecretUse
modetext(required)authzen or open (lower case)valuenoauthzen: 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.

KeyTypeDefaultRangeFormsSecretUse
headertext"X-Identity-Token"1 to 64 characters: letters, digits and "-". Not Cookie, Authorization, Proxy-Authorization, Host, Content-Type or Content-LengthvaluenoThe name of the HTTP header that holds the identity token.
issuertext(required)1 to 1024 bytes of UTF-8, without a control charactervaluenoThe iss of the identity tokens that the server accepts.
audiencetext(required)1 to 256 bytes of UTF-8, without a control charactervaluenoThe 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_keystext(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-256value, _env, _filenoThe 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_ageduration"5m"1s to 24h, whole secondsvaluenoThe longest life (exp minus iat) of an identity token.
clock_skewduration"60s"0s to 5m, whole secondsvaluenoThe 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).

KeyTypeDefaultRangeFormsSecretUse
urlURL(required)http or https, with a host, without credentials, query or fragment, and without a "/" at the endvalue, _env, _filenoThe 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_httpbooleanfalsetrue with an http URL. false with an https URLvaluenotrue accepts an http URL: the server then sends the token and the questions without TLS. Use it only on a trusted network.
tokentext(required)1 to 4096 bytes, no space and no control character_env, _fileyesThe bearer token that the server sends to the PDP. It is a secret: the form in clear text stops the start.
timeoutduration"500ms"10ms to 1mvaluenoThe deadline of one request to the PDP, without context.usage.
usage_timeoutduration"6s"100ms to 1m, and not less than timeoutvaluenoThe 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_ttlduration"30s"0s to 1hvaluenoThe life of an answer of the PDP in memory. 0s keeps no answer.
max_evaluationsinteger641 to 1024valuenoThe 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.

KeyTypeDefaultRangeFormsSecretUse
providertext(required)s3 or gcs (lower case)valuenoThe storage protocol.
modetexts3: access_key with credentials, else anonymous. gcs: service_account with credentials_file, else anonymouss3: access_key or anonymous. gcs: service_account or anonymousvaluenoHow the server signs the provider requests.
endpointURLs3: (required). gcs: https://storage.googleapis.comhttp or https, without credentials, query or fragment, and without a "/" at the endvaluenoThe base URL of the provider.
regiontexts3: (required)valuenoThe region that the S3 signature uses.
access_key_idtext(none)s3 access_key mode only; no space at the start or at the endvalue, _env, _filenoThe S3 access key id. It is an identifier, not a secret: print-config shows it.
secret_access_keytext(none)s3 access_key mode only; no space and no control character_env, _fileyesThe S3 secret access key. It is a secret: the form in clear text stops the start.
session_tokentext(none)s3 only; no space and no control character_env, _fileyesThe S3 session token. It is a secret: the form in clear text stops the start.
credentials_filefile path(none)gcs service_account mode onlyvaluenoThe JSON file of a GCS service account. A relative path starts at the directory of the configuration file.
insecure_skip_verifybooleanfalsevaluenoDo 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.

KeyTypeDefaultRangeFormsSecretUse
sourcetext(required)garage, seaweedfs or minio, exact (lower case)valuenoThe reader of the usage and of the quota. The server never guesses it from the provider.
endpointURLgarage: (required), the admin API. seaweedfs: (required), the master. minio: the endpoint of the auth blockhttp or https, without credentials, query or fragment, and without a "/" at the endvaluenoThe 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_endpointURLseaweedfs: (required). Other sources: (none)seaweedfs only. http or https, without credentials, query or fragment, and without a "/" at the endvaluenoThe base URL of the filer of SeaweedFS. The filer gives the quota of a bucket.
tokentextgarage: (required). Other sources: (none)garage only; 1 to 4096 bytes, no space and no control character_env, _fileyesThe 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.

KeyTypeDefaultRangeFormsSecretUse
nametextthe label of the blockvaluenoThe name that the user interface shows.
authtext(required)the label of an auth blockvaluenoThe auth block that this bucket uses.
buckettext(required)valuenoThe name of the bucket at the provider.
permissionslist of text(none: no ceiling)read, write, delete (lower case, each one time)valuenoThe operations that the server can do on this bucket. It is a ceiling: the provider can refuse more.
root_prefixtext"""", or a prefix that ends with "/" and does not start with "/"valuenoThe part of the bucket that the browser shows. The keys are relative to it.
max_scan_pagesinteger10 to 1000000valuenoThe 1000-entry provider pages that one listing combines. 0 = no limit.
encryptiontext"""" or sse-s3, exact (lower case). SSE-C and SSE-KMS are not supported. Only for an s3 auth blockvaluenoThe 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_bytesinteger(none: the limit of the provider, or no limit)1 to 1152921504606846976. Only with a usage block in the auth blockvaluenoThe 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.

KeyTypeDefaultRangeFormsSecretUse
nametextthe label of the blockvaluenoThe name that the user interface shows.
pathfile 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 itvaluenoThe 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.
permissionslist of text(none: read, write and delete)read, write, delete (lower case, each one time)valuenoThe 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_prefixtext"""", or a relative folder path that ends with "/", without an empty, "." or ".." part. The folder must exist at startvaluenoThe folder of path that the browser shows. The keys are relative to it. A symbolic link that leaves it is not followed.
max_scan_pagesinteger10 to 1000000valuenoThe 1000-entry pages of a folder that one listing combines. 0 = no limit.