Skip to content

Commit cc38573

Browse files
committed
fix(security): harden Vault credential transport
Reject non-loopback plaintext Vault endpoints, disable redirects, and support private CA bundles without weakening hostname verification. Update Helm configuration, documentation, operator skills, and regression coverage for OSSR-002. Signed-off-by: Seth Jennings <[email protected]>
1 parent 26f2f96 commit cc38573

16 files changed

Lines changed: 535 additions & 20 deletions

File tree

‎.agents/skills/helm-dev-environment/SKILL.md‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,25 @@ ServiceAccount bootstrap and gateway-minted sandbox JWT path; the selected
294294
Kubernetes compute driver validates the projected token before the gateway
295295
mints its JWT.
296296

297+
### Vault Credential Driver
298+
299+
The `credential-driver-vault` Skaffold profile applies
300+
`ci/values-credential-driver-vault.yaml`. Its external OpenBao/Vault backend
301+
must expose HTTPS at the configured service DNS name and publish the issuing CA
302+
certificate as the `ca.crt` key in the `openbao-ca` ConfigMap. Local e2e uses
303+
OpenBao dev TLS and an `openbao-0` DNS alias matching its generated certificate.
304+
The Helm value
305+
`server.credentialDrivers.vault.caConfigMapName` mounts that key into the
306+
gateway and renders the driver's `ca_bundle` setting. Non-loopback HTTP
307+
addresses fail gateway startup, and hostname verification requires the service
308+
DNS name in the server certificate SANs.
309+
310+
```bash
311+
cd deploy/helm/openshell
312+
skaffold run -p credential-driver-vault
313+
kubectl -n openshell logs statefulset/openshell -c openshell-gateway --tail=200
314+
```
315+
297316
---
298317

299318
## Cluster Lifecycle (stop/start)
@@ -353,6 +372,7 @@ for dependencies still declared in `Chart.yaml`.
353372
| `deploy/helm/openshell/ci/values-spire.yaml` | SPIFFE/SPIRE provider token grant overlay |
354373
| `deploy/helm/openshell/ci/values-spire-stack.yaml` | SPIRE hardened chart values for local dev |
355374
| `deploy/helm/openshell/ci/values-tls-disabled.yaml` | Lint-only: TLS + auth disabled (reverse-proxy edge termination) |
375+
| `deploy/helm/openshell/ci/values-credential-driver-vault.yaml` | Vault credential-driver validation overlay with HTTPS and private-CA trust |
356376
| `deploy/kube/manifests/envoy-gateway-openshell.yaml` | GatewayClass for Envoy Gateway (`mise run helm:gateway:apply`) |
357377
| `tasks/scripts/helm-k3s-local.sh` | k3d cluster create/delete/start/stop/status |
358378
| `tasks/scripts/keycloak-k8s-setup.sh` | Keycloak deploy + realm import |

‎Cargo.lock‎

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎architecture/gateway.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,12 @@ credential storage for defense in depth. Multi-replica deployments can use that
468468
default with a shared database and shared key-encryption key, or opt into an
469469
external backend such as Vault or Kubernetes Secrets.
470470

471+
The Vault credential driver requires HTTPS for every non-loopback backend,
472+
never follows HTTP redirects, and keeps standard certificate hostname
473+
verification enabled. Operators can add private Vault trust roots with a PEM
474+
CA bundle; the driver does not replace platform roots or expose a certificate
475+
verification bypass.
476+
471477
Sandbox workload templates are workspace-scoped gateway resources. Workspace
472478
admins create and delete them; workspace users can read and list them. A
473479
template owns reusable workload intent: image, environment, CPU and memory

‎crates/openshell-driver-vault/Cargo.toml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,12 @@ toml = { workspace = true }
3030
tonic = { workspace = true }
3131
tracing = { workspace = true }
3232
tracing-subscriber = { workspace = true }
33+
url = { workspace = true }
3334

3435
[dev-dependencies]
36+
rcgen = { workspace = true }
3537
tempfile = "3"
38+
tokio-rustls = { workspace = true }
3639
wiremock = "0.6"
3740

3841
[lints]

0 commit comments

Comments
 (0)