Files
mesh-catalog/modules/route-proxy/module.json
T
jschoubben 28b8feebfc The authority makes its own root at first start, and the proxy fetches it through a gate
step-ca's root certificate, its key and that key's password were own secrets — random
bytes the mesh minted, which no certificate is (novox/hq 04-ISSUES/076). The mesh
mints only the CA password now; step-ca makes its root at first start and serves it
at /roots.pem, which the manifest now names beside the ACME directory. The route
proxy fetches that root over the mesh network in a run-once step before it starts,
instead of being handed a served fact that could only be written before anything ran
(ADR 0098).
2026-09-21 22:26:28 +02:00

127 lines
3.0 KiB
JSON

{
"module": "route-proxy",
"version": "1",
"slug": "rproxy",
"capabilities": [
"container-runtime"
],
"provides": [
{
"name": "route",
"scope": "mesh"
}
],
"serves": {
"route": {}
},
"receives": {
"route": "/var/lib/route-proxy/routes/mesh.json"
},
"requires": [
"acme-ca"
],
"binds": {
"acme-ca": "/var/lib/route-proxy/acme-ca.json"
},
"listens": [
{
"port": 80,
"protocol": "tcp",
"from": "anywhere",
"why": "public HTTP, and the ACME HTTP-01 challenge answered at the name being certified"
},
{
"port": 443,
"protocol": "tcp",
"from": "anywhere",
"why": "public HTTPS for every name the mesh routes here"
}
],
"resources": [
{
"id": "state",
"type": "directory",
"path": "/var/lib/route-proxy",
"mode": "0700"
},
{
"id": "routes-dir",
"type": "directory",
"path": "/var/lib/route-proxy/routes",
"mode": "0700"
},
{
"id": "acme-cache",
"type": "directory",
"path": "/var/lib/route-proxy/acme",
"mode": "0700"
},
{
"id": "ca-dir",
"type": "directory",
"path": "/var/lib/route-proxy/ca",
"mode": "0755"
},
{
"id": "acme-env",
"type": "file",
"path": "/var/lib/route-proxy/acme.env",
"mode": "0600",
"content": "ACME_DIRECTORY=https://${bound:acme-ca:at}:${bound:acme-ca:port}${bound:acme-ca:path}\nACME_ROOTS=https://${bound:acme-ca:at}:${bound:acme-ca:port}${bound:acme-ca:roots}\n"
},
{
"id": "trust",
"type": "container",
"name": "route-proxy-trust",
"run-once": true,
"image": "alpine@sha256:28bd5fe8b56d1bd048e5babf5b10710ebe0bae67db86916198a6eec434943f8b",
"network": "host",
"env-file": [
"/var/lib/route-proxy/acme.env"
],
"volumes": [
"/var/lib/route-proxy/ca:/ca"
],
"args": [
"sh",
"-c",
"wget -q --no-check-certificate -O /ca/root.crt \"$ACME_ROOTS\" && test -s /ca/root.crt"
]
},
{
"id": "server",
"type": "container",
"name": "route-proxy",
"image": "mesh-route-proxy@sha256:0000000000000000000000000000000000000000000000000000000000000000",
"network": "host",
"env-file": [
"/var/lib/route-proxy/acme.env"
],
"volumes": [
"/var/lib/route-proxy/routes:/routes:ro",
"/var/lib/route-proxy/acme:/acme",
"/var/lib/route-proxy/ca:/ca:ro"
],
"env": {
"ROUTES": "/routes/mesh.json",
"LISTEN": ":80",
"TLS_LISTEN": ":443",
"ACME_CACHE": "/acme",
"ACME_CA_BUNDLE": "/ca/root.crt"
}
}
],
"build": {
"on": [
{
"arg": "GO_BASE",
"image": "golang@sha256:699337d620559a59b4a2bb298ad59611e535d2ee755a34cf2d2a98f37578dc80"
},
{
"arg": "ALPINE_BASE",
"image": "alpine@sha256:d9e853e87e55526f6b2917df91a2115c36dd7c696a35be12163d44e6e2a4b6bc"
}
]
}
}