-
Notifications
You must be signed in to change notification settings - Fork 357
Add KMS options to catalogs create CLI #3330
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -179,6 +179,8 @@ class Arguments: | |
| ENDPOINT_INTERNAL = "endpoint_internal" | ||
| STS_ENDPOINT = "sts_endpoint" | ||
| STS_UNAVAILABLE = "no_sts" | ||
| KMS_KEY_CURRENT = "current_kms_key" | ||
| KMS_KEY_ALLOWED = "allowed_kms_key" | ||
| PATH_STYLE_ACCESS = "path_style_access" | ||
| CATALOG_CONNECTION_TYPE = "catalog_connection_type" | ||
| CATALOG_AUTHENTICATION_TYPE = "catalog_authentication_type" | ||
|
|
@@ -258,6 +260,12 @@ class Create: | |
| "(Only for S3) Indicates that Polaris should not use STS (e.g. if STS is not available)" | ||
| ) | ||
| PATH_STYLE_ACCESS = "(Only for S3) Whether to use path-style-access for S3" | ||
| KMS_KEY_CURRENT = ( | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As these are optional and only for AWS, we may want to update
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. good point - updated |
||
| "(Only for AWS S3) The AWS KMS key ARN to be used for encrypting new S3 data" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am assuming this is required because we need to use this key to encrypt metadata.json ? as when we are vending creds we don't know which snapshot the client will be reading so we vend creds for all or we just give decrypt creds for allowed key and encrypt | decrypt creds for current keys ?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Polaris does not use KMS keys directly. It only generates AWS policies that allow those keys to be used on the AWS side when S3 requests are made. But, yes, the current key is used for writing new data. Zero or more additional keys are also allowed to be used because they might be required for dealing with old files.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
wouldn't we be needing this for encrypting / decrypting metadata.json ?
I agree with additional keys but my question was why would Polaris vends creds for old kms keys for encrypting, files are immutable, so old keys should be vended for decrypt, similarly new key should have encrypt / decrypt.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Currently it does. However, this is beyond the scope of current PR (CLI). It's about the actual java code from #2802 :) Normally, I'd think "additional" keys should get only decryption rights, but this may be tricky from the manual key rotation perspective.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Filed #3338 for follow-up |
||
| ) | ||
| KMS_KEY_ALLOWED = ( | ||
| "(Only for AWS S3) AWS KMS key ARN(s) that this catalog and its clients are allowed to use for reading S3 data (zero or more)" | ||
| ) | ||
|
|
||
| TENANT_ID = "(Required for Azure) A tenant ID to use when connecting to Azure Storage" | ||
| MULTI_TENANT_APP_NAME = ( | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does just setting
current_kms_keyautomatically adds theallowed_kms_keys?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently "current" is the same as "allowed"... However, I believe only "current" needs write access... but that's in Polaris java code... it does not affect CLI.