KMS

  • Create/manage Customer master key
  • Enable/disable CMKs
  • Schedule CMKs for deletion
  • Configure key policies and grants
  • Key Material
    • AWS managed - Default - The KM is automatically rotated every 3 years (cannot be changed).
    • Customer managed - AWS generated KM - rotated every year automatically.
    • Customer managed - Customer generated KM- manually rotated KM - but upto customer when they want to do rotation. 
  • Key Rotation - is accomplished by updating the backing key material. Old material is retained for decryption.
  • Key Types
    • Symmetric - Single key for both encrypt and decrypt operations. - Default - Best practice.
    • Asymmetric - Public and Private key pair for  encrypt and decrypt operations.
  • Key deletion - Waiting period between 7 and 30 days before key is deleted.
  • For external key material - wrapping algo which will be used to encrypt the KM. 
  • (CMKs) Master keys thus created has size limitation of 4 KB only.
  • Envelope encryption - Master keys are used to generate data key by API call. Data key can be used for encryption and decryption and they have no size limit on data.
    • Step 1 - Create data key
    • Step 2 - Encrypt data using data key
    • Step 3 - Encrypt data key using master key (The enc' data key is stored alongside enc' data).
    • Step 4 - To decrypt - First decrypt the data key using master key and then decrypt the data using data key. 
  • KMS - AWS Key Management Service (AWS KMS) is a service that combines secure, highly available hardware and software to provide a key management system scaled for the cloud.
    1. If you use CMKs, you use AWS KMS to centrally create CMKs, define the policies that control how CMKs can be used, and audit their usage to prove that they are being used correctly. 
    2. When you use SSE-KMS encryption with an S3 bucket, the AWS KMS CMK must be in the same Region as the bucket.
    3.  If you want to use a customer managed CMK for SSE-KMS, create the CMK before you configure SSE-KMS. 
    4. enable-key-rotation enables automatic rotation of a customer managed customer master key (CMK). The CMK will be rotated one year (365 days) from the date that this command completes and every year thereafter.
    5. CMKs can be broken down into two general types: AWS-managed and customer-managed. An AWS-managed CMK is created when you choose to enable server-side encryption of an AWS resource under the AWS-managed CMK for that service for the first time (e.g., SSE-KMS). AWS managed CMK is rotated once every three years automatically. For more control, a best practice is to use a customer-managed CMK in all supported AWS services and in your applications.
    6. For customer-managed CMKs, you have two options for creating the underlying key material. When you choose to create a CMK using AWS KMS, you can let KMS create the cryptographic material for you, or you can choose to import your own key material. Both of these options provide you with the same level of control and auditing for the use of the CMK. 

Comments

Popular posts from this blog

AWS Organizations, IAM

Key Concepts

Linear Algebra Concepts