feat: support "auth-int" quality-of-protection when using DigestAuth #3727
+179
−14
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.
Summary
Adding support for "auth-int" (message integrity authentication) quality-of-protection implementation, as specified in RFC-7616.. Additionally, updates unit tests to reflect support for the "auth-int" QoP.
Note on "example" scenario from RFC-7616
I had to change the expected response hashes from the official ones stated in the RFC-7616 Section 3.9.1 example since they don't provide an example where the client chooses to use "auth-int" QoP.
That being said, I was able to check the correctness of my implementation against
httpbinusing the/digest-auth/auth-int/Mufasa/CircleofLife/[MD5|SHA-256]endpoints to verify that a proper 200 status code is returned, meaning the httpbin server implementation of "auth-int" authentication agrees with the implementation added to this feature branch. Httpbin appears to support "http" requests to this endpoint, but doesn't properly support "https" requests (unexpected EoF encountered).Integration test with HTTPBin
Checklist
GH Actions test failures
GH Actions seem to be failing non-deterministically for the
test_proxies.pymodule (no changes from this PR), particularly due to timeouts when talking toexample.com. I encourage a project maintainer to try re-running the checks for this PR during their review to demonstrate the non-deterministic behavior (take note of which python versions fail each time, if any).Is there a default timeout being used for the tests which we can make more permissive?