mirror of
https://github.com/clockworklabs/SpacetimeDB.git
synced 2026-05-11 02:00:04 -04:00
a1e9984840
Alters the CLI's configuration format to support storing multiple server configurations, and having each server configuration store an (optional) default identity. Many CLI commands take an additional -s argument, the server on which to operate, which defaults to the configured default_server. Using -s consistently requires renaming the publish skip-clippy short flag to -S. Per discussion with @jdetter , this PR does not directly associate identities with servers. Instead, each server configuration stores the server's "fingerprint" (i.e. PEM-formatted ECDSA public key), and the CLI uses that public key to decode tokens to determine if they apply to a given server. This architecture allows the CLI to behave reasonably when multiple server configurations use the same set of tokens, e.g. if multiple distinct URLs resolve to the same SpacetimeDB instance. For example, one could imagine a configuration with server configurations for both http://127.0.0.1:3000 and http://localhost:3000, which should use the same set of identities.
8 lines
141 B
TOML
8 lines
141 B
TOML
default_server = '127.0.0.1:3000'
|
|
identity_configs = []
|
|
|
|
[[server_configs]]
|
|
host = '127.0.0.1:3000'
|
|
protocol = 'http'
|
|
nickname = 'localhost'
|