Security
The bridge serves private keys. These are the controls around them.
Threats and mitigations
| Threat | Mitigation |
|---|---|
| Private keys on the public listener | /keyset is registered only on the private listener, on its own port. A test asserts that no private member appears in any public response. |
Unauthorized /keyset caller | mTLS against a client CA with an optional SAN allowlist, or Basic auth compared in constant time. The bridge refuses to start without one of them. Add a NetworkPolicy that admits only Kong data planes. |
| Plain-text key transport | The private listener requires TLS. --private-insecure-plaintext exists for local development and logs a warning. |
| Keys in logs | Structured logs contain kids, versions and counts, never key material. |
| Vault credential leak | Kubernetes auth with short-lived tokens; read-only policy on the bridge paths. |
| Bad document in Vault | Every load is validated: unique kids, supported algorithms, key type matches alg, RSA at least 2048 bits, active keys carry private members, private and public members belong to the same key pair, one active key per alg. A failing document is rejected and the last good snapshot stays. |
| Container compromise | Distroless static image, non-root, read-only root filesystem, no capabilities. |
Symmetric keys
HS* algorithms are rejected: a symmetric key cannot be published in a JWKS.
Reporting a vulnerability
Open a private security advisory on GitHub.