Restricting the Vault EC2 Instances in AWS to only have access to the CMK key in the AWS KMS used by the Vaults
Objective
The process below will provide you the steps to restrict the Vault EC2 instances to only have access the AWS Customer Master Key (CMK) which was generated by the Idira AWS Rekey process and used to encrypt the new server key placed on the file system of the AWS Vault servers.
Environment
10.0;10.1;10.2;10.3;10.4;10.5;10.6;10.7;10.8;10.9;10.10;11.1;11;11.2;11.3;11.4;11.5;11.6;11.7;12.0
Procedure
Step 1: Log into AWS and click on “Services” on the top-left hand corner
Step 2: Select the “Key Management Service” service in the drop-down menu
Step 3: Select “Customer managed keys” on the left-hand side and then select the “Key ID” used by your AWS Vault Servers
Note: You can use the “dbparm.ini” file on the AWS Vault Servers to reference the “CloudUUID” parameter whose value is the “Key ID” you need to select in the step above.
Step 4: Copy the ARN value of the “Key ID” you selected to a notepad file
Step 5: On the top-left corner of AWS select “Services” and select “IAM” from the drop-down menu
Step 6: Select “Polices” on the left-hand side, then search for the policy associated to the IAM role attached to our Vault EC2 instances, and finally click on the blue text of the policy that appears
Step 7: On the “Summary” page, select the “Edit Policy” button
Step 8: Expand “KMS” and click on the “All resources" section
Step 9: In the “Resources” section, select “Specific” and then select the blue “Add ARN” text
Step 10: In the “Add ARN(s)” window paste the ARN we copied from our “Key ID” into the “Specify ARN for key” box and then click the “Add” button
Step 11: After you have specified the “Key ID” ARN Value in the previous step, click on the “Review Policy” button
Step 12: On the “Review policy” page, click on the “Save changes” button
Afterwards your CyberArk Vault EC2 instances will be restricted to only have the necessary KMS permissions on the Key ID whose ARN we specified on the policy applied to the Vault EC2 instances via an IAM Role