Support non-exportable TLS listener keys (TPM 2.0 / vTPM, optionally PKCS#11) #4440
Replies: 2 comments
|
This would likely work by implementing our KMS interface which already provides crypto.Signer implementations for External Keys and then plugging that into listeners. I don't see why a TPM-specific approach might be preferable over existing abstractions that would allow plugging in any crypto backend. |
|
Agreed — plugging a KMS-backed One architectural point that follows from this, and which I think shapes the design: OpenBao cannot act as the key store for its own listener TLS key. The listener has to come up before storage is reachable and before unseal, and the key protecting access to OpenBao cannot depend on OpenBao being available. So the key has to live outside OpenBao (TPM/HSM) and be referenced from the static server config, not through From that, a few things seem to follow:
|
Uh oh!
There was an error while loading. Please reload this page.
The tcp listener only accepts its TLS private key as a file (tls_key_file, PEM, optionally passphrase-encrypted). Whoever can read that file, or a backup or snapshot of the VM disk, can copy the key and impersonate the OpenBao API endpoint.
Many deployments run OpenBao on VMs that have a virtual TPM 2.0 (VMware vTPM, Hyper-V, KVM/swtpm). Security policies more and more often require TLS server keys to be non-exportable, i.e. created and used inside a TPM or HSM. Today this cannot be done for the OpenBao listener:
Current workaround and its drawbacks
TLS is terminated on a reverse proxy (HAProxy/nginx) that loads a TPM key through the tpm2 OpenSSL provider. However:
Describe the solution you'd like
Let the listener load its private key from a TPM 2.0 device so that the key never exists in plaintext outside the TPM.
Proposed configuration (names are only suggestions):
hcl
listener "tcp" {
address = "0.0.0.0:8200"
tls_cert_file = "/etc/openbao/tls/server.crt"
}
Why it fits OpenBao's architecture
Expected behaviour
Describe alternatives you've considered
All reactions