-
Notifications
You must be signed in to change notification settings - Fork 449
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SSL with custom certfiles path #435
base: master
Are you sure you want to change the base?
Changes from all commits
6cf4bd4
c2fc660
c525596
46e7125
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -78,3 +78,13 @@ def test_share_config_between_pyspark_and_pyspark3(): | |
kpc = { 'username': 'U', 'password': 'P', 'base64_password': 'cGFzc3dvcmQ=', 'url': 'L', 'auth': AUTH_BASIC } | ||
overrides = { conf.kernel_python_credentials.__name__: kpc } | ||
assert_equals(conf.base64_kernel_python3_credentials(), conf.base64_kernel_python_credentials()) | ||
|
||
@with_setup(_setup) | ||
def test_custom_certfiles_path(): | ||
overrides = { } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There's no need for this test. |
||
conf.override_all(overrides) | ||
assert_equals(conf.custom_certfiles_path(), None) | ||
cert = "test.pem" | ||
overrides = { conf.custom_certfiles_path.__name__: cert } | ||
conf.override_all(overrides) | ||
assert_equals(conf.custom_certfiles_path(), cert) |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -232,3 +232,4 @@ def test_kerberos_auth_check_auth(): | |
client = ReliableHttpClient(endpoint, {}, retry_policy) | ||
assert_is_not_none(client._auth) | ||
assert isinstance(client._auth, HTTPKerberosAuth) | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Adding a test here to see that the verify parameter in the request is honoring the value of |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -164,6 +164,9 @@ def resource_limit_mitigation_suggestion(): | |
def ignore_ssl_errors(): | ||
return False | ||
|
||
@_with_override | ||
def custom_certfiles_path(): | ||
return None | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @aggFTW this is how we handle None value for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you did:
would it end up returning I think it would. Maybe try that out. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What do you think about not using There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The purpose of having an example_config.json in the repo is to have a place that lists all the configurable options for the library and show what the default values are, so this option would need to be there and match the python There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. with https://docs.python.org/3/library/json.html#encoders-and-decoders |
||
|
||
@_with_override | ||
def coerce_dataframe(): | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
conf.custom_certfiles_path
is not a method call. This needs to invoke the method to retrieve the value of the configuration. So it would change toconf.custom_certfiles_path()
. That's what I meant with my previous comment 😃There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So just put this method in line 37, like you had it before, but make sure to actually retrieve the value of the configuration. Does that make sense?