Configuration#
Configuration file#
Profiles live in a TOML file. The first of these locations that is set wins.
$PLONE_CLIENT_CONFIG$XDG_CONFIG_HOME/plone-client/config.toml~/.config/plone-client/config.toml
current = "local"
[defaults]
timeout = 60
retries = 5
[profiles.local]
url = "http://localhost:8080/Plone"
username = "admin"
auth = "jwt"
retries = 0
[profiles.prod]
url = "https://example.org"
username = "editor"
read_only = true
secret = "command"
secret_command = "op read op://Private/example/password"
verify = "/etc/ssl/certs/example-ca.pem"
[groups]
customer = ["prod", "local"]
Key |
Meaning |
|---|---|
|
Name of the profile used when no other one is selected. |
|
Connection settings shared by every profile; see below. |
|
One table per profile; see below. |
|
Named lists of profiles; see below. |
The file never holds a secret.
Profile settings#
Key |
Type |
Default |
Meaning |
|---|---|---|---|
|
string |
required |
URL of the site root. |
|
string |
|
Login name; empty for anonymous access. |
|
|
|
How the client authenticates; |
|
|
|
Where the secret is kept. |
|
string |
|
Variable holding the secret, with |
|
string |
|
Command printing the secret, with |
|
boolean |
|
Refuse every request that could change the site. |
|
number |
|
Seconds to wait for the site; must be greater than zero. |
|
boolean or string |
|
Verify TLS certificates. A string is the path of a CA bundle, a file or a directory, used instead of the default certificates; |
|
integer |
|
Times a request is repeated after a network error, or after a |
|
number |
|
Base delay in seconds between retries; it doubles after each one. |
|
string |
|
Traversal prefix of the REST API. |
|
string |
|
URL of the Volto frontend, for the services Volto serves itself, such as |
|
string |
|
Free text, shown by |
Profile names start with a letter or a digit and contain only letters, digits, _, ., and -.
Defaults#
The defaults table sets connection settings for every profile.
A profile’s own value wins over it.
Key |
Allowed |
|---|---|
|
Yes |
Any other key |
No; the file is refused. |
When the configuration file is saved, a profile does not repeat a value equal to the defaults, so it follows later changes to them.
Groups#
The groups table names lists of profiles, which plone-client mcp --group serves together; see Several sites.
Each key is a group name, and each value is a list of profile names.
Group names follow the rules of profile names.
A group must list at least one profile, and every profile it lists must exist; otherwise the file is refused.
A profile listed twice counts once.
Removing a profile removes it from its groups, and removes a group left empty.
plone-client profile groups, profile group-set, and profile group-remove change the table.
Secrets in the keyring#
Field |
Value |
|---|---|
Service |
|
Account |
The profile’s |
The keyring is the operating system’s own: macOS Keychain, Windows Credential Locker, or Secret Service on Linux.
Project file#
A .plone-client.toml file in the working directory, or in one of its parents, selects the profile for everything run below it.
profile = "blog"
Profile selection#
Order |
Source |
|---|---|
1 |
|
2 |
|
3 |
|
4 |
|
The command line skips profiles when given --url, or when $PLONE_CLIENT_URL is set and no profile was named by --profile or $PLONE_CLIENT_PROFILE.
It then reads the settings from the environment variables below.
Environment variables#
from_env() reads these variables, with the prefix PLONE_CLIENT_ unless given another.
Variable |
Meaning |
|---|---|
|
URL of the site root; required. |
|
Login name; |
|
Password. |
|
A JWT issued beforehand. |
|
|
|
Traversal prefix of the REST API. |
|
Seconds to wait for the site. |
|
|
|
Times a request is repeated; |
|
Base delay in seconds between retries. |
|
|
|
URL of the Volto frontend, when |
These two are read by the command line only.
Variable |
Meaning |
|---|---|
|
Profile to use. |
|
Configuration file. |