Skip to content

Commit d3c9427

Browse files
committed
chore: Removed BrowserIdcAuthPlugin
1 parent fb48132 commit d3c9427

File tree

13 files changed

+134
-465
lines changed

13 files changed

+134
-465
lines changed

README.rst

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -333,11 +333,6 @@ Connection Parameters
333333
+-----------------------------------+------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+----------+
334334
| iam_disable_cache | bool | This option specifies whether the IAM credentials are cached. By default the IAM credentials are cached. This improves performance when requests to the API gateway are throttled. | FALSE | No |
335335
+-----------------------------------+------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+----------+
336-
| idc_client_display_name | str | The client display name to be used in user consent in IdC browser auth. This is an optional value. The default value is "Amazon Redshift Python connector". | None | No |
337-
+-----------------------------------+------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+----------+
338-
| idc_region | str | The AWS region where IdC instance is located. It is required for the IdC browser auth plugin. | None | No |
339-
+-----------------------------------+------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+----------+
340-
| idc_response_timeout | int | The timeout value in seconds for the IdC browser auth plugin. This is an optional value. | 120 | No |
341336
+-----------------------------------+------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+----------+
342337
| identity_namespace | str | The identity namespace to be used for the IdC browser auth plugin and IdP token auth plugin. It is an optional value if there is only one IdC instance existing or if default identity namespace is set on the cluster - else it is required. | None | No |
343338
+-----------------------------------+------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+----------+
@@ -389,8 +384,6 @@ Connection Parameters
389384
+-----------------------------------+------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+----------+
390385
| sslmode | str | The security of the connection to Amazon Redshift. verify-ca and verify-full are supported. | verify_ca | No |
391386
+-----------------------------------+------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+----------+
392-
| start_url | str | The directory or start url for the AWS IdC access portal. It is required for the IdC browser auth plugin. | None | No |
393-
+-----------------------------------+------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+----------+
394387
| timeout | int | The number of seconds before the connection to the server will timeout. | None | No |
395388
+-----------------------------------+------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+----------+
396389
| token | str | The access token required for the IdP token auth plugin. | None | No |

redshift_connector/__init__.py

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@
5757
_logger: logging.Logger = logging.getLogger(__name__)
5858

5959
IDC_PLUGINS_LIST = (
60-
"redshift_connector.plugin.BrowserIdcAuthPlugin",
61-
"BrowserIdcAuthPlugin",
6260
"redshift_connector.plugin.IdpTokenAuthPlugin",
6361
"IdpTokenAuthPlugin",
6462
)
@@ -67,8 +65,6 @@
6765
"BrowserAzureOAuth2CredentialsProvider",
6866
"redshift_connector.plugin.BasicJwtCredentialsProvider",
6967
"BasicJwtCredentialsProvider",
70-
"redshift_connector.plugin.BrowserIdcAuthPlugin",
71-
"BrowserIdcAuthPlugin",
7268
"redshift_connector.plugin.IdpTokenAuthPlugin",
7369
"IdpTokenAuthPlugin",
7470
)
@@ -160,11 +156,7 @@ def connect(
160156
serverless_acct_id: typing.Optional[str] = None,
161157
serverless_work_group: typing.Optional[str] = None,
162158
group_federation: typing.Optional[bool] = None,
163-
start_url: typing.Optional[str] = None,
164-
idc_region: typing.Optional[str] = None,
165-
idc_response_timeout: typing.Optional[int] = None,
166159
identity_namespace: typing.Optional[str] = None,
167-
idc_client_display_name: typing.Optional[str] = None,
168160
token: typing.Optional[str] = None,
169161
token_type: typing.Optional[str] = None,
170162
) -> Connection:
@@ -270,16 +262,8 @@ def connect(
270262
The name of work group for serverless end point. Default value None.
271263
group_federation: Optional[bool]
272264
Use the IDP Groups in the Redshift. Default value False.
273-
start_url: Optional[str]
274-
The directory or start url for the AWS IdC access portal. Default value is None.
275-
idc_region: Optional[str]
276-
The AWS region where IdC instance is located. Default value is None.
277-
idc_response_timeout: Optional[int]
278-
The timeout value in seconds for the IdC browser auth. Default value is `120`.
279265
identity_namespace: Optional[str]
280266
The identity namespace to be used with IdC auth plugin. Default value is None.
281-
idc_client_display_name: Optional[str]
282-
The client display name to be used in user consent in IdC browser auth. Default value is `Amazon Redshift Python connector`.
283267
token: Optional[str]
284268
The access token to be used with IdC basic credentials provider plugin. Default value is None.
285269
token_type: Optional[str]
@@ -311,9 +295,6 @@ def connect(
311295
info.put("host", host)
312296
info.put("iam", iam)
313297
info.put("iam_disable_cache", iam_disable_cache)
314-
info.put("idc_client_display_name", idc_client_display_name)
315-
info.put("idc_region", idc_region)
316-
info.put("idc_response_timeout", idc_response_timeout)
317298
info.put("identity_namespace", identity_namespace)
318299
info.put("idp_host", idp_host)
319300
info.put("idp_response_timeout", idp_response_timeout)
@@ -340,7 +321,6 @@ def connect(
340321
info.put("serverless_work_group", serverless_work_group)
341322
info.put("session_token", session_token)
342323
info.put("source_address", source_address)
343-
info.put("start_url", start_url)
344324
info.put("ssl", ssl)
345325
info.put("ssl_insecure", ssl_insecure)
346326
info.put("sslmode", sslmode)
@@ -416,7 +396,6 @@ def connect(
416396
numeric_to_float=info.numeric_to_float,
417397
identity_namespace=info.identity_namespace,
418398
token_type=info.token_type,
419-
idc_client_display_name=info.idc_client_display_name,
420399
)
421400

422401

redshift_connector/core.py

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,6 @@ def __init__(
433433
numeric_to_float: bool = False,
434434
identity_namespace: typing.Optional[str] = None,
435435
token_type: typing.Optional[str] = None,
436-
idc_client_display_name: typing.Optional[str] = None,
437436
):
438437
"""
439438
Creates a :class:`Connection` to an Amazon Redshift cluster. For more information on establishing a connection to an Amazon Redshift cluster using `federated API access <https://aws.amazon.com/blogs/big-data/federated-api-access-to-amazon-redshift-using-an-amazon-redshift-connector-for-python/>`_ see our examples page.
@@ -482,8 +481,6 @@ def __init__(
482481
The identity namespace to be used with IdC auth plugin. Default value is None.
483482
token_type: Optional[str]
484483
The token type to be used for authentication using IdP Token auth plugin
485-
idc_client_display_name: Optional[str]
486-
The client display name to be used for user consent in IdC browser auth plugin.
487484
"""
488485
self.merge_socket_read = True
489486

@@ -564,13 +561,10 @@ def get_calling_module() -> str:
564561
redshift_native_auth = True
565562
init_params["idp_type"] = "AzureAD"
566563

567-
if credentials_provider.split(".")[-1] in (
568-
"IdpTokenAuthPlugin",
569-
"BrowserIdcAuthPlugin",
570-
):
564+
if credentials_provider.split(".")[-1] in ("IdpTokenAuthPlugin",):
571565
redshift_native_auth = True
572566
self.set_idc_plugins_params(
573-
init_params, credentials_provider, identity_namespace, token_type, idc_client_display_name
567+
init_params, credentials_provider, identity_namespace, token_type
574568
)
575569

576570
if redshift_native_auth and provider_name:
@@ -2560,18 +2554,12 @@ def set_idc_plugins_params(
25602554
credentials_provider: typing.Optional[str] = None,
25612555
identity_namespace: typing.Optional[str] = None,
25622556
token_type: typing.Optional[str] = None,
2563-
idc_client_display_name: typing.Optional[str] = None,
25642557
) -> None:
25652558
plugin_name = typing.cast(str, credentials_provider).split(".")[-1]
25662559
init_params["idp_type"] = "AwsIdc"
25672560

25682561
if identity_namespace:
25692562
init_params["identity_namespace"] = identity_namespace
25702563

2571-
if plugin_name == "BrowserIdcAuthPlugin":
2572-
init_params["token_type"] = "ACCESS_TOKEN"
2573-
elif token_type:
2564+
if token_type:
25742565
init_params["token_type"] = token_type
2575-
2576-
if idc_client_display_name:
2577-
init_params["idc_client_display_name"] = idc_client_display_name

redshift_connector/plugin/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
from .browser_azure_oauth2_credentials_provider import (
55
BrowserAzureOAuth2CredentialsProvider,
66
)
7-
from .browser_idc_auth_plugin import BrowserIdcAuthPlugin
87
from .browser_saml_credentials_provider import BrowserSamlCredentialsProvider
98
from .common_credentials_provider import CommonCredentialsProvider
109
from .idp_credentials_provider import IdpCredentialsProvider

0 commit comments

Comments
 (0)