Both carry the same payload as every other credential store: a single JSON object.
A
keys: remap is available if your file uses different field names — same semantics as the AWS stores.
file:// — drop the file in ./secrets/, reference the container path
The reference is resolved inside the container, so the path must exist there. The wizard-emitted docker-compose.yml already mounts ./secrets (next to the compose file) read-only at /app/secrets — no compose edit needed. Put the JSON file there:
file:///app/secrets/creds.json — the in-container path, never the host path — as the credential reference: in the wizard’s Connect existing clusters step (Step 4 on the VM path), in sariva cluster register (VM page, section 7), or on an already-running platform:
/run/secrets/<name> is just a file — reference it as file:///run/secrets/<name>.)
Rotation: the file is re-read on every resolve. Write the new key to the file and the next connection uses it — no restart.
env:// — a variable in the container environment
Add the JSON payload as one variable in.env (single-line JSON):
env://SARIVA_KAFKA_CREDS. The name is the reference; the value is read fresh from the process environment on every resolve.
Rotation: the container’s environment is fixed at start, so rotating an env:// value means updating .env and restarting the container (docker compose up -d after the edit).
WARNING
Prefer
file://. An env:// value is visible to anyone who can run docker inspect on the container or read the process environment on the host — environment variables are not a secret store, they’re just convenient. file:// with chmod 600 keeps the value out of both.File permissions: warn, not refuse
If afile:// credential file is group- or world-readable, Sariva logs a warning (consider chmod 600) and proceeds — it never refuses the file. Two reasons, both deliberate:
- The VM is the trust boundary for
file://references. Anyone with shell access to the host already owns every secret on it; refusing a mode adds ceremony, not security. - Refusing would break Swarm-mode compose secrets, which Docker mounts read-only at mode
0444— a hard failure there would make the most secret-conscious setup the one that doesn’t work.
600 anyway; the warning exists so a stray 644 gets noticed.
Gate failures
The credential gate validates the reference eagerly at register/patch time. Errors carry the exception type name only — never the secret value:Continue
Back to the VM path
Return to the Linux VM (Docker) + Confluent Cloud checklist.
Connecting clusters overview
Registration, patching, and every credential-reference format.