Skip to main content

Module config

Module config 

Source
Expand description

Typed schema for server.toml.

The untyped config::Config is loaded by manta_shared::common::config::get_server_configuration; this module owns the typed deserialisation target.

The shape on disk is:

log = "info"

[server]
listen_address = "0.0.0.0"
port = 8443
cert = "/etc/manta/tls/server.crt"
key = "/etc/manta/tls/server.key"
console_inactivity_timeout_secs = 1800

[sites.alps]
backend = "csm"
shasta_base_url = "https://api.alps.cscs.ch"
root_ca_cert_file = "/etc/manta/alps-ca.pem"

[sites.alps.token_exchange]
client_id = "cscs-token-exchanger"
client_secret = "…"
subject_issuer = "cscs"

[sites.basodino]
backend = "ochami"
shasta_base_url = "https://basodino-mgmt.cscs.ch:8443"
root_ca_cert_file = "/etc/manta/basodino-ca.pem"

[sites.basodino.token_exchange]
client_id = "…"
client_secret = "…"
scope = "smd.read bss.read smd.write bss.write"

ServerConfiguration is the top-level type; ServerSettings and Site are its nested sections. There is no notion of an “active” site — the server hosts every entry in [sites.*] simultaneously and clients pick one per request via the X-Manta-Site header.

Structs§

ServerConfiguration
Top-level configuration for the manta-server binary.
ServerSettings
Server-only settings — TLS, listen address, console behaviour. Lives under [server] in server.toml.
Site
Connection details for a single ALPS site (CSM or OCHAMI instance).
TokenExchangeConfig
[sites.X.token_exchange]: client credentials for exchanging the caller’s CSCS Keycloak token for a token the site accepts.

Enums§

BackendTechnology
Which backend API this site speaks.