Skip to content

Commit a01b8bd

Browse files
authored
Merge pull request #156 from underpass-ai/docs/fix-tls-and-proposal-drift
docs: fix TLS cert-gen drift + mark saturation/notify proposal as landed
2 parents 9b8bbcd + 4e7a7f5 commit a01b8bd

3 files changed

Lines changed: 30 additions & 10 deletions

File tree

docs/architecture/tls-architecture.md

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,20 @@ All services in the `underpass-runtime` namespace communicate via mutual TLS (mT
44

55
## Certificate Authorities
66

7+
A single shared internal CA signs **every** certificate in the namespace —
8+
including the runtime's own gRPC server and client certs. There is no separate
9+
"runtime CA": the runtime certs are signed by the kernel CA via the cert-gen
10+
hook (see [Certificate Generation](#certificate-generation)).
11+
712
| CA | CN | Scope | Secret |
813
|----|----|-------|--------|
9-
| Runtime CA | `underpass-runtime-ca` | Runtime gRPC server + client auth | `runtime-tls` (ca.crt) |
10-
| Kernel CA | `rehydration-kernel-internal-ca` | NATS, Valkey, Neo4j, MinIO | `rehydration-kernel-internal-ca` |
14+
| Kernel CA (shared) | `rehydration-kernel-internal-ca` | All mTLS in the namespace: runtime gRPC, NATS, Valkey, Neo4j, MinIO | `rehydration-kernel-internal-ca` (`tls.crt` + `tls.key`) |
1115

1216
## Service Certificates
1317

1418
| Service | Port | TLS Mode | Server Cert Secret | CA |
1519
|---------|------|----------|-------------------|-----|
16-
| underpass-runtime (gRPC) | 50053 | mutual | `runtime-tls` | Runtime CA |
20+
| underpass-runtime (gRPC) | 50053 | mutual | `runtime-tls` | Kernel CA |
1721
| rehydration-kernel (gRPC) | 50054 | mutual | `rehydration-kernel-grpc-tls` | Kernel CA |
1822
| NATS | 4222 | mutual | `rehydration-kernel-nats-tls` | Kernel CA |
1923
| Valkey | 6379 | mutual | `rehydration-kernel-valkey-tls` | Kernel CA |
@@ -94,13 +98,28 @@ valkey:
9498
9599
## Certificate Generation
96100
97-
Certificates are currently generated manually. See `memory/project_certs_reorg.md`
98-
for the planned migration to automated cert management.
101+
Certificates are generated **automatically** by the cert-gen Helm hook
102+
(`certGen.enabled=true`) — a `pre-install`/`pre-upgrade` Job that reads the
103+
shared CA from `certGen.caSecret` (default `rehydration-kernel-internal-ca`) and
104+
signs four secrets idempotently (skipping any that already exist):
105+
106+
| Secret | Purpose | Key Usage |
107+
|--------|---------|-----------|
108+
| `{fullname}-tls` | Runtime gRPC server cert | serverAuth, clientAuth |
109+
| `{fullname}-nats-client-tls` | NATS client cert | clientAuth |
110+
| `{fullname}-valkey-client-tls` | Valkey client cert | clientAuth |
111+
| `{fullname}-s3-client-tls` | S3/MinIO client cert | clientAuth |
112+
113+
Each secret contains `tls.crt`, `tls.key`, and `ca.crt` (ECDSA P-256, 365-day
114+
validity by default). To rotate, delete the target secret and run `helm upgrade`.
115+
See [deployment-tls.md](../operations/deployment-tls.md) for the full guide.
116+
117+
### Manual fallback (without cert-gen)
99118

100-
### Quick Reference
119+
If you are not using the cert-gen hook, sign certs against the shared CA by hand:
101120

102121
```bash
103-
# Generate client cert for runtime, signed by kernel CA
122+
# Generate client cert for runtime, signed by the shared CA
104123
openssl req -new -newkey ec -pkeyopt ec_paramgen_curve:prime256v1 -nodes \
105124
-keyout client.key -out client.csr -subj "/CN=underpass-runtime"
106125

docs/operations/deployment-tls.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,14 @@ certGen:
8383
caSecret: rehydration-kernel-internal-ca # default
8484
```
8585
86-
The Job creates three secrets (idempotent — skips if they already exist):
86+
The Job creates four secrets (idempotent — skips if they already exist):
8787
8888
| Secret | Purpose | Key Usage |
8989
|--------|---------|-----------|
9090
| `{fullname}-tls` | Runtime gRPC server cert | serverAuth, clientAuth |
9191
| `{fullname}-nats-client-tls` | NATS client cert | clientAuth |
9292
| `{fullname}-valkey-client-tls` | Valkey client cert | clientAuth |
93+
| `{fullname}-s3-client-tls` | S3/MinIO client cert | clientAuth |
9394

9495
Each secret contains `tls.crt`, `tls.key`, and `ca.crt`. Certificates use
9596
ECDSA P-256 keys with 365-day validity by default.
@@ -110,7 +111,7 @@ helm upgrade underpass-runtime charts/underpass-runtime ...
110111
| Value | Default | Description |
111112
|-------|---------|-------------|
112113
| `certGen.enabled` | `false` | Enable the cert-gen hook Job |
113-
| `certGen.image` | `docker.io/alpine:3.19` | Container image (needs openssl, curl, jq) |
114+
| `certGen.image` | `ghcr.io/underpass-ai/underpass-runtime/cert-gen:v1.0.0` | Container image (openssl, curl, jq preinstalled) |
114115
| `certGen.caSecret` | `rehydration-kernel-internal-ca` | Name of the CA secret to read |
115116
| `certGen.keyCurve` | `prime256v1` | ECDSA curve for generated keys |
116117
| `certGen.validityDays` | `365` | Certificate validity in days |

docs/proposals/runtime-saturation-and-notify-tools-registration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Proposal — Register saturation + escalation-notify tools in `underpass-runtime`
22

3-
Status: proposed, awaiting runtime team review
3+
Status: ✅ landed on `main` (PR #141; quality follow-ups in PR #142). Tools registered in `internal/adapters/tools/catalog_defaults.yaml` (`k8s.scale_deployment`, `k8s.restart_pods`, `k8s.circuit_break`, `notify.escalation_channel`), implemented in `k8s_saturation_tools.go` + `notify_tools.go`, enforced in `internal/adapters/policy/static_policy.go`, and covered by `e2e/tests/24-runtime-saturation-notify-tools`.
44
Source repo: `underpass-payments-incident-response`
55
Target repo: `underpass-runtime`
66
Owner of the request: PIR

0 commit comments

Comments
 (0)