mod_auth_digest: keep Authentication-Info on error responses - #739
Closed
notroj wants to merge 4 commits into
Closed
mod_auth_digest: keep Authentication-Info on error responses#739notroj wants to merge 4 commits into
notroj wants to merge 4 commits into
Conversation
* modules/aaa/mod_auth_digest.c (add_auth_info): Add the (Proxy-)Authentication-Info header to err_headers_out, so a one-time nonce client gets its nextnonce after an error response rather than a stale re-challenge. (note_digest_auth_failure): Drop any (Proxy-)Authentication-Info when issuing a challenge, so a post-authentication 401 carries only the fresh nonce. * changes-entries/digest-authinfo-errors.txt: New. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* test/modules/aaa/test_011_authinfo_errors.py: Authentication-Info survives an error response. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
date with the module. Document one-time nonces (AuthDigestNonceLifetime 0); reduce AuthDigestQop to auth and AuthDigestAlgorithm to MD5, noting what was removed; state that shared memory is required; and rework the summary and security note to separate authentication from confidentiality and integrity. [skip ci] Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
the visible effect, not the code. [skip ci] Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
asf-gitbox-commits
pushed a commit
that referenced
this pull request
Sep 4, 2026
date with the module. Document one-time nonces (AuthDigestNonceLifetime 0); reduce AuthDigestQop to auth and AuthDigestAlgorithm to MD5, noting what was removed; state that shared memory is required; and rework the summary and security note to separate authentication from confidentiality and integrity. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> GitHub: PR #739 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1937887 13f79535-47bb-0310-9956-ffa450edef68
asf-gitbox-commits
pushed a commit
that referenced
this pull request
Sep 4, 2026
* modules/aaa/mod_auth_digest.c (add_auth_info): Add the (Proxy-)Authentication-Info header to err_headers_out, so a one-time nonce client gets its nextnonce after an error response rather than a stale re-challenge. (note_digest_auth_failure): Drop any (Proxy-)Authentication-Info when issuing a challenge, so a post-authentication 401 carries only the fresh nonce. * test/modules/aaa/test_011_authinfo_errors.py: New tests. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> GitHub: closes PR #739 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1937888 13f79535-47bb-0310-9956-ffa450edef68
notroj
added a commit
to notroj/httpd
that referenced
this pull request
Sep 5, 2026
* modules/aaa/mod_auth_digest.c (add_auth_info): Add the (Proxy-)Authentication-Info header to err_headers_out, so a one-time nonce client gets its nextnonce after an error response rather than a stale re-challenge. (note_digest_auth_failure): Drop any (Proxy-)Authentication-Info when issuing a challenge, so a post-authentication 401 carries only the fresh nonce. * test/modules/aaa/test_011_authinfo_errors.py: New tests. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> GitHub: closes PR apache#739 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1937888 13f79535-47bb-0310-9956-ffa450edef68
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
mod_auth_digest adds the Authentication-Info response header in a fixups hook, into r->headers_out, which is dropped when the response turns into an error, so error responses carried no Authentication-Info.
Under one-time nonces (AuthDigestNonceLifetime 0) that header's nextnonce is how the client continues, so an error cost the client its nextnonce and forced a stale re-challenge on the next request. This adds the header to err_headers_out so it survives an error response, and drops any Authentication-Info when a challenge is issued so a 401 raised after authentication carries only the fresh nonce. Interop-tested against litmus over a Digest-protected DAV area: 57 stale re-challenges before the change, none after.
🤖 Generated with Claude Code