Add TPM support for mTLS key/certs#1502
Draft
Jino26 wants to merge 1 commit into
Draft
Conversation
Allow mTLS identity used for BMC-to-BMC Redfish aggregation - both the private key and the certificate - to live in the TPM instead of on the filesystem, loaded through the OpenSSL OSSL_STORE API via a provider (e.g. tpm2-openssl). Why: mutual aggregation authenticates each BMC to its peer with a client certificate and with a filesystem-resident key that identity is only as strong as the readability of a PEM file, anyone who can read the rootfs can extract the key and impersonate the BMC. Moving the key into TPM makes it non-exportable; the private key never exists in bmcweb's memory or on flash, signing happens inside TPM and the identity is bound to that specific board. Storing the certificate in a TPM NV index as well lets the whole mTLS identity be provisioned into the hardware at manufacturing, with nothing to deploy onto the filesystem. Key changes: - meson: add uri-key (single key for both aggregation roles), uri-cert, and openssl-config-path options, resolved into bmcweb_config.h. A handle:<persistent-handle> URI selects a TPM object; file:// or a bare path preserves the existing filesystem behavior. - config: ship openssl.cnf (activates the default + tpm2 providers) and wire OPENSSL_CONF into bmcweb.service via openssl-config-path so the provider is scoped to bmcweb. Validated on hardware with both the key (persistent handle) and the certificate (NV index) resident in each BMC's TPM. Signed-off-by: Jino Abraham <jinoabraham26@gmail.com>
|
Can one of the admins verify this patch? |
Member
Author
|
Recipe meson options: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Allow mTLS identity used for BMC-to-BMC Redfish aggregation - both the private key and the certificate - to live in the TPM instead of on the filesystem, loaded through the OpenSSL OSSL_STORE API via a provider (e.g. tpm2-openssl).
Why: mutual aggregation authenticates each BMC to its peer with a client certificate and with a filesystem-resident key that identity is only as strong as the readability of a PEM file, anyone who can read the rootfs can extract the key and impersonate the BMC. Moving the key into TPM makes it non-exportable; the private key never exists in bmcweb's memory or on flash, signing happens inside TPM and the identity is bound to that specific board. Storing the certificate in a TPM NV index as well lets the whole mTLS identity be provisioned into the hardware at manufacturing, with nothing to deploy onto the filesystem.
Key changes:
Validated on hardware with both the key (persistent handle) and the certificate (NV index) resident in each BMC's TPM.