Skip to content

Commit dbe36ea

Browse files
authored
fix(security): harden Vault credential transport (#3329)
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 <sjenning@redhat.com>
1 parent 607db99 commit dbe36ea

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
@@ -298,6 +298,25 @@ ServiceAccount bootstrap and gateway-minted sandbox JWT path; the selected
298298
Kubernetes compute driver validates the projected token before the gateway
299299
mints its JWT.
300300

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

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

‎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
@@ -466,6 +466,12 @@ credential storage for defense in depth. Multi-replica deployments can use that
466466
default with a shared database and shared key-encryption key, or opt into an
467467
external backend such as Vault or Kubernetes Secrets.
468468

469+
The Vault credential driver requires HTTPS for every non-loopback backend,
470+
never follows HTTP redirects, and keeps standard certificate hostname
471+
verification enabled. Operators can add private Vault trust roots with a PEM
472+
CA bundle; the driver does not replace platform roots or expose a certificate
473+
verification bypass.
474+
469475
Sandbox workload templates are workspace-scoped gateway resources. Workspace
470476
admins create and delete them; workspace users can read and list them. A
471477
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)