You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@polaris.apache.org by "dimas-b (via GitHub)" <gi...@apache.org> on 2025/12/24 18:16:20 UTC

[PR] Add KMS options to catalogs create CLI [polaris]

dimas-b opened a new pull request, #3330:
URL: https://github.com/apache/polaris/pull/3330

   Following up on #2802
   
   <!--
   ๐Ÿ“ Describe what changes you're proposing, especially breaking or user-facing changes. 
   ๐Ÿ“– See https://github.com/apache/polaris/blob/main/CONTRIBUTING.md for more.
   -->
   
   ## Checklist
   - [ ] ๐Ÿ›ก๏ธ Don't disclose security issues! (contact security@apache.org)
   - [ ] ๐Ÿ”— Clearly explained why the changes are needed, or linked related issues: Fixes #
   - [ ] ๐Ÿงช Added/updated tests with good coverage, or manually tested (and explained how)
   - [ ] ๐Ÿ’ก Added comments for complex logic
   - [ ] ๐Ÿงพ Updated `CHANGELOG.md` (if needed)
   - [ ] ๐Ÿ“š Updated documentation in `site/content/in-dev/unreleased` (if needed)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@polaris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add KMS options to catalogs create CLI [polaris]

Posted by "singhpk234 (via GitHub)" <gi...@apache.org>.
singhpk234 commented on code in PR #3330:
URL: https://github.com/apache/polaris/pull/3330#discussion_r2647503933


##########
client/python/apache_polaris/cli/command/__init__.py:
##########
@@ -72,6 +72,8 @@ def options_get(key, f=lambda x: x):
                 sts_endpoint=options_get(Arguments.STS_ENDPOINT),
                 sts_unavailable=options_get(Arguments.STS_UNAVAILABLE),
                 path_style_access=options_get(Arguments.PATH_STYLE_ACCESS),
+                current_kms_key=options_get(Arguments.KMS_KEY_CURRENT),
+                allowed_kms_keys=options_get(Arguments.KMS_KEY_ALLOWED),

Review Comment:
   does just setting `current_kms_key` automatically adds the `allowed_kms_keys` ? 



##########
client/python/apache_polaris/cli/constants.py:
##########
@@ -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 = (
+                "(Only for AWS S3) The AWS KMS key ARN to be used for encrypting new S3 data"

Review Comment:
   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 ? 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@polaris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add KMS options to catalogs create CLI [polaris]

Posted by "dimas-b (via GitHub)" <gi...@apache.org>.
dimas-b commented on code in PR #3330:
URL: https://github.com/apache/polaris/pull/3330#discussion_r2653211665


##########
client/python/apache_polaris/cli/constants.py:
##########
@@ -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 = (
+                "(Only for AWS S3) The AWS KMS key ARN to be used for encrypting new S3 data"

Review Comment:
   Filed #3338 for follow-up



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@polaris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add KMS options to catalogs create CLI [polaris]

Posted by "MonkeyCanCode (via GitHub)" <gi...@apache.org>.
MonkeyCanCode commented on code in PR #3330:
URL: https://github.com/apache/polaris/pull/3330#discussion_r2648475679


##########
client/python/apache_polaris/cli/constants.py:
##########
@@ -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 = (

Review Comment:
   As these are optional and only for AWS, we may want to update `client/python/apache_polaris/cli/command/catalogs.py` as well for the function `_has_aws_storage_info()`. Here is a reference: https://github.com/apache/polaris/pull/3305/files#diff-a3e865c2a57514f7f505c706a3af70a5ac90b712f96656b513cdbfcee20c031eL181



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@polaris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add KMS options to catalogs create CLI [polaris]

Posted by "dimas-b (via GitHub)" <gi...@apache.org>.
dimas-b commented on code in PR #3330:
URL: https://github.com/apache/polaris/pull/3330#discussion_r2651304541


##########
client/python/apache_polaris/cli/command/__init__.py:
##########
@@ -72,6 +72,8 @@ def options_get(key, f=lambda x: x):
                 sts_endpoint=options_get(Arguments.STS_ENDPOINT),
                 sts_unavailable=options_get(Arguments.STS_UNAVAILABLE),
                 path_style_access=options_get(Arguments.PATH_STYLE_ACCESS),
+                current_kms_key=options_get(Arguments.KMS_KEY_CURRENT),
+                allowed_kms_keys=options_get(Arguments.KMS_KEY_ALLOWED),

Review Comment:
   yes



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@polaris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add KMS options to catalogs create CLI [polaris]

Posted by "dimas-b (via GitHub)" <gi...@apache.org>.
dimas-b commented on code in PR #3330:
URL: https://github.com/apache/polaris/pull/3330#discussion_r2651331326


##########
client/python/apache_polaris/cli/constants.py:
##########
@@ -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 = (

Review Comment:
   good point - updated



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@polaris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add KMS options to catalogs create CLI [polaris]

Posted by "dimas-b (via GitHub)" <gi...@apache.org>.
dimas-b commented on code in PR #3330:
URL: https://github.com/apache/polaris/pull/3330#discussion_r2651315257


##########
client/python/apache_polaris/cli/constants.py:
##########
@@ -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 = (
+                "(Only for AWS S3) The AWS KMS key ARN to be used for encrypting new S3 data"

Review Comment:
   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.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@polaris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add KMS options to catalogs create CLI [polaris]

Posted by "singhpk234 (via GitHub)" <gi...@apache.org>.
singhpk234 commented on code in PR #3330:
URL: https://github.com/apache/polaris/pull/3330#discussion_r2651545555


##########
client/python/apache_polaris/cli/constants.py:
##########
@@ -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 = (
+                "(Only for AWS S3) The AWS KMS key ARN to be used for encrypting new S3 data"

Review Comment:
   > Polaris does not use KMS keys directly.
   
   wouldn't we be needing this for encrypting / decrypting metadata.json ? 
   
   
   > additional keys are also allowed to be used because they might be required for dealing with old files
   
   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. 
   Do we vend creds for encryption and decryting for all key in our sts policy ? 
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@polaris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add KMS options to catalogs create CLI [polaris]

Posted by "singhpk234 (via GitHub)" <gi...@apache.org>.
singhpk234 merged PR #3330:
URL: https://github.com/apache/polaris/pull/3330


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@polaris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add KMS options to catalogs create CLI [polaris]

Posted by "dimas-b (via GitHub)" <gi...@apache.org>.
dimas-b commented on code in PR #3330:
URL: https://github.com/apache/polaris/pull/3330#discussion_r2651307057


##########
client/python/apache_polaris/cli/command/__init__.py:
##########
@@ -72,6 +72,8 @@ def options_get(key, f=lambda x: x):
                 sts_endpoint=options_get(Arguments.STS_ENDPOINT),
                 sts_unavailable=options_get(Arguments.STS_UNAVAILABLE),
                 path_style_access=options_get(Arguments.PATH_STYLE_ACCESS),
+                current_kms_key=options_get(Arguments.KMS_KEY_CURRENT),
+                allowed_kms_keys=options_get(Arguments.KMS_KEY_ALLOWED),

Review Comment:
   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.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@polaris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add KMS options to catalogs create CLI [polaris]

Posted by "dimas-b (via GitHub)" <gi...@apache.org>.
dimas-b commented on code in PR #3330:
URL: https://github.com/apache/polaris/pull/3330#discussion_r2651854813


##########
client/python/apache_polaris/cli/constants.py:
##########
@@ -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 = (
+                "(Only for AWS S3) The AWS KMS key ARN to be used for encrypting new S3 data"

Review Comment:
   > my question was why would Polaris vends creds for old kms keys for encrypting, [...]
   
   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.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@polaris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org