Skip to content

Commit 5ac4bda

Browse files
committed
refactor(redshift-property, ssl_insecure): use ssl_insecure rather than sslInsecure in internal code
1 parent ed67944 commit 5ac4bda

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

redshift_connector/iam_helper.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ def set_iam_properties(
247247
info.allow_db_user_override = allow_db_user_override
248248

249249
if ssl_insecure is not None:
250-
info.sslInsecure = ssl_insecure
250+
info.ssl_insecure = ssl_insecure
251251

252252
# Azure specified parameters
253253
info.client_id = client_id

redshift_connector/plugin/saml_credentials_provider.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def __init__(self: "SamlCredentialsProvider") -> None:
2525
self.idpPort: int = 443
2626
self.duration: typing.Optional[int] = None
2727
self.preferred_role: typing.Optional[str] = None
28-
self.sslInsecure: typing.Optional[bool] = None
28+
self.ssl_insecure: typing.Optional[bool] = None
2929
self.db_user: typing.Optional[str] = None
3030
self.db_groups: typing.List[str] = list()
3131
self.force_lowercase: typing.Optional[bool] = None
@@ -42,7 +42,7 @@ def add_parameter(self: "SamlCredentialsProvider", info: RedshiftProperty) -> No
4242
self.idpPort = info.idpPort
4343
self.duration = info.duration
4444
self.preferred_role = info.preferred_role
45-
self.sslInsecure = info.sslInsecure
45+
self.ssl_insecure = info.ssl_insecure
4646
self.db_user = info.db_user
4747
self.db_groups = info.db_groups
4848
self.force_lowercase = info.force_lowercase
@@ -51,7 +51,7 @@ def add_parameter(self: "SamlCredentialsProvider", info: RedshiftProperty) -> No
5151
self.principal = info.principal
5252

5353
def do_verify_ssl_cert(self: "SamlCredentialsProvider") -> bool:
54-
return not self.sslInsecure
54+
return not self.ssl_insecure
5555

5656
def get_credentials(self: "SamlCredentialsProvider") -> CredentialsHolder:
5757
key: str = self.get_cache_key()

redshift_connector/redshift_property.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class RedshiftProperty:
1616
# The Amazon Resource Name (ARN) of the SAML provider in IAM that describes the IdP.
1717
principal: typing.Optional[str] = None
1818
# This property indicates whether the IDP hosts server certificate should be verified.
19-
sslInsecure: bool = True
19+
ssl_insecure: bool = True
2020
# The Okta-provided unique ID associated with your Redshift application.
2121
app_id: typing.Optional[str] = None
2222
# The name of the Okta application that you use to authenticate the connection to Redshift.

test/unit/helpers/idp_helpers.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def make_redshift_property() -> RedshiftProperty:
1111
rp.idp_host = "8000"
1212
rp.duration = 100
1313
rp.preferred_role = "analyst"
14-
rp.sslInsecure = False
14+
rp.ssl_insecure = False
1515
rp.db_user = "primary"
1616
rp.db_groups = ["employees"]
1717
rp.force_lowercase = True

0 commit comments

Comments
 (0)