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..151dbee24e 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 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" 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),