Secure key provisioning and hardware-assisted secure key storage and secure cryptographic function operation in container-based environments
A key caching container provides for the secure storage of cryptographic keys and the secure operation of cryptographic functions for workload containers. A cryptographic call adapter in each workload container converts application cryptographic operation requests made by an application to workload container cryptographic operation requests that are sent to the key caching container. Secure provision of keys is enabled by a key broker service that acts as a proxy for a key management service. A secure enclave within the key caching container stores keys and instructions that perform cryptographic operations in an encrypted format. The key caching container provides a key handle associated with a cryptographic key to a requesting application, which the application uses in subsequent application cryptographic operation requests. The secure enclave is created and managed using security-related instructions in a security-enabled integrated circuit component that is part of a computing system's hardware platform.
1 . One or more non-transitory computer-readable storage media storing computer-executable instructions that when executed, cause a computing system to perform a method, the method comprising:
receiving, at the computing system, a container image configured with a key identifier that is used by a workload container instantiated from the container image to request a cryptographic key from an entity external to the workload container;
instantiating the workload container from the container image, the workload container storing the key identifier;
sending a workload container cryptographic operation request from the workload container to a key caching container executing on the computing system, wherein the workload container cryptographic operation request comprises a request for the cryptographic key and the key identifier; and
receiving a key handle associated with the cryptographic key from the key caching container at the workload container.
2 . The one or more non-transitory computer-readable storage media of claim 1 , the method performed by the computing system when the computer-executable instructions are executed further comprising:
generating, by an application operating within the workload container, the workload container cryptographic operation request; and
providing the key handle to the application.
3 . The one or more non-transitory computer-readable storage media of claim 1 , the method performed by the computing system when the computer-executable instructions are executed further comprising:
generating, by an application operating within the workload container, an application cryptographic operation request;
converting the application cryptographic operation request to the workload container cryptographic operation request; and
providing the key handle to the application.
4 . The one or more non-transitory computer-readable storage media of claim 1 , wherein the workload container cryptographic operation request is a first workload container cryptographic operation request, the method performed by the computing system when the computer-executable instructions are executed further comprising:
sending a second workload container cryptographic operation request from the workload container to the key caching container, the second workload container cryptographic operation request comprising the key handle, information indicating a cryptographic operation to be performed by the key caching container, and input data; and
receiving output data at the workload container from the key caching container, the output data generated by the key caching container performing the cryptographic operation on the input data.
5 . The one or more non-transitory computer-readable storage media of claim 4 , the method performed by the computing system when the computer-executable instructions are executed further comprising:
generating, by an application operating within the workload container, an application cryptographic operation request comprising the key handle, the information indicating the cryptographic operation to be performed by the key caching container, and the input data; and
converting the application cryptographic operation request to the second workload container cryptographic operation request.
6 . The one or more non-transitory computer-readable storage media of claim 1 , wherein the cryptographic key is a first cryptographic key, the workload container is a first workload container, the key handle is a first key handle, and the workload container cryptographic operation request is a first workload container cryptographic operation request, the method performed by the computing system when the computer-executable instructions are executed further comprising:
sending a second workload container cryptographic operation request from a second workload container to the key caching container, the second workload container cryptographic operation request comprising a request for a second cryptographic key; and
receiving a second key handle associated with the second cryptographic key at the second workload container from the key caching container.
7 . The one or more non-transitory computer-readable storage media of claim 6 , wherein a first computing system is hosting the first workload container and the key caching container and a second computing system is hosting the second workload container.
8 . The one or more non-transitory computer-readable storage media of claim 1 , the method performed by the computing system when the computer-executable instructions are executed further comprising the workload container authenticating the key caching container before sending the workload container cryptographic operation request to the key caching container.
9 . The one or more non-transitory computer-readable storage media of claim 1 , wherein a container runtime engine provides an interface between the workload container and an operating system or a hypervisor.
10 . One or more non-transitory computer-readable storage media storing computer-executable instructions that when executed, cause a computing system to perform a method, the method comprising:
receiving a workload container cryptographic operation request from a workload container executing on the computing system at a key caching container, the workload container cryptographic operation request comprising a request for a cryptographic key;
generating an enclave public-private key pair within a secure enclave, the enclave public-private key pair comprising an enclave public key and an enclave private key;
requesting, by the key caching container, the cryptographic key from a key broker service, wherein the key broker service is external to the computing system;
providing a remotely verifiable signed claim to the key broker service for attestation, the remotely verifiable signed claim comprising a hash of the enclave public key;
receiving the cryptographic key from the key broker service;
storing the cryptographic key in an encrypted form in the secure enclave; and
in response to receiving the workload container cryptographic operation request comprising the request for the cryptographic key, sending, from the key caching container to the workload container, a key handle associated with the cryptographic key, wherein the key handle uniquely identifies the cryptographic key from among a plurality of cryptographic keys stored in the secure enclave.
11 . The one or more non-transitory computer-readable storage media of claim 10 , wherein storing the cryptographic key in the encrypted form in the secure enclave utilizes security-related instructions of a processing unit of the computing system.
12 . The one or more non-transitory computer-readable storage media of claim 10 , wherein the remotely verifiable signed claim further comprises one or more secure enclave attributes.
13 . The one or more non-transitory computer-readable storage media of claim 10 , wherein the workload container cryptographic operation request is a first workload container cryptographic operation request, the method performed by the computing system when the computer-executable instructions are executed further comprising:
receiving a second workload container cryptographic operation request from the workload container at the key caching container, the second workload container cryptographic operation request comprising the key handle, information indicating a cryptographic operation to be performed by the key caching container, and input data;
performing, within the secure enclave, the cryptographic operation on the input data to generate output data, the cryptographic operation utilizing the cryptographic key associated with the key handle, the cryptographic key stored in the secure enclave; and
sending the output data from the key caching container to the workload container.
14 . The one or more non-transitory computer-readable storage media of claim 13 , wherein the cryptographic key is a first cryptographic key, the workload container is a first workload container, the key handle is a first key handle, the input data is first input data, the output data is first output data, and the cryptographic operation is a first cryptographic operation, the method performed by the computing system when the computer-executable instructions are executed further comprising:
receiving, from a second workload container at the key caching container, a second key handle, information indicating a second cryptographic operation to be performed by the key caching container, and second input data;
performing, within the secure enclave, the second cryptographic operation on the second input data to generate second output data, the second cryptographic operation utilizing a second cryptographic key associated with the second key handle and stored in the secure enclave; and
sending the second output data from the key caching container to the second workload container.
15 . The one or more non-transitory computer-readable storage media of claim 14 , wherein the key caching container is hosted on a first computing system and the second workload container is hosted on a second computing system.
16 . A method comprising:
receiving a workload container cryptographic operation request from a workload container at a key caching container, the workload container cryptographic operation request comprising a request for a cryptographic key, the workload container and the key caching container executing on a computing system;
generating an enclave public-private key pair within a secure enclave, the enclave public-private key pair comprising an enclave public key and an enclave private key;
requesting, by the key caching container, the cryptographic key from a key broker service, wherein the key broker service is external to the computing system;
generating a hash of the enclave public key;
providing a remotely verifiable signed claim and the hash of the enclave public key to the key broker service for attestation, the remotely verifiable signed claim not comprising the enclave public key or the hash of the enclave public key;
receiving the cryptographic key from the key broker service;
storing the cryptographic key in an encrypted form in the secure enclave; and
in response to receiving the workload container cryptographic operation request comprising the request for the cryptographic key, sending, from the key caching container to the workload container, a key handle associated with the cryptographic key, wherein the key handle uniquely identifies the cryptographic key from among a plurality of cryptographic keys stored in the secure enclave.
17 . The method of claim 16 , wherein the workload container cryptographic operation request is a first workload container cryptographic operation request, the method further comprising:
receiving a second workload container cryptographic operation request from the workload container at the key caching container, the second workload container cryptographic operation request comprising the key handle, information indicating a cryptographic operation to be performed by the key caching container, and input data;
performing, within the secure enclave, the cryptographic operation on the input data to generate output data, the cryptographic operation utilizing the cryptographic key associated with the key handle, the cryptographic key stored in the secure enclave; and
sending the output data from the key caching container to the workload container.
18 . The method of claim 17 , wherein the cryptographic key is a first cryptographic key, the workload container is a first workload container, the key handle is a first key handle, the input data is first input data, the output data is first output data, and the cryptographic operation is a first cryptographic operation, the method further comprising:
receiving, from a second workload container at the key caching container, a second key handle, information indicating a second cryptographic operation to be performed by the key caching container, and second input data;
performing, within the secure enclave, the second cryptographic operation on the second input data to generate second output data, the second cryptographic operation utilizing a second cryptographic key associated with the second key handle and stored in the secure enclave; and
sending the second output data from the key caching container to the second workload container.
19 . The method of claim 18 , wherein the key caching container is hosted on a first computing system and the second workload container is hosted on a second computing system.
20 . The method of claim 16 , wherein storing the cryptographic key in the encrypted form in the secure enclave utilizes security-related instructions of a processing unit of the computing system.