Repository navigation
Conversation
…efault KMS A key ID without prefix in a request goes to the default KMS, so keys of other KMSs, and keys stored without prefix that belong to the SSE-migration KMS, keep their ARN in responses.
Covers keys of the default KMS and of other KMSs, on object writes, GET and GetBucketEncryption.
…tion KMS prefix when ARNs are shown With kmsHideScalityArn off, key IDs are returned as stored. Keys written before 9.5 are stored without ARN prefix. With SSE migration set, such a key belongs to the SSE-migration KMS, but a key ID without prefix in a request goes to the default KMS, so the returned key ID named a different key when sent back. For example, the default KMS is kmip:thales and SSE migration is set from the internal KMS. A bucket configured before 9.5 has key abcd. GetBucketEncryption returned abcd, and a PutObject with abcd encrypted with arn:scality:kms:external:kmip:thales:key/abcd. GetBucketEncryption now returns arn:scality:kms:internal:file:scality:key/abcd. Keys stored without prefix that belong to the default KMS are still returned as stored.
Contributor
Hello dvasilas,My role is to assist you with the merge of this Available options
Available commands
Status report is not available. |
Contributor
Waiting for approvalThe following approvals are needed before I can proceed with the merge:
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
Master encryption key ID in responses
Cloudserver returns the key ID of the master encryption key for
aws:kmsencryption.PutObjectandHeadObject, the key ID is returned in thex-amz-server-side-encryption-aws-kms-key-idheader.GetBucketEncryption, the key ID is in theKMSMasterKeyIDelement of the response.With
kmsHideScalityArnon (the default), Cloudserver removes the ARN prefix:arn:scality:kms:external:kmip:thales2:key/54is returned as54.The prefix names the KMS;
54contains no information about which KMS it belongs to.Master encryption key ID in requests
An end user can send a key ID in requests, for example, to choose the key that encrypts an object on
PutObject.If the provided key ID lacks an ARN prefix, Cloudserver sends the key ID to the default KMS.
Problems
Keys in another KMS
When multiple KMSs are configured, and an end user passes a key ID that Cloudserver returned in a later request, the key ID may not refer to the same key.
Example:
thales, andthales2is another KMS.arn:scality:kms:external:kmip:thales2:key/54.54, without a prefix.54goes to the default KMS and usesarn:scality:kms:external:kmip:thales:key/54Result: If
thaleshas a key54, the new object is encrypted with that key inthalesinstead of the key inthales2that the end user meant, with no error. Otherwise, the request fails.Keys stored without prefix
Cloudserver returns a key stored without a prefix as stored, whether
kmsHideScalityArnis on or off.Keys written before Cloudserver started storing keys with an ARN prefix are stored without a prefix.
SSE migration declares that keys without a prefix belong to the SSE-migration KMS.
Example:
abcd.PutObjectwithabcdgoes to the default KMS, but the key belongs to the SSE-migration KMS.Result: if the default KMS has a key
abcd, the new object is encrypted with it, with no error. Otherwise, the request fails.Changes
With
kmsHideScalityArnon, S3C removes the prefix only for keys in the default KMS.54.arn:scality:kms:external:kmip:thales2:key/54.arn:scality:kms:internal:file:scality:key/abcd.With
kmsHideScalityArnoff, key IDs are returned as stored, except for keys stored without a prefix that belong to the SSE-migration KMS; those are returned with that KMS's prefix as well.