System and methods for securing role credentials

A customer in a computing resource provider environment launches a virtual machine with an associated role. A key is generated that is specific to the instance and the role. An enclave is generated specifically for the virtual machine to securely store the key such that the virtual machine uses the enclave to sign requests pursuant to the role to access one or more web services in the environment.

CROSS-REFERENCE TO RELATED APPLICATION

This application incorporates by reference for all purposes the full disclosure of U.S. patent application Ser. No. 16/588,904, now U.S. Pat. No. 11,363,012, issued Jun. 14, 2022, filed concurrently herewith, entitled “SYSTEM AND METHODS FOR USING ROLE CREDENTIALS ASSOCIATED WITH A VM INSTANCE”.

BACKGROUND

In modern computing systems and environments, there is an increasing importance that is being placed on system security. In many computing systems, such as those that involve virtualized computing environments where a plurality of guest virtual machines/instances can be hosted on shared physical host machines, security of data and credentials associated with a guest virtual machine instance is of concern. As an example, guest virtual machines/instances use credentials to interact with other systems and multiple guest virtual machines/instances can be instantiated on the same hardware server. Accordingly, to ensure that one guest virtual machine/instance is unable to access credentials of another guest virtual machine/instance is complex and involves a significant amount of effort.

DETAILED DESCRIPTION

Techniques described and suggested herein include methods, systems and processes for providing secure access to role credentials associated with a virtual machine instance (referred herein as “VM instance”) and/or the applications that are executing on a single physical host machine in distributed and/or virtualized computer systems and executable code operating thereon. That is, an application running within a VM instance in a computing environment can obtain role credentials to access certain web services or computing resources associated with the computing environment. When provided with role credentials that are encrypted, the application running with the virtual machine can obtain keys to decrypt the encrypted role credentials through the use of an enclave.

In an example, a request to launch a VM instance is received by a control service/plane operating in a computing resource service provider environment. The request to launch the VM instance can indicate a role having a corresponding set of permissions able to be exercised by assuming the role (e.g., by presenting proof of authority to assume the role, such as described in more detail below). The workflow being performed can enable the VM instance to assume the role without having access to the role credentials in plaintext form. Subsequently, an enclave can also be launched on the hardware server. A key that is used to decrypt encrypted role credentials is generated. The key can be generated specifically for the VM instance and the role. The enclave can then store the key such that the VM instance uses the enclave to sign requests pursuant to the role. Once the requests are signed, applications running on the VM instance are then able to access one or more web services and/or computing resources in the computing resource service provider environment.

In an embodiment, encrypted role credentials can be provided to the VM instance. The control service/plane submits a request to obtain the encrypted role credentials. The encrypted role credentials can include at least three components: an access key identifier (e.g., identifier for the credential), secret (e.g., secret key used to sign requests associated with the role), and an encrypted token (e.g., an encrypted binary large object (blob) that is provided that has all the information about the role). The secret can be encrypted by using the key that was previously derived. As will be described in more detail throughout the disclosure, the key uses an instance identifier or at least one or more tags associated with the instance to ensure that credentials are only decrypted using the correct enclave associated with the VM instance. Each tag can be a combination of key and values that enable users or customers to categorize a plurality of VM instances. Moreover, the encrypted role credentials are then delivered to an Instance Metadata Service (IMDS). The IMDS can be a service that stores the encrypted role credentials as metadata. The IMDS is associated with the instance such that the VM instance can submit a call or request to the IMDS to obtain the encrypted role credentials.

Furthermore, after the key is stored in the enclave, an application running within the VM instance can be provided with the encrypted role credentials from the IMDS. The key that was previously stored in the enclave can be used to decrypt the encrypted role credentials. That is, a user device running a VM instance can send a request to access a web service. The request can be an application programming interface (API) call that is routed to a computing device running code of a Software Development Kit (SDK) associated with the VM instance. In an embodiment, the computing device running the code of the SDK provides the encrypted role credentials via the IMDS. The computing device running the code of the SDK can then send a request to the enclave to generate a signature for the request. Specifically, the computing device running the code of the SDK can send a GET request to the enclave to obtain a signature for the request. The GET request can include the original request (e.g., request for the web service) and further includes the encrypted role credentials which includes: the access key identifier, the encrypted secret, and the token. The enclave then generates a signature in response to the GET request and the signature is returned to the computing device running the code of the SDK so that it can send the signed request to the web service such that resources or access is provided to the user device.

Techniques described and suggested herein provide many technical advantages to the security of role credentials in a technical environment. In some environments, role credentials are provided when a user device has access to an application running within a VM instance. The user device can access, from the IMDS, the role credentials. One or more Identity and Access Management (IAM) policies are typically used to restrict the use of these role credentials by using Internet Protocol (IP) address whitelists. However, updating and tracking the IP address whitelists can be cumbersome in an environment with large amounts of active VM instances and could tie up large amounts of computing resources.

The techniques described herein result in the role credentials being stored in an enclave. The enclave is generated along with the launch of the instance such that it is used to securely store the keys necessary to decrypt an encrypted role credential associated with the instance. By launching an enclave to be specifically associated with a launched instance, the enclave can be a secure storage area for keys that are used to decrypt encrypted role credentials. This way, if a VM instance is compromised, the role credentials are not compromised. Even if the role credentials are misappropriated, the role credentials are useless outside of the VM instance. As a result, not only would the amount of computing resources needed to potentially track all the IP addresses associated with a VM instance to restrict use of the credentials be reduced, but also provide for an extra layer of protection for the role credentials.

In the preceding and following description, various techniques are described. For purposes of explanation, specific configurations and details are set forth in order to provide a thorough understanding of possible ways of implementing the techniques. However, it will also be apparent that the techniques described below can be practiced in different configurations without the specific details. Furthermore, well-known features can be omitted or simplified to avoid obscuring the techniques being described.

FIG.1illustrates an example environment100where an enclave124can be generated for a VM instance112by a controlling domain such as a hypervisor120within a host computer system110environment. A user device102can connect to a host computer system110via a connection106across a network108. The user device102can be a remote VM instance104running on one or more remote computer systems, or a software program that runs on the user device102. The user device102can be implemented with a graphic user interface (GUI) that can obtain input from a user. The command or commands to connect to the host computer system110can originate from an outside computer system and/or server, or can originate from an entity, user or process on a remote network location, or can originate from an entity, user or process within the computer system, or can originate from the user device102, or can originate as a result of a combination of these and/or other such entities. Although only one host computing system110is depicted inFIG.1, there can be additional host computer systems (e.g., one or more host computer systems) in the environment100.

The user device102can request connection to the host computer system110via one or more connections106and, in some embodiments, via one or more networks108and/or entities associated therewith, such as servers connected to the network, either directly or indirectly. The user device102can request access to the host computer system110can include any device that is capable of connecting with a computer system via a network, including at least servers, laptops, mobile devices such as smartphones or tablets, other smart devices such as smart watches, smart televisions, set-top boxes, video game consoles and other such network enabled smart devices, distributed computing systems and components thereof, abstracted components such as guest computer systems or virtual machines and/or other types of computing devices and/or components. The network108can include, for example, a local network, an internal network, a public network such as the Internet, a wide-area network, a wireless network, a mobile network, a satellite network, a distributed computing system with a plurality of network nodes and/or the like. The network108can also operate in accordance with various protocols, such as those listed below, Bluetooth, WiFi, cellular network protocols, satellite network protocols and/or others.

The user device102can request access to the host computer system110within a distributed and/or virtualized datacenter environment100provided by a computing resource service provider. The computing resource provider can also provide access to one or more computer services such as additional virtual machine instances, automatic scaling groups, file-based database storage systems, block storage services, redundant data storage services, data archive services, data warehousing services, user access management services, content management services and/or other such computer system services as can be running thereon. The computing resource service provider can also provide access to computer system resources such as user resources, policy resources, network resources and/or storage resources. In some distributed and/or virtualized computer system environments, the resources associated with the computer services can be physical devices, virtual devices, combinations of physical and/or virtual devices or other such device embodiments. In some embodiments, the one or more host machines can be physical machines located within the computer system environment.

The user device102can request to launch a VM instance112to run on the host computer system110which can be one of one or more VM instances running on the host computer system110. The VM instance112, or in some instances referred to as an instance, virtual machine instance, or virtual instance, can be launched on the host computing system110(e.g., a hardware server). The VM instance112can be instantiated by the user device102, or can be a VM instance that was previously running. The VM instance112can be connected to a controlling domain such as a hypervisor120which can be configured to manage and/or provide access by the VM instance112to one or more system resources on the host computer system110including, but not limited to, access to computer system memory, access to central processing unit (CPU) time, access to disk storage, access to specialized hardware and other such resource access. In some embodiments, the hypervisor120can provide access to and manage the system resources on the behalf of a plurality of VM instances running on the host computer system110.

When a VM instance112is launched, it can be launched with metadata indicating that the VM instance112is associated with a role. The VM instance112is associated with the role based on information indicating the role in the request to launch the VM instance112. In another embodiment, the VM instance112can be assigned a role using information from a database. In an embodiment, the role can be associated with the VM instance112after the VM instance112has launched. but the customer can assign the role later. In some embodiments, the VM instance112can also be launched with metadata indicating the scope and type of access that is required, as well as metadata indicating authorized users, methods of authentication, privileges of the application and/or other such metadata.

In an embodiment, the user device102causes an enclave124to be instantiated for the VM instance112on the host computer system110(e.g., the hardware server). The enclave124can be configured to provide a secure storage area for keys associated with decrypting encrypted role credentials for VM instances with minimal alterations to the guest operating system running on the VM instance112by keeping most of the functionality within the hypervisor120and facilitating utilization of the secure storage area by applications using hypervisor application programming interface (API) calls. As an example, an enclave is a module, trusted execution environment, and/or service under the control of a hypervisor which can be configured to at least receive requests from applications running on guest virtual machines under the control of the hypervisor to use the necessary keys associated with decrypting encrypted role credentials for the applications to access web services and/or resources. An enclave can be comprised of one or more storage areas, processes and/or other such resources. The enclave can run within, or under the control of, the hypervisor, and can only be accessible via the hypervisor.

The VM instance112can be launched to have access to the enclave124(e.g., secure storage area). To have access to or be associated with the enclave124, a hypervisor120can be updated to expose the enclave124to the VM instance112and map the enclave124to the VM instance112so that the VM instance112can communicate with the enclave124. The hypervisor120can us mapping information to provide information about the VM instance112to the enclave124and since the hypervisor120is a trusted resource, the enclave124also trusts that the VM instance112requesting signatures is a trusted entity. The communication between resources can be performed using domain sockets. In order to protect the keys from access by other applications on the host computer system110, the computer system can store the keys in an enclave124location maintained by the hypervisor120. Access to the keys122is requested by the application114using an identifier that, if verified by the hypervisor120can allow the release of the keys122from the enclave122for use by the application114. If the identifier is not verified, the keys122cannot be released by the enclave124for use by the application.

In some embodiments, the enclave124can be hidden from the other VM instances on the host computer system110and in some embodiments, the enclave124can appear as any other instance on the host computer system110. The enclave124can also be referred to herein as a secret VM instance, a secret instance and/or other such references. The enclave124can be a lightweight or simplified instance configured with the minimal functionality required to manage keys for the VM instance112and, in some embodiments, to manage data and/or other resources. In some embodiments, in lieu of an enclave124, the user device102can use a web service that performs encryption operations. The enclave124can be a set of instruction codes that allow for regions of memory to be private. These regions of memory can be protected and are unable to be accessed by processes outside of the enclave124itself. The enclave124can be a subsystem to which the VM instance112can submit requests to cause the enclave124to perform various operations using a key protected from access from the VM instance112. The operations can be cryptographic operations (e.g., encryption, decryption, attestation, digital signing, etc).

In some embodiments, a new enclave is instantiated for each VM instance launched. In some embodiments, the hypervisor120can instantiate an enclave124that is shared by a plurality of VM instances and that is configured to receive metadata from launched instances and to manage keys for the plurality of VM instances. In an embodiment, the enclave124or a pool of enclaves can be previously generated on the host computer system110and the user device102, after launching the VM instance112, is assigned to the enclave124from the pool of enclaves.

In an embodiment, the application114running on the VM instance112can initiate communication to the enclave124by first sending a request to access one or more web services. The request indicates that encrypted role credentials116are to be provided from an Instance Metadata Service (IMDS)118. In some embodiments, the IMDS118can also be described as an instance metadata manager or an instance data manager, or the like. In an embodiment, the encrypted role credentials116are stored as metadata associated with the VM instance112. Role credentials116are used throughout this disclosure for the purpose of illustration as various embodiments can include other types of credentials such as cryptographic keys, bearer tokens, passwords, other secrets, etc.

As briefly noted above, each VM instance112can be associated with various metadata (e.g., instance data) that can be used to configure or manage the instance. This metadata can be determined based at least in part on configuration parameters describing the VM instance112. Metadata can also include various information provided by a customer for customizing or managing the instance, and such customer-generated metadata can be arbitrary (e.g., freely definable, and not necessarily connected with the operation of the instance itself). Although the term “metadata” is used herein, other terms such as “configuration data,” “instance data,” or “instance metadata” can be used interchangeably to refer to the same data. Some examples of metadata include hardware specifications of the instance (e.g., the number of virtual central processing units (CPUs), memory, storage capacity, etc.), network information associated with the instance (e.g., hostnames, Internet Protocol addresses, networking interface information, etc.), and other information corresponding to the instance, such as operating system type, instance architecture (e.g., 32-bit or 64-bit). Other examples of metadata include data (e.g., metadata) specific to operation of external services connected with or incident to the operation of the VM instance112.

Again, the encrypted role credentials116as described above, can be stored as metadata and provided, when requested, by the IMDS118associated with VM instance112. The encrypted role credential116can then be sent along with the request to access web services, generated by the application114running on the VM instance, to the enclave124such that the enclave124can be used to generate a signature for the request. The enclave124includes the previously stored keys122specific for the VM instance112such that the keys122are used to decrypt the encrypted role credentials116so that a signature can be generated.

In order to protect the keys from access by other applications on the host computer system110, the computer system can store the keys in an enclave124location maintained by the hypervisor120. Access to the keys122is requested by the application114using an identifier that, if verified by the hypervisor120can allow the release of the keys122from the enclave122for use by the application114. If the identifier is not verified, the keys122cannot be released by the enclave124for use by the application.

In some embodiments, the hypervisor120can provide the application114running on the VM instance112with a uniform resource locator (URL) or a uniform resource identifier (URI) that can refer to a service such as a webserver on the enclave124that the application114running on the VM instance112can use the URL or URI to access the enclave124. In such embodiments, a computing device running code of a modified Software Development Kit (SDK) can intercept all communications to the provided URI or URL to prevent direct communications between the application114on the VM instance112and the enclave124. In such embodiments, the computing device running the code of the SDK can obtain/receive the encrypted role credentials and subsequently send a request to the enclave124to obtain the signature. Once the signature is obtained the computing device running the code of the SDK then sends the signed request to the web service on behalf of the application114running on within the guest instance112.

FIG.2illustrates an example process200in which keys used to decrypt encrypted role credentials are stored in an enclave210as described herein at least in connection withFIG.1and in accordance with at least one embodiment. That is, as described inFIG.2, a shard secret key (K) can first be delivered from a key management service (not depicted inFIG.2but described in more detail with respect toFIG.7), for instance, that can be used to generate an enclave specific key to decrypt role credentials. As an example, a first step in the process200can include delivering a shared secret key (K) to a Federation Manager (FM)204. The FM204can be a manager or service that enables one or more service providers and identity providers such that resources are shared amongst the providers. The shared secret key (K) can be delivered to the FM204via a Key Management Service (KMS) (not depicted inFIG.2). This shared secret key (K) can be not be specific to an instance, but rather specific to the user202or customer with access to resources associated with the computing resource service provider.

Furthermore, as illustrated inFIG.2, in an embodiment, a user device202sends a request to launch a virtual machine/instance which has an associated role. The request is received by a control service/plane206of the computing resource service provider environment, which then can subsequently send another request (such as an API call) to a hypervisor208to launch the VM instance. The hypervisor208then can launch the VM instance requested by the user202and since this VM instance has a role associated with it, the hypervisor208can also create an enclave210. The enclave210can be created specifically for the VM instance and the role associated with the VM instance either synchronously or asynchronously. In an alternate embodiment, the enclave210is not a one to one mapping to the VM instance. That is, in an alternate embodiment, the enclave can be created to share its resources/secure storage area with a plurality of VM instances. In yet another alternate embodiment, there can be a plurality of enclaves210that are generated for a single VM instance. Information pertaining to how a VM is mapped to an enclave can be stored in a mapping table in the hypervisor.

In an embodiment, the hypervisor208first verifies the hash of the launched instance and sends a request to FM204for an enclave specific key to be stored in the enclave210. (In an alternate embodiment, instead of verifying the hash of the launched instance, the hypervisor208can deliver a shared secret to the enclave210and FM204.) The hypervisor208can send an attestation request to the FM204. The attestation request can include information a signature for hash and signature for the enclave which proves that the enclave is correct and the associated VM instance identifier (Instance-ID). The FM204can first verify this information for the enclave210and after that, the FM204can derive an enclave specific key (Ekey). The enclave specific key (Ekey) Ekey can be derived as follows: Ekey=HMAC−SHA256(K, Instance-ID). That is, the enclave specific key (Ekey) can be derived by applying a Hash-based Message Authentication Code (HMAC) using the SHA256 hash function to the shared secret (K) previously received and an identifier of the VM instance. The FM204can return the enclave specific key (Ekey) to the hypervisor208. Subsequently, the hypervisor208can then deliver the identifier of the VM instance and the enclave specific key (Ekey) to the enclave210. The enclave210, then subsequently stores the enclave specific key (Ekey) and the identifier of the VM instance. In an embodiment, the identifier of the VM instance is used to identify which instance the enclave specific key (Ekey) was generated for.

FIG.3illustrates an example process300in which encrypted role credentials are delivered to a VM instance can be implemented in a computing resource service provider environment. In an embodiment, the control service/plane302of the computing resource service provider environment asks, makes a call, or obtains from the FM306the encrypted role credentials for a VM instance based on identifying that the VM instance being associated with an enclave. Note that after the first call, FM306will continue to refresh these credentials before expiration since role credentials are active for a short amount of time (e.g., temporary). After the call, the FM308calls a role credential provider service304to obtain credentials for the role associated with the VM instance. Similar to the description above, the FM306can derive the enclave specific key (Ekey) as follows: EKey=HMAC−SHA256(K, Instance-ID) if the enclave specific key has not been derived previously. In an embodiment, the role credentials comprises of at least three items: a) an access key identifier (AccessKeyID), b) secret, and c) an encrypted token. The FM306can encrypt the secret with the enclave specific key (EKey). An authenticated model such as AES-GCM (Advanced Encryption Standard-Galios/Counter Mode) can be used to encrypt the secret using the enclave specific key (EKey). The use of an instance identifier (e.g., Instance-ID) in key derivation ensures that credentials can only be decrypted with the correct enclave. Thereafter, these encrypted role credentials are delivered to the IMDS (not depicted inFIG.3, but described inFIGS.1-2). The IMDS is associated with the VM instance and can be configured to store the encrypted role credentials as metadata for the VM instance. The encrypted role credential provided to the IMDS, as discussed above, now comprises of: a) an access key identifier, b) an encrypted secret, and c) an encrypted token.

FIG.4illustrates an example process400in which encrypted role credentials are decrypted using keys from an enclave406, in accordance with at least one embodiment. In an embodiment, a user device402running a VM instance generates a request for a web service410. That is, the user application402can send a request in an attempt to access a web service410, one or more web services, or computing resource. This request can go through a computing device running the code of a modified SDK404associated with the environment. The computing device running the code of the SDK404can first obtain the role credentials from IMDS408and determine whether the role credentials are encrypted or decrypted. If the role credentials are encrypted, subsequently, the computing device running the code of the SDK404can then send another request (e.g., GET request) to an enclave406, which is associated with the VM instance that generated the request for the web service, to generate a signature for the request. The GET request can include the original request for the web service generated by the user device402, the access key identifier, the encrypted secret, and the token.

As noted with respect toFIG.2, the enclave406was previously instantiated specifically for the VM instance to store the enclave specific key (EKey) that can be used to sign requests for the VM instance to access web services. The request submitted by the user device402can include information or identifiers associated with the instance such that the correct enclave406can be asked to provide the keys. The computing device running the code of the SDK404asks the enclave406to generate the signature. The enclave406can decrypt the encrypted secret using the enclave specific key (EKey) that was previously stored in the enclave406to generate the signature. The plaintext credential can be used by the enclave406to generate the signature. The signature can be generated by the enclave406with information that cryptographically protects the request based on the credentials provided to the enclave40006. In an embodiment, the credential is encrypted and the information is a digital signature generated using the decrypted credential. In an alternate embodiment, the request is encrypted with the credential. The signature can then be returned to the computing device running the code of the SDK404and the computing device running the code of the SDK404can then send the signed request to the web service410such that the user device402can access the service410and the resources associated with the web service410. In some embodiments, the response to the request may be canonicalized, by the enclave406and provide the canonicalized request back to the user device402.

In an alternate embodiment, the shared secret key (K) that was provided from a key manager to the FM204, as described inFIG.2, can be rotated. There are many possible mechanisms to rotate the shared secret key (K). As an example, key rotation can be performed by modifying the encrypted secret of the encrypted role credential. That is, instead of directly encrypting the secret, a binary large object (blob) is encrypted containing two items: secret and a new encryption key (NewEkey). The NewEKey can be derived using the same mechanism used for derivation of the current enclave specific key (Ekey). For example, NewEKey=HMACSHA256(NewK, Instance-ID). This blob is then encrypted using the current key Ekey. When the role credentials are received on the VM instance, the encrypted blob is passed to the enclave. The enclave decrypts the blob using current key Ekey to get access to NewEKey.

FIG.5illustrates a process500for generating keys to store in an enclave in a computing resource service provider environment, in accordance with at least one embodiment. At step502, an entity, such as an control plane/service or other resource capable of receiving and/or processing requests and/or changes thereto, receives a request to launch an instance. A user device or other interested entity can send the request to the control plane/service associated with the environment to request that an instance be launched. The instance can be a virtual machine, VM instance, or the like that operates on a host computer system in the computing resource service provider environment. The request specifies that the VM instance is associated with a role. At step504, the entity such as a hypervisor (or another entity connected with the entity receiving the request to launch an instance in step502) launches the VM instance. That is, the control service/plane sends a request to the hypervisor such that the hypervisor receives the request and causes an VM instance to be launched on the host computer system. The host computer system can also be described as a hardware server, hardware device, and the like.

At step506, an enclave is also instantiated for the VM instance on the host computing system. In other words, as the hypervisor receives the request to launch the VM instance, the hypervisor is also requested to launch or instantiate an enclave and associate the enclave with the launched VM instance. In an alternate embodiment, the request to launch the VM instance does not include information on launching the enclave. Rather, another request is sent from the user device to generate a VM instance specific enclave. In an embodiment, the enclave is generated synchronously with the launch of the VM instance. In an alternate embodiment, the enclave can be generated asynchronously after the launch of the VM instance. At step508, after the VM instance is launched and the enclave is launched, a key (e.g., enclave specific key) is generated specifically for the VM instance and the role associated with the VM instance. That is, the enclave specific key can be an encryption key that is specific for the VM instance (e.g., an enclave specific encryption key) that, when generated, can be used to decrypt encrypted role credentials associated with the VM instance. In other words, the enclave specific key can be used to sign off on requests from applications running on the VM instance that can want seek access to one or more web services in the environment.

At step510, the enclave specific key that was generated in step508is stored in the enclave. As can be contemplated, the enclave can have a direct connection or a communication channel with the instance using a computing device running the code of a SDK associated with the VM instance and such requests for web services stemming from applications running on the VM instance can be received by the enclave. In other embodiments, the hypervisor can be the intermediate communication channel between the enclave and its associated VM instance via a virtual socket such that requests are forwarded and/or translated from the user device to the enclave accordingly.

FIG.6illustrates a process600for using the encrypted credentials through obtaining keys from the enclave, in accordance with at least one embodiment. At step602, an entity, such as a control plane/service or other resource capable of receiving and/or processing requests and/or changes thereto in a computing resource service provider environment, obtains a request to access a web service. A user device can send a request to the control plane/service to request access to the web service or a computing resource. The user device can generate the web service request when running an application on a VM instance. In another embodiment, the request can be generated by the application running on the VM instance and not specifically directed by instructions from the user device. At step604, a computing device running the code of the SDK obtains the web service request generated from step602. The computing device running the code of the SDK then sends a second request to obtain encrypted role credentials associated with the VM instance that generated the web service request. The encrypted role credentials can have been previously generated and stored as metadata in an instance metadata service (IMDS) or an instance metadata manager. The encrypted role credentials can then be provided from the IMDS to the computing device running the code of the SDK after processing the second request.

At step606, the computing device running the code of the SDK can then transmit the encrypted role credentials it received from the IMDS to an enclave. The enclave is a previously generated enclave that is specific to the VM instance that generated the original request for the web service. As described above with respect toFIGS.1-4, the enclave is secure storage area to store one or more enclave specific keys that can be used to decrypt encrypted role credentials pursuant to the role associated with the instance. In an embodiment, the enclave is a set of security-related instruction codes that are built to define private regions of memory. The contents in the enclave are typically protected and cannot be read or saved by any processes running outside of the enclave. Moreover, at step606, the computing device running the code of the SDK sends the encrypted role credential and the web service request to the enclave. The enclave, as mentioned above, includes the enclave specific key that can be used to decrypt the encrypted role credentials. Once decrypted, the enclave then can generate a signature for the web service request. The signature can be digital signature on the web service request. At step608, the digitally signed request can then be transmitted or forwarded to a web service such that the application running on the VM instance can obtain access to the web service.

In an embodiment, the enclave ceases to operate when the VM instance that it's associated with is either suspended or has also ceased its operations. In an alternate embodiment, when the VM instance is in the suspended state or in a ceased operation state, the enclave associated with the VM instance can associate itself with another launched VM instance to provide secure storage for keys for the roles associated with the other launched VM instance.

FIG.7illustrates an example process700in which keys, via a key manager (e.g., key management service706), that are used to decrypt encrypted role credentials are stored in an enclave can be implemented, in accordance with at least one embodiment. In an embodiment, a key from a key management service706is created. The key can be an enclave specific key that is used to decrypt role credentials in an enclave. The key is generated by credential server704and is further registered so that its handle or information pertaining to locating the key from the key management service706can be delivered by a hypervisor710to an enclave712. The credential server704may also be referred to as a credential manager. The registration performs a SHA-256 hash of the enclave image so that the key is only available to an enclave that runs the trusted credential server image.

In an embodiment, after the key is generated, a user device702sends a request to launch a VM instance. The request can include specifics that identify the instance having associated role. The control plane/service708, then receives the request from the user device702. The control plane/service702can then send a request to the hypervisor708to launch or create the VM instance. The hypervisor710launches the VM instance and since this VM instance has a role associated with it, the hypervisor710also creates an enclave. The enclave can be created specifically for the VM instance or, in alternate embodiments, the enclave can be created for a plurality of VM instances. The request for launching a VM instance obtained by the hypervisor can identify that the request for the VM instance to be launched has a role associated with it such that based on the identification an enclave is also instantiated. However, in some embodiments, the hypervisor can obtain a second request separate from the request to launch the VM instance to indicate that an enclave be instated from the launched VM instance. The hypervisor710verifies the hash of the launched image and sends a request to the key management service706for access to the key that was previously created by the key management service706. The request is received by the key management service706and it verifies that the key can be accessed. This verification can be done by decrypting a binary large object (blob) that was encrypted by the credential server's704key. Subsequently, the hypervisor710can then deliver the instance identifier and key handle to enclave712.

FIG.8illustrates an example process800in which encrypted role credentials are delivered to a VM instance, in accordance with at least one embodiment. A control plane/service802asks the FM806to deliver encrypted role credentials. Note that after the first call, FM806will continue to refresh these credentials before expiry. FM806calls a role credential provider service804to get credentials for a role associated with the VM instance810. In an embodiment, role credentials comprises at least three items: a) an access key identifier (AccessKeyID) b) secret c) encrypted token. FM806encrypts the secret with the key generated as described with respectFIG.7with a key identifier. FM806uses the instance identifier as key context. This ensures that credentials can only be encrypted when instance identifier matches. These credentials are then delivered to the IMDS (not depictedFIG.8, but as described with respect toFIG.1).

FIG.9illustrates an example process900in which encrypted role credentials are decrypted using keys from an enclave906, in accordance with at least one embodiment. Initially, a user device902sends a request to a web service912. This request is intercepted or runs through a computing device running the code of modified SDK904first that is associated with the VM instance. The computing device running the code of the SDK904gets the encrypted role credentials from IMDS910. Moreover, in an embodiment, the computing device running the code of the SDK904then asks the enclave906to generate a signature for the request. If the decrypted secret is not in cache, the enclave906makes a request to hypervisor908to decrypt the encrypted secret using a key context associated with the identifier of the VM instance. The hypervisor908then returns the decrypted secret by calling a decrypt from the key management service (not depicted here inFIG.9). This decrypted secret can be cached for later use. Caching the decrypted secret can avoid the potential need to call hypervisor908and key management service to decrypt the encrypted key which can be a slow operation. Subsequently, the enclave906can then generate the signature and the signature is returned to the computing device running the code of the SDK904. The computing device running the code of the SDK904then sends the signed request to the web service912such that the user device902can access the web service and its associated resources. If the decrypted secret is in cache, then the process ofFIG.9can require less steps in that once the request is sent to the enclave to obtain a signature for the request, the enclave generates the signature using the decrypted secret previously created.

FIG.10illustrates aspects of an example system1000for implementing aspects in accordance with an embodiment. As will be appreciated, although a web-based system is used for purposes of explanation, different systems can be used, as appropriate, to implement various embodiments. In an embodiment, the system includes an electronic client device1002, which includes any appropriate device operable to send and/or receive requests, messages, or information over an appropriate network1004and convey information back to a user of the device. Examples of such client devices include personal computers, cellular or other mobile phones, handheld messaging devices, laptop computers, tablet computers, set-top boxes, personal data assistants, embedded computer systems, electronic book readers, and the like. In an embodiment, the network includes any appropriate network, including an intranet, the Internet, a cellular network, a local area network, a satellite network or any other such network and/or combination thereof, and components used for such a system depend at least in part upon the type of network and/or system selected. Many protocols and components for communicating via such a network are well known and will not be discussed herein in detail. In an embodiment, communication over the network is enabled by wired and/or wireless connections and combinations thereof. In an embodiment, the network includes the Internet and/or other publicly addressable communications network, as the system includes a web server1006for receiving requests and serving content in response thereto, although for other networks an alternative device serving a similar purpose could be used as would be apparent to one of ordinary skill in the art. The web server can be a hardware server that hosts a virtual machine (VM) instance1018, a plurality of virtual machines, trusted execution environments (e.g., enclaves)1020, and at least one virtual machine manager (VMM) (e.g., hypervisor)1022. As described herein with respect toFIG.1-9, the VM instance1018can be instantiated on the same web server (hardware)1006as the enclave1020and any communication pertaining to signing web service requests generated by an application running on the VM instance1018can be facilitated via a hypervisor1022.

In an embodiment, the illustrative system includes at least one application server1008and a data store1010, and it should be understood that there can be several application servers, layers or other elements, processes or components, which can be chained or otherwise configured, which can interact to perform tasks such as obtaining data from an appropriate data store. Servers, in an embodiment, are implemented as hardware devices, virtual computer systems, programming modules being executed on a computer system, and/or other devices configured with hardware and/or software to receive and respond to communications (e.g., web service application programming interface (API) requests) over a network. As used herein, unless otherwise stated or clear from context, the term “data store” refers to any device or combination of devices capable of storing, accessing and retrieving data, which can include any combination and number of data servers, databases, data storage devices and data storage media, in any standard, distributed, virtual or clustered system. Data stores, in an embodiment, communicate with block-level and/or object-level interfaces. The application server can include any appropriate hardware, software and firmware for integrating with the data store as needed to execute aspects of one or more applications for the client device, handling some or all of the data access and business logic for an application.

In an embodiment, the application server provides access control services in cooperation with the data store and generates content including but not limited to text, graphics, audio, video and/or other content that is provided to a user associated with the client device by the web server in the form of HyperText Markup Language (“HTML”), Extensible Markup Language (“XML”), JavaScript, Cascading Style Sheets (“CSS”), JavaScript Object Notation (JSON), and/or another appropriate client-side or other structured language. Content transferred to a client device, in an embodiment, is processed by the client device to provide the content in one or more forms including but not limited to forms that are perceptible to the user audibly, visually and/or through other senses. The handling of all requests and responses, as well as the delivery of content between the client device1002and the application server1008, in an embodiment, is handled by the web server using PHP: Hypertext Preprocessor (“PHP”), Python, Ruby, Perl, Java, HTML, XML, JSON, and/or another appropriate server-side structured language in this example. In an embodiment, operations described herein as being performed by a single device are performed collectively by multiple devices that form a distributed and/or virtual system.

The data store1010, in an embodiment, includes several separate data tables, databases, data documents, dynamic data storage schemes and/or other data storage mechanisms and media for storing data relating to a particular aspect of the present disclosure. In an embodiment, the data store illustrated includes mechanisms for storing production data1012and user information1016, which are used to serve content for the production side. The data store1010also is shown to include a mechanism for storing log data1014, which is used, in an embodiment, for reporting, computing resource management, analysis or other such purposes. In an embodiment, other aspects such as page image information and access rights information (e.g., access control policies or other encodings of permissions) are stored in the data store in any of the above listed mechanisms as appropriate or in additional mechanisms in the data store1010.

The data store1010, in an embodiment, is operable, through logic associated therewith, to receive instructions from the application server1008and obtain, update or otherwise process data in response thereto, and the application server1008provides static, dynamic, or a combination of static and dynamic data in response to the received instructions. In an embodiment, dynamic data, such as data used in web logs (blogs), shopping applications, news services, and other such applications, are generated by server-side structured languages as described herein or are provided by a content management system (“CMS”) operating on or under the control of the application server. In an embodiment, a user, through a device operated by the user, submits a search request for a certain type of item. In this example, the data store accesses the user information to verify the identity of the user, accesses the catalog detail information to obtain information about items of that type, and returns the information to the user, such as in a results listing on a web page that the user views via a browser on the user device1002. Continuing with this example, information for a particular item of interest is viewed in a dedicated page or window of the browser. It should be noted, however, that embodiments of the present disclosure are not necessarily limited to the context of web pages, but are more generally applicable to processing requests in general, where the requests are not necessarily requests for content. Example requests include requests to manage and/or interact with computing resources hosted by the system1000and/or another system, such as for launching, terminating, deleting, modifying, reading, and/or otherwise accessing such computing resources.

In an embodiment, each server typically includes an operating system that provides executable program instructions for the general administration and operation of that server and includes a computer-readable storage medium (e.g., a hard disk, random access memory, read only memory, etc.) storing instructions that, if executed by a processor of the server, cause or otherwise allow the server to perform its intended functions (e.g., the functions are performed as a result of one or more processors of the server executing instructions stored on a computer-readable storage medium).

The system1000, in an embodiment, is a distributed and/or virtual computing system utilizing several computer systems and components that are interconnected via communication links (e.g., transmission control protocol (TCP) connections and/or transport layer security (TLS) or other cryptographically protected communication sessions), using one or more computer networks or direct connections. However, it will be appreciated by those of ordinary skill in the art that such a system could operate in a system having fewer or a greater number of components than are illustrated inFIG.10. Thus, the depiction of the system1000inFIG.10should be taken as being illustrative in nature and not limiting to the scope of the disclosure.

The various embodiments further can be implemented in a wide variety of operating environments, which in some cases can include one or more user computers, computing devices or processing devices that can be used to operate any of a number of applications. In an embodiment, user or client devices include any of a number of computers, such as desktop, laptop or tablet computers running a standard operating system, as well as cellular (mobile), wireless and handheld devices running mobile software and capable of supporting a number of networking and messaging protocols, and such a system also includes a number of workstations running any of a variety of commercially available operating systems and other known applications for purposes such as development and database management. In an embodiment, these devices also include other electronic devices, such as dummy terminals, thin-clients, gaming systems and other devices capable of communicating via a network, and virtual devices such as virtual machines, hypervisors, software containers utilizing operating-system level virtualization and other virtual devices or non-virtual devices supporting virtualization capable of communicating via a network.