Give a container a secret
Found this helpful? Share it:
Found this helpful? Share it:
A container reads its secrets from files under /run/secrets/. You
bind a credential to the container once, and idapt puts the value there each
time it starts.
Open the container and go to the Credentials tab
Click Add binding and pick a credential
Start or restart the container. The value is now readable at
/run/secrets/NAME inside it
In a Compose file, reference it the normal Docker way:
services:
api:
image: my-api:1
secrets: [GITHUB_TOKEN]
secrets:
GITHUB_TOKEN:
external: trueThe document holds the name. idapt supplies the file.
An environment variable is stored in the container's configuration, so it shows
up in docker inspect, in /proc, and in every backup of
that container, forever. A file on a temporary filesystem exists only while the
container runs and is never written to disk.
Because the files are written fresh on every start, rotating a credential takes effect the next time the container starts. Nothing to edit, nothing to redeploy.
Removing a binding is the same: the next start fails with a message naming the credential, rather than quietly running with a stale value.
An agent passes credential names. It never sees, types, or receives a value. Three limits apply:
Logs and command output from the container are scrubbed of the values idapt mounted, so a service that prints its own token does not hand it to the model.
Scrubbing covers the credentials idapt supplied. A secret the service generates itself is not redacted, because scrubbing every high-entropy string would make logs unreadable without making anything safer.
Related articles
Was this helpful?