fix(certs): load client certs into SSLContext for httpx #157
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related: #78
As far as I can tell, the
certkwarg1 on an httpx client isn't doing anything. It's deprecated now2, but I wasn't even seeing the expected warning messages. Regardless, when passing an SSLContext to theverifykwarg, it will be used when communicating with Jira.Confirmed that this works with my own Jira DC instance that uses certificate-based authentication.
Also, for good measure, added a config option to omit HTTP Authorization headers when using cert-based auth.
Footnotes
https://www.python-httpx.org/api/#asyncclient ↩
https://github.com/encode/httpx/blob/ae1b9f66238f75ced3ced5e4485408435de10768/httpx/_config.py#L59-L62 ↩