Repository navigation
support KMS key for EBS encryption - #303
Conversation
There was a problem hiding this comment.
// Identifier (key ID, key alias, ID ARN, or alias ARN) for a customer managed
// CMK under which the EBS volume is encrypted.
Looking at the API reference it suggests a Key ID can also be used? If that's possible then we should probably support it.
Alternatively, if we don't want to, or it's not, maybe this should just be KMSKeyARN *string instead to not give the option to specify the ID?
There was a problem hiding this comment.
Looking at the API reference it suggests a Key ID can also be used? If that's possible then we should probably support it.
https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_EbsBlockDevice.html
yeah looking at the docs, it seems like both ID and ARN styles are supported. So maybe we can support both. what the preference order between ID and ARN? I can make that change @JoelSpeed
Alternatively, if we don't want to, or it's not, maybe this should just be KMSKeyARN *string instead to not give the option to specify the ID?
Even if we do just want to support ARN, using the reference allows us to support filters at a later stage, when maybe AWS starts supporting that.
There was a problem hiding this comment.
A quick look through the code suggests that ID is preferred as every other use is either just the ID or ID then filter, so I'd suggest ID then ARN in this case
For encyrpted EBS volumes allow users to provide ARN to the KMS keys to use. It uses the ID > ARN preference order similar to other functions - Why only ID and ARN? the KMS keys don't really support filtering the KMS keys based on tags. [1] & [2] [1]: https://docs.aws.amazon.com/cli/latest/reference/kms/index.html#cli-aws-kms [2]: https://docs.aws.amazon.com/cli/latest/reference/kms/describe-key.html
9e403aa to
2d397b5
Compare
|
/assign @bison |
| }, | ||
| } | ||
|
|
||
| if aws.StringValue(blockDeviceMappings[0].EBS.KMSKey.ID) != "" { |
There was a problem hiding this comment.
may be include a v(3) log for each branch?
There was a problem hiding this comment.
hmm..
- I don't see any such logging for other AWS References objects?
- Also even if we log this, it can't be tied back the machine as there is no such context available.
but added it to f35cbbff @enxebre
|
/retest |
f35cbbf to
a88a1bd
Compare
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: enxebre The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
- When using the ARN for KMS key, the log output doesn't include the ARN value as it contains the AWS account ID which is usually sensitive. - This current setup doesn't have a great way to tie EBS volume to the machine object, and therefore this log will be difficult to tie back to the machine object. which reduces the value to some degree.
a88a1bd to
09f91d9
Compare
|
/retest Please review the full test history for this PR and help us cut down flakes. |
3 similar comments
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
@abhinavdahiya are we e2e testing this with a user provided KMS key somewhere? Otherwise we are assuming them to be accessible for all principals by default, which might not necessarily be the case. This popped out here https://bugzilla.redhat.com/show_bug.cgi?id=1815219. Although that is seeing in 4.3 the scenario is comparably here. Thoughts? |
For encyrpted EBS volumes allow users to provide ARN to the KMS keys to use. It uses the ID > ARN preference order similar to other functions
the KMS keys don't really support filtering the KMS keys based on tags. 1 & 2