Skip to content
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

add option to verify certs for http requests #16

Merged
merged 2 commits into from
Apr 14, 2022
Merged

Conversation

andrewdanks
Copy link

No description provided.

"""

def init_poolmanager(self, *args, **kwargs):
super(BobaPKIHTTPAdapter, self).init_poolmanager(assert_hostname=False, *args, **kwargs)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI this will break if this is called with assert_hostname=<asd> - do you want to pop it out of kwargs?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this what our ATT code is doing so it's prolly fine but yeah I can pop it out too

cert_verify = os.environ.get('BOBAPKI_CACERT_VERIFY', None)
if cert_verify is not None:
session.mount('https://', BobaPKIHTTPAdapter())
session.verify = cert_verify
Copy link

@avenkatraman avenkatraman Apr 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this supposed to be a bool? a string with true/false? if it's false then the if check will return true still.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it can be a string or boolean; but yeah we are passing a string here which is a path to the cert file

@@ -54,7 +54,7 @@ def get_static_files(path):

setup(
name='luigi',
version='2.7.5.affirm.1.4.0',
version='2.7.5+affirm.1.4.2',

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.2 instead of .1?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah I messed up and accidentally created this pypi package already :(

@andrewdanks andrewdanks merged commit 03e58a1 into 2.7.5-affirm Apr 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants