Server Configuration
The gRPC server is configured by a single TOML file passed with --config. The starting point is
examples/server.toml.
infrastore-server --config my_server.toml
File Structure
[server]
host = "0.0.0.0"
port = 50051
[data]
file = "./store.h5"
[authentication]
# "none" or "api_key". For api_key, populate `keys`; clients must send the
# value in the `x-api-key` request header.
method = "none"
# keys = ["replace-me-with-a-secret-1", "replace-me-with-a-secret-2"]
Sections
[server]
| Key | Type | Required | Description |
|---|---|---|---|
host | string | yes | Bind address (e.g. 0.0.0.0, 127.0.0.1) |
port | integer | yes | TCP port |
[data]
| Key | Type | Required | Description |
|---|---|---|---|
file | string | yes | HDF5 file path to serve read-only |
The matching <path>.sqlite catalog must sit beside the HDF5 file. The server opens the store
read-only.
[authentication]
The whole section is optional; omitting it defaults to method = "none".
| Key | Type | Default | Description |
|---|---|---|---|
method | string | "none" | "none" or "api_key" (oauth reserved) |
keys | array of string | [] | Accepted API keys; required when method = "api_key" |
Validation runs at startup, so a bad [authentication] section fails loudly rather than at the
first request:
-
method = "api_key"with an emptykeyslist is rejected. -
An unknown
methodvalue is rejected. -
An unknown key or section is rejected, in every section. A misspelled
[authenticaton](sic) fails the parse instead of silently falling back tomethod = "none". The cost is that a config carrying a key from a newer version is refused rather than partly honored.
When method = "api_key", each request must carry a matching value in the x-api-key metadata
header. Keys are compared without early-exit — every configured key of the same length as the
supplied one is checked, so timing does not reveal which key matched or how far a wrong key got. The
supplied key's length is not blinded: keys of a different length are rejected before the byte-wise
compare, treating length as non-secret.
Startup Behavior
On launch the server:
- Loads and parses the TOML file.
- Validates the
[authentication]section. - Opens
[data].fileas a read-only store. - Binds
host:portand serves theCatalogStoregRPC service.
Logging honors the RUST_LOG environment variable (default info):
RUST_LOG=debug infrastore-server --config my_server.toml
See the gRPC Server guide for the end-to-end workflow and the gRPC API reference for the served methods.