Config Reference
sesam.yml is the declared state of the repository: it describes who the
users are, how they are grouped, and which secrets exist. sesam apply diffs
this file against the verified audit log and proposes the changes needed to
bring both in sync.
Key concepts
The admin group is always implicit. Every secret automatically includes
admin in its access list, regardless of what is written in sesam.yml. Listing
admin explicitly under a secret's access: is valid but redundant.
An absent or empty access list means admin-only. If you do not specify
access: on a secret, only members of the admin group can reveal it.
Public key formats. A user's key field accepts four forms:
- A literal SSH or age public key (e.g.
ssh-ed25519 AAAA…) - A forge identity shorthand (e.g.
github:alice) - An HTTPS URL pointing to a public key (treated the same as a forge-id)
- A local file path (useful for larger or machine-generated keys)
Forge-ids and URLs are resolved by the admin on first use. Any subsequent
change to the remote content is flagged as a warning when running sesam verify.
Sub-configs
Every sesam.yml below the main one is part of the config; there is nothing
to reference. A sub-config only declares secrets:, with paths relative to its
own directory; users: and groups: are only read from the main file.
Directories that hold their own .sesam - a separate sesam repository - are
skipped, along with everything beneath them.
Validation
Beyond the schema, which checks the shape of each file, sesam checks the
config for consistency whenever it loads it. A config that fails these checks is
refused outright rather than partially applied, and every problem found is
reported at once so a hand-edited file can be fixed in one pass.
Group members must be declared users. Every name listed under groups: must
have a matching entry in users:. An undeclared member contributes no keys when
access is resolved, so a typo would otherwise quietly shrink a secret's set of
recipients instead of failing:
users:
- name: alice
key:
- ssh-ed25519 AAAA…
groups:
admin:
- alice
- alicce # error: group "admin" lists unknown user "alicce"
YAML anchors
If you want to re-use a part of your configuration, you can create a snippet:
# Everything starting with "x-" on toplevel will be ignored.
x-default-access: &default-access
access:
- group1
- group2
- group3
# Use it:
secrets:
- path: foo.txt
<<: *default-access
- path: bar.txt
<<: *default-access
For less often-used snippets it is sometimes useful to just reference another part directly:
secrets:
- path: foo.txt
access: &default-access
- group1
- group2
- group3
- path: bar.txt
access: *default-access
Read up on YAML anchors for more background.
version
The version of this config file format.
| Type | integer |
| Required | no |
| Default | 1 |
| Constraint | must be 1 |
users[]
List of users known to this repository.
| Field | Type | Required | Description |
|---|---|---|---|
name | string (non-empty) | yes | Name of a user |
key | array of string | yes | Public key(s) of this user. Can be given multiple times. |
desc | string (non-empty) | no | Description or full name of this user |
groups
Named groups of users. Each key is a group name mapped to a list of user names from the users list.
Each value is array of string (non-empty).
secrets[]
List of secret definitions. Paths are relative to the directory of the sesam.yml declaring them.
| Field | Type | Required | Description |
|---|---|---|---|
path | string (non-empty) | yes | Path to the decrypted secret |
name | string (non-empty) | no | Name of the secret. Defaults to the path when omitted. |
desc | string (non-empty) | no | Description of the secret |
access | array of string (non-empty) | no | Groups or users allowed to reveal this secret. Defaults to admin only when omitted. |
rotate | array | no | Rotation steps replacing this secret with a fresh one. Not implemented yet, see the Rotation page. |
swap | array of object | no | Commands propagating a rotated secret to where it is used. Not implemented yet, see the Rotation page. |
Complete example
version: 1
users:
- name: alice@example.com
desc: Alice, team lead
key:
- ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIExampleKeyMaterial
- name: bob@example.com
desc: Bob, developer
key:
- ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAnotherKeyMaterial
- github:bob
groups:
admin:
- alice@example.com
dev:
- alice@example.com
- bob@example.com
secrets:
- path: README.md
- path: secrets/api_key
desc: Production API key for the payment service
access:
- dev
services/sesam.yml, declaring the secrets of the services/ directory -
paths are relative to the file's own directory:
secrets:
- path: db_password
access:
- dev