From the survey of every env-file secret (ADR 0086, issue 041): amqp-ping, minio, mongodb and grafana use the _FILE twin their software honours; mesh-catalog and model-usage read DATABASE_URL_FILE (a file the mesh templates, mounted where only the runtime reads it); grafana's secret files belong to its own account. Two dead deliveries removed: a line nothing read in amqp-email-forwarder, and mailu's secret.env on four containers that never read it. The 25 exceptions that remain carry the surveyed reason — convertible and awaiting a bed, convertible through a generated config file, the application's own code, or not convertible.
111 lines
3.0 KiB
JSON
111 lines
3.0 KiB
JSON
{
|
|
"module": "step-ca",
|
|
"version": "1",
|
|
"capabilities": [
|
|
"container-runtime"
|
|
],
|
|
"provides": [
|
|
{
|
|
"name": "acme-ca",
|
|
"scope": "mesh"
|
|
}
|
|
],
|
|
"serves": {
|
|
"acme-ca": {
|
|
"path": "/acme/acme/directory",
|
|
"root": ""
|
|
}
|
|
},
|
|
"listens": [
|
|
{
|
|
"port": 9000,
|
|
"protocol": "tcp",
|
|
"from": "mesh",
|
|
"why": "the ACME directory and step-ca API; a proxy on any node reaches it here over the mesh to obtain certificates, and its single listen is what the consumer is told the port is"
|
|
}
|
|
],
|
|
"own-secrets": {
|
|
"password": "/var/lib/mesh/step-ca/password",
|
|
"root-cert": "/var/lib/mesh/step-ca/root-cert",
|
|
"root-key": "/var/lib/mesh/step-ca/root-key",
|
|
"root-key-password": "/var/lib/mesh/step-ca/root-key-password"
|
|
},
|
|
"resources": [
|
|
{
|
|
"id": "mesh-state",
|
|
"type": "directory",
|
|
"path": "/var/lib/mesh/step-ca",
|
|
"mode": "0700"
|
|
},
|
|
{
|
|
"id": "home",
|
|
"type": "directory",
|
|
"path": "/var/lib/step-ca",
|
|
"mode": "0700",
|
|
"owner": "1000:1000"
|
|
},
|
|
{
|
|
"id": "config",
|
|
"type": "file",
|
|
"path": "/var/lib/mesh/step-ca/config.json",
|
|
"mode": "0644",
|
|
"content": "{}",
|
|
"merge": "json"
|
|
},
|
|
{
|
|
"id": "init-env",
|
|
"type": "file",
|
|
"path": "/var/lib/mesh/step-ca/init.env",
|
|
"mode": "0600",
|
|
"content": "DOCKER_STEPCA_INIT_PASSWORD=${secret:password}\nDOCKER_STEPCA_INIT_DNS_NAMES=${machine:at},${machine:name},localhost,127.0.0.1\n"
|
|
},
|
|
{
|
|
"id": "root-cert-file",
|
|
"type": "file",
|
|
"path": "/var/lib/mesh/step-ca/root-cert.pem",
|
|
"mode": "0600",
|
|
"owner": "1000:1000",
|
|
"content": "${secret:root-cert}"
|
|
},
|
|
{
|
|
"id": "root-key-file",
|
|
"type": "file",
|
|
"path": "/var/lib/mesh/step-ca/root-key.pem",
|
|
"mode": "0600",
|
|
"owner": "1000:1000",
|
|
"content": "${secret:root-key}"
|
|
},
|
|
{
|
|
"id": "root-key-password-file",
|
|
"type": "file",
|
|
"path": "/var/lib/mesh/step-ca/root-key-password.txt",
|
|
"mode": "0600",
|
|
"owner": "1000:1000",
|
|
"content": "${secret:root-key-password}"
|
|
},
|
|
{
|
|
"id": "server",
|
|
"type": "container",
|
|
"name": "step-ca",
|
|
"image": "smallstep/step-ca@sha256:a2b17872915c193259b75a5474c398326f41bd199f0842093e52cf4182bc8270",
|
|
"network": "host",
|
|
"env-file": [
|
|
"/var/lib/mesh/step-ca/init.env"
|
|
],
|
|
"env": {
|
|
"DOCKER_STEPCA_INIT_NAME": "Mesh Internal CA",
|
|
"DOCKER_STEPCA_INIT_ACME": "true",
|
|
"DOCKER_STEPCA_INIT_REMOTE_MANAGEMENT": "false",
|
|
"DOCKER_STEPCA_INIT_ROOT_FILE": "/run/mesh/root-cert.pem",
|
|
"DOCKER_STEPCA_INIT_KEY_FILE": "/run/mesh/root-key.pem",
|
|
"DOCKER_STEPCA_INIT_KEY_PASSWORD_FILE": "/run/mesh/root-key-password.txt"
|
|
},
|
|
"volumes": [
|
|
"/var/lib/step-ca:/home/step",
|
|
"/var/lib/mesh/step-ca:/run/mesh:ro"
|
|
],
|
|
"secrets-in-environment": "the entrypoint honours DOCKER_STEPCA_INIT_PASSWORD_FILE; convertible, awaiting a bed that proves it"
|
|
}
|
|
]
|
|
}
|