-
Notifications
You must be signed in to change notification settings - Fork 14
DC1: Encrypt storage gateway EC2 AMI root(non-EBS) /dev/xvda volume to adhere AWS SEA deny rule on encryption: false #33
Comments
the unencrypted snapshot backing the AMI see (my personal uipath deployment has the ec2 volume encryption DENY rule set to false - to bring up the system in a less secure environment) "In addition, when you launch an instance from an AMI backed by unencrypted EBS snapshots, you can encrypt some or all of the volumes during launch." fix to check EC2
fix 2 to check ami-081419a3f54890191
|
Anyway both drives are EBS and encrypted (as per the ami). will reuse the previous activation key from 145
309 Exception: An error occurred (InvalidGatewayRequestException) when calling the ActivateGateway operation: The specified activation key was not found. rerun with normal ami search shows ami-04109bbae95017363which is different than uipath145's ami 312 use ami-05 hardcoded however we are failing later on activation key 313 - theory - try encryption on the yaml - not the default ec2 setting encoded ec2 again using 1604 noticed account encryption back on - turned off, reran with all defaults 316 turn back on default account encryption - run defaults 317: encryption global on and add below
good partial news - the drives are now encrypted but we get the above fileshare error activation key good
using ami
318: pending |
Summary: I see however there would be case where the regional encryption global flag is turned off and and EC2 was created (indirectly via ec2 api via CloudFormation) - that would now come in un-encrypted. For the purposes of the dev account as long as the regional ec2 encryption flag is always false - we can relax the rule on the EC2 deny during development of the storage gateway AMI retrofit. The remaining issue is that the root drive on the AMI used for the SG is unencrypted - however the latest run of 317 flipped the encryption to true as soon as the AMI was used via the EC2 global flag. If you check all the volumes for the entire account you will see that except for 2 test instances from another user last quarter are encrypted - specifically the pre-prod 145 from 6 weeks ago actually already had encrypted volumes across all the EC2 VMs reference |
Hey, thank you very much for reporting this. |
This is one of the encryption flags - the other root (non-EBS) volume is hidden because it comes with the unencrypted snapshot backing the AMI
see
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AMIEncryption.html
https://github.com/aws-quickstart/quickstart-uipath-orchestrator/blob/main/templates/storage.template.yaml#L296
API: ec2:RunInstances You are not authorized to perform this operation.
"DecodedMessage": "{"allowed":false,"explicitDeny":true,"matchedStatements":
{"items":[{"statementId":
"PreventEc2MountUnencryptedVolume"
,"effect":"DENY","principals":
{"items":[{"value":"ARO....HWH"}]},"principalGroups":{"items":[]},"actions":
{"items":[{"value":"ec2:RunInstances"}]},"resources":{"items"
:[{"value":"arn:aws:ec2:::volume/*"}]},"conditions":{"items":
[{"key":"ec2:Encrypted","values":{"items":
[{"value":"false"
}]}}]}}]},
other fixes - ha template
add to ha template
HAMaster:
Type: 'AWS::EC2::Instance'
Properties:
The text was updated successfully, but these errors were encountered: