Set up workload identity
Make your Marmot server an OIDC issuer, so pipelines sign in with workload identity instead of a stored password or key. The systems that trust Marmot fetch its public keys from your server, so they must be able to reach it.
Before you start
- Marmot is served over https at a stable address, the one systems will trust. A path after the host isn't supported.
- You can set
server.encryption_key. Marmot keeps its signing keys encrypted with it. - Every system you want to trust Marmot can reach that address. AWS and Azure fetch keys from the internet; Grafana, Kubernetes and Vault need network reach only.
Set the issuer
The issuer is
server.root_urlunless you setworkload_identity.issuer. Set it only when the address systems use differs from the root URL:server:root_url: https://marmot.example.comencryption_key: ${MARMOT_SERVER_ENCRYPTION_KEY}workload_identity:issuer: https://marmot.example.comPlain http is accepted for
localhostonly. A root URL that can't be an issuer leaves workload identity off with a warning; an explicitworkload_identity.issuerthat can't be one stops the server.Optional: name pipelines by id
Pipelines are named
pipeline:<pipeline-name>in tokens. To use ids, which survive renames and are never reused, set:workload_identity:pipeline_subject: idChoose before you set up trust anywhere: switching changes every pipeline's subject.
Restart Marmot
Marmot creates its signing keys on first start and logs
Workload identity issuer readywith the issuer. Every replica shares the same keys.
Check that it worked
Fetch the discovery document from where a trusting system would:
curl https://marmot.example.com/.well-known/openid-configuration
The issuer in the response must match the address exactly. In the add source form, plugins that support it now offer Marmot's identity first.
Rotate the signing key
Rotate the key on a schedule, or at once if it may have leaked. A graceful rotation publishes the next key now and signs with it after an overlap, 24 hours by default, so systems that cache keys fetch it first:
curl -X POST https://marmot.example.com/api/v1/workload-identity/keys/rotate \
-H "Authorization: Bearer ${MARMOT_API_KEY}"
For a key that may have leaked, rotate immediately. Tokens the old key signed stop working at once, and other replicas pick the new key up within a minute:
curl -X POST https://marmot.example.com/api/v1/workload-identity/keys/rotate \
-H "Authorization: Bearer ${MARMOT_API_KEY}" \
-d '{"immediate": true}'
Rotating needs users:manage. A system you gave the keys as a file, such as Grafana with jwk_set_file or a Google Cloud provider with an uploaded key set, needs the new file before the overlap ends.
The issuer is permanent
Every system that trusts Marmot names its issuer. If your server's address changes, set workload_identity.issuer to the old address while you move each trust to the new one, or tokens stop working everywhere at once.
Troubleshooting
| What you see | What to do |
|---|---|
The workload identity issuer needs server.encryption_key to keep its signing keys encrypted | Set server.encryption_key. For a laptop only, workload_identity.allow_unencrypted_key: true stores them unencrypted |
The workload identity issuer must be this server's https origin | Serve Marmot over https and set server.root_url to that address, with no path |
this source signs in with Marmot's identity, but this server has no workload identity issuer | The server started without an issuer. Check its log for why |
| AWS or Azure refuses the token with an issuer or key error | The system can't fetch your keys. Make the issuer reachable from the internet |
The workload identity issuer has changed in the log | Systems still trust the old issuer. Update them, or set workload_identity.issuer back |
Next steps
- Workload identity reference: claims, subjects and settings.
- Connect Grafana: a first source that signs in with Marmot's identity.