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

[Fix] Make overriding TLS verification optional #202

Merged
merged 2 commits into from
May 5, 2022

Conversation

aquamatthias
Copy link
Contributor

This PR allows overriding the TLS verification behavior.
It defaults to None and thus will have no effect if not explicitly defined.
If it is defined, it allows for enabling/disabling verification and defines a custom CA bundle file or directory as specified by the requests library.

Fixes #201

Verified

This commit was signed with the committer’s verified signature.
aquamatthias Matthias Veit
@codecov-commenter
Copy link

codecov-commenter commented May 5, 2022

Codecov Report

Merging #202 (9b9656b) into main (fd21695) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main     #202   +/-   ##
=======================================
  Coverage   99.86%   99.86%           
=======================================
  Files          26       26           
  Lines        3721     3722    +1     
=======================================
+ Hits         3716     3717    +1     
  Misses          5        5           
Impacted Files Coverage Δ
arango/client.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fd21695...9b9656b. Read the comment docs.

Copy link

@meln1k meln1k left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@aMahanna aMahanna left a comment

Choose a reason for hiding this comment

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

Hi @aquamatthias, can you introduce a test case that covers the situation where verify_override is set to a boolean or a string? For example you could have an ArangoClient instantiation with a verify_override value set to a boolean/string and a for session in client._sessions ... assertion under test_client_attributes to ensure that coverage is not lost

We also have to keep in mind that the parameter name change (verify_certificate ➡️verify_override) will warrant a major version increase, as it is not backwards compatible

Verified

This commit was signed with the committer’s verified signature.
aquamatthias Matthias Veit
@aquamatthias
Copy link
Contributor Author

@aMahanna added tests for this behavior. The PR that introduced the argument was already breaking.
My intuition for the parameter name: keeping verify_certificate makes it hard to understand the impact.
But I can also keep the name if you think it is better.

@aMahanna
Copy link
Member

aMahanna commented May 5, 2022

@aMahanna added tests for this behavior. The PR that introduced the argument was already breaking. My intuition for the parameter name: keeping verify_certificate makes it hard to understand the impact. But I can also keep the name if you think it is better.

Makes sense, verify_override is a more suitable name. We will move forward with a 8.0.0 release, and thank you for both the fix to #201 and the added test case 👍

@cw00dw0rd
Copy link
Contributor

Thank you!

@cw00dw0rd cw00dw0rd merged commit 252abe2 into arangodb:main May 5, 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.

Breaking change in TLS Handling in 7.3.3
5 participants