Give a connector its settings and secrets
Keep the settings and secrets a plugin's connector declares in Marfa, rather than on the machine that runs it, and enter a secret again after a restore.
A plugin's connector declares the settings it needs, such as a feed address or an account's token, and Marfa keeps their values, so the machine that runs it holds none. The connector reads them at the start of each run. Each command needs connectors.manage, which the CLI signed in as you holds.
See what it needs
marfa plugins settings rssfeed_url: not set, required
interval_minutes: 30 (default)
api_token: secret, not set
missing: feed_urlmissing names each required setting with no value and no default. A secret is never shown, only whether it's set.
Give settings values
marfa plugins settings rss --set feed_url=https://example.com/feed.xml --set interval_minutes=60Repeat --set for each. Marfa checks each value against its kind: text of 1 to 65,536 characters, a number, true or false, or one of a choice's options. If one doesn't fit, nothing is set. The API's PATCH /plugins/{name}/connector/settings takes null to clear a setting.
Enter a secret
A secret is never an argument, so it stays out of your shell's history. Type it at the prompt, which doesn't echo, or send it on standard input, where one final line break is dropped:
marfa plugins secret rss api_token
marfa plugins secret rss api_token < token.txt--clear removes it. A secret can't start or end with whitespace.
No answer, log, audit entry, export or backup holds a secret's value, and only the connector's own key, the one its host minted, reads it back. Not even your own sign-in does. The audit log records only which settings changed.
When a secret no longer opens
Marfa seals each secret with a key it keeps in marfa.settings.key, beside its database. A secret it can't open, such as after the data directory moved without that file, lists as secret, unreadable here: set it again, and marfa attention names it as rss/api_token. Enter it again as above.
An archive carries no secret: a restore lists each one in connector_secrets_to_set, and the settings that aren't secret come back with it (Move your data with an archive).
When the plugin changes
A newer version of the plugin keeps a value while its setting keeps the same kind, secrecy and choices, and drops it otherwise. Removing the plugin removes every value.
The rules behind this page are in the plugins chapter of the contract.