Managing Secrets in Ankaios #583
Replies: 2 comments 2 replies
-
|
There are various ways how to handle secrets with Ankaios: Using environment variablesIn a simple way a secret could be passed to a workload as an environment variable like: apiVersion: v0.1
workloads:
myapp:
runtime: podman
agent: agent_A
runtimeConfig: |
image: docker.io/busybox:latest
commandOptions: ["-e", "PASSWORD=supersecret"]
commandArgs: ["sh", "-c", "echo $PASSWORD"]Separate secrets with configsIn order to separate secrets and workloads, configs could be used like: apiVersion: v0.1
workloads:
myapp:
runtime: podman
agent: agent_A
configs:
c: myapp
runtimeConfig: |
image: docker.io/busybox:latest
commandOptions: ["-e", "PASSWORD={{c.password}}"]
commandArgs: ["sh", "-c", "echo $PASSWORD"]
configs:
myapp:
password: supersecretUsing filesBesides using environment variables, also files could be used to pass secrets to applications. In that case the secret could also be stored base64 encoded in the manifest like: apiVersion: v0.1
workloads:
myapp:
runtime: podman
agent: agent_A
configs:
c: myapp
files:
- mountPoint: "/password"
binaryData: "{{c.password}}"
runtimeConfig: |
image: docker.io/busybox:latest
commandArgs: ["sh", "-c", "cat /password"]
configs:
myapp:
password: c3VwZXJzZWNyZXQKUsing runtime specific secret managementIn addition runtime specific secret management could be used. For the Mounting secrets as files from hostIn order keep secrets outside from the manifest, also a file from the host could be mounted to a workload. Using central secret storeOne could also think of having a central secret store which could be directly accessed by the workload in order to receive secrets. SummaryWhat method fits best depends on your use case. @MatthiasEckhart do you have a specific use case in mind? |
Beta Was this translation helpful? Give feedback.
-
|
Hi @windsource, I don't have a concrete use case yet, but I imagine the automotive domain introduces unique challenges for secret management in containerized architectures (e.g., OTA updates or authN with remote services). A guide or best practice write-up for these scenarios would be extremely valuable for the community. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I'm new to Ankaios and was wondering if it includes a built-in solution for secrets management. I couldn't find any references to managing secrets in the documentation, so I'd like to know whether there are recommended best practices or built-in features for this.
Beta Was this translation helpful? Give feedback.
All reactions