From c7349d55025bea256d18f5f46569790a5f64b20c Mon Sep 17 00:00:00 2001 From: Dmitri Bourlatchkov Date: Tue, 21 Oct 2025 19:23:43 -0400 Subject: [PATCH 1/2] Add --no-sts to CLI Following up on #2672, add new `--no-sts` option to CLI to allow configuring `stsUnavailable` in `AwsStorageConfigInfo` --- client/python/cli/command/__init__.py | 1 + client/python/cli/command/catalogs.py | 5 ++++- client/python/cli/constants.py | 4 ++++ client/python/cli/options/option_tree.py | 1 + 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/client/python/cli/command/__init__.py b/client/python/cli/command/__init__.py index 76cc0bca3d..4463649c29 100644 --- a/client/python/cli/command/__init__.py +++ b/client/python/cli/command/__init__.py @@ -69,6 +69,7 @@ def options_get(key, f=lambda x: x): endpoint=options_get(Arguments.ENDPOINT), endpoint_internal=options_get(Arguments.ENDPOINT_INTERNAL), sts_endpoint=options_get(Arguments.STS_ENDPOINT), + sts_unavailable=options_get(Arguments.STS_UNAVAILABLE), path_style_access=options_get(Arguments.PATH_STYLE_ACCESS), catalog_connection_type=options_get(Arguments.CATALOG_CONNECTION_TYPE), catalog_authentication_type=options_get(Arguments.CATALOG_AUTHENTICATION_TYPE), diff --git a/client/python/cli/command/catalogs.py b/client/python/cli/command/catalogs.py index 688064a611..3af2af608c 100644 --- a/client/python/cli/command/catalogs.py +++ b/client/python/cli/command/catalogs.py @@ -67,6 +67,7 @@ class CatalogsCommand(Command): endpoint: str endpoint_internal: str sts_endpoint: str + sts_unavailable: bool path_style_access: bool catalog_connection_type: str catalog_authentication_type: str @@ -131,7 +132,8 @@ def validate(self): f" {Argument.to_flag_name(Arguments.USER_ARN)}," f" {Argument.to_flag_name(Arguments.ENDPOINT)}," f" {Argument.to_flag_name(Arguments.ENDPOINT_INTERNAL)}," - f" {Argument.to_flag_name(Arguments.STS_ENDPOINT)}, and" + f" {Argument.to_flag_name(Arguments.STS_ENDPOINT)}," + f" {Argument.to_flag_name(Arguments.STS_UNAVAILABLE)}, and" f" {Argument.to_flag_name(Arguments.PATH_STYLE_ACCESS)}" ) elif self.storage_type == StorageType.AZURE.value: @@ -185,6 +187,7 @@ def _build_storage_config_info(self): endpoint=self.endpoint, endpoint_internal=self.endpoint_internal, sts_endpoint=self.sts_endpoint, + sts_unavailable=self.sts_unavailable, path_style_access=self.path_style_access, ) elif self.storage_type == StorageType.AZURE.value: diff --git a/client/python/cli/constants.py b/client/python/cli/constants.py index 756a47d159..b284a43f0d 100644 --- a/client/python/cli/constants.py +++ b/client/python/cli/constants.py @@ -176,6 +176,7 @@ class Arguments: ENDPOINT = "endpoint" ENDPOINT_INTERNAL = "endpoint_internal" STS_ENDPOINT = "sts_endpoint" + STS_UNAVAILABLE = "no_sts" PATH_STYLE_ACCESS = "path_style_access" CATALOG_CONNECTION_TYPE = "catalog_connection_type" CATALOG_AUTHENTICATION_TYPE = "catalog_authentication_type" @@ -251,6 +252,9 @@ class Create: STS_ENDPOINT = ( "(Only for S3) The STS endpoint to use when connecting to STS" ) + STS_UNAVAILABLE = ( + "(Only for S3) Indicates that STS is not available" + ) PATH_STYLE_ACCESS = "(Only for S3) Whether to use path-style-access for S3" TENANT_ID = "(Required for Azure) A tenant ID to use when connecting to Azure Storage" diff --git a/client/python/cli/options/option_tree.py b/client/python/cli/options/option_tree.py index 78f15b96e3..4ab221b14d 100644 --- a/client/python/cli/options/option_tree.py +++ b/client/python/cli/options/option_tree.py @@ -119,6 +119,7 @@ def get_tree() -> List[Option]: Argument(Arguments.ENDPOINT, str, Hints.Catalogs.Create.ENDPOINT), Argument(Arguments.ENDPOINT_INTERNAL, str, Hints.Catalogs.Create.ENDPOINT_INTERNAL), Argument(Arguments.STS_ENDPOINT, str, Hints.Catalogs.Create.STS_ENDPOINT), + Argument(Arguments.STS_UNAVAILABLE, bool, Hints.Catalogs.Create.STS_UNAVAILABLE), Argument(Arguments.PATH_STYLE_ACCESS, bool, Hints.Catalogs.Create.PATH_STYLE_ACCESS), Argument(Arguments.ALLOWED_LOCATION, str, Hints.Catalogs.Create.ALLOWED_LOCATION, allow_repeats=True), From 720a7aee1e488c714c73f7c221f6c17a8a73fda4 Mon Sep 17 00:00:00 2001 From: Dmitri Bourlatchkov Date: Wed, 22 Oct 2025 13:59:47 -0400 Subject: [PATCH 2/2] review: update help message --- client/python/cli/constants.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/python/cli/constants.py b/client/python/cli/constants.py index b284a43f0d..151dbee24e 100644 --- a/client/python/cli/constants.py +++ b/client/python/cli/constants.py @@ -253,7 +253,7 @@ class Create: "(Only for S3) The STS endpoint to use when connecting to STS" ) STS_UNAVAILABLE = ( - "(Only for S3) Indicates that STS is not available" + "(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"