Skip to content

mod_auth_digest: rewrite shared memory access, further cleanup, add pytest suite - #705

Closed
notroj wants to merge 10 commits into
apache:trunkfrom
notroj:mod_auth_digest-cleanup-p2
Closed

mod_auth_digest: rewrite shared memory access, further cleanup, add pytest suite#705
notroj wants to merge 10 commits into
apache:trunkfrom
notroj:mod_auth_digest-cleanup-p2

Conversation

@notroj

@notroj notroj commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

notroj added 3 commits August 13, 2026 13:30
Assisted-by: Claude Sonnet 5 <noreply@anthropic.com>
  nonce-count per-nonce, require it to increase (RFC 7616 3.4.3), and
  record it only for a fully verified request.

* test/modules/aaa/test_007_replay.py: Add replay tests.
* test/modules/aaa/test_003_nccheck.py, test/modules/aaa/conftest.py:
  Update for the new semantics.

Assisted-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
  in check_and_record_nonce, accepting a nonce iff it is newer than
  the last used, and re-challenging as stale when reused.

* test/modules/aaa/test_008_onetime_nccheck.py: Add tests for one-time
  nonces, alone and with AuthDigestNcCheck.

* test/modules/aaa/conftest.py: Add an AuthDigestNonceLifetime 0 plus
  AuthDigestNcCheck location.

Assisted-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
@notroj
notroj force-pushed the mod_auth_digest-cleanup-p2 branch from 0cc796d to 5b5a1a4 Compare August 13, 2026 14:13
notroj and others added 7 commits August 13, 2026 15:27
  parse_digest_header, returning the header status the caller stores
  in resp->auth_hdr_sts. (parse_digest_header): Rename to
  init_digest_request.

Assisted-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
  escape the client_lock critical section; look up and release per
  access rather than caching the pointer across the request.

Assisted-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
  when the client entry cannot be allocated, rather than sending a
  challenge with no opaque. Default the opaque to NULL to match what
  check_nonce() hashes when the client sends none.

Assisted-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
  of zero, which the counter hands out once it wraps: zero means "no
  client", so add_client() refuses it.

Assisted-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
  the count is accumulated in and the type of the client_list counters.
  (add_client): Log those counters with %lu, all being unsigned.

Assisted-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
  or APR_HAS_SHARED_MEMORY, rather than testing at runtime. configure
  already declines to build the module without them.

Assisted-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
@notroj
notroj force-pushed the mod_auth_digest-cleanup-p2 branch from 5b5a1a4 to 2606e43 Compare August 13, 2026 14:31
asf-gitbox-commits pushed a commit that referenced this pull request Aug 13, 2026
Assisted-by: Claude Sonnet 5 <noreply@anthropic.com>
GitHub: PR #705


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1937103 13f79535-47bb-0310-9956-ffa450edef68
asf-gitbox-commits pushed a commit that referenced this pull request Aug 13, 2026
  nonce-count per-nonce, require it to increase (RFC 7616 3.4.3), and
  record it only for a fully verified request.

* test/modules/aaa/test_007_replay.py: Add replay tests.
* test/modules/aaa/test_003_nccheck.py, test/modules/aaa/conftest.py:
  Update for the new semantics.

Assisted-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
GitHub: PR #705


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1937104 13f79535-47bb-0310-9956-ffa450edef68
asf-gitbox-commits pushed a commit that referenced this pull request Aug 13, 2026
  in check_and_record_nonce, accepting a nonce iff it is newer than
  the last used, and re-challenging as stale when reused.

* test/modules/aaa/test_008_onetime_nccheck.py: Add tests for one-time
  nonces, alone and with AuthDigestNcCheck.

* test/modules/aaa/conftest.py: Add an AuthDigestNonceLifetime 0 plus
  AuthDigestNcCheck location.

Assisted-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
GitHub: PR #705


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1937105 13f79535-47bb-0310-9956-ffa450edef68
asf-gitbox-commits pushed a commit that referenced this pull request Aug 13, 2026
  parse_digest_header, returning the header status the caller stores
  in resp->auth_hdr_sts. (parse_digest_header): Rename to
  init_digest_request.

Assisted-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
GitHub: PR #705


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1937106 13f79535-47bb-0310-9956-ffa450edef68
asf-gitbox-commits pushed a commit that referenced this pull request Aug 13, 2026
  escape the client_lock critical section; look up and release per
  access rather than caching the pointer across the request.

Assisted-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
GitHub: PR #705


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1937107 13f79535-47bb-0310-9956-ffa450edef68
asf-gitbox-commits pushed a commit that referenced this pull request Aug 13, 2026
  when the client entry cannot be allocated, rather than sending a
  challenge with no opaque. Default the opaque to NULL to match what
  check_nonce() hashes when the client sends none.

Assisted-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
GitHub: PR #705


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1937108 13f79535-47bb-0310-9956-ffa450edef68
asf-gitbox-commits pushed a commit that referenced this pull request Aug 13, 2026
  of zero, which the counter hands out once it wraps: zero means "no
  client", so add_client() refuses it.

Assisted-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
GitHub: PR #705


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1937109 13f79535-47bb-0310-9956-ffa450edef68
asf-gitbox-commits pushed a commit that referenced this pull request Aug 13, 2026
  the count is accumulated in and the type of the client_list counters.
  (add_client): Log those counters with %lu, all being unsigned.

Assisted-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
GitHub: PR #705


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1937110 13f79535-47bb-0310-9956-ffa450edef68
asf-gitbox-commits pushed a commit that referenced this pull request Aug 13, 2026
  or APR_HAS_SHARED_MEMORY, rather than testing at runtime. configure
  already declines to build the module without them.

Assisted-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
GitHub: PR #705


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1937111 13f79535-47bb-0310-9956-ffa450edef68
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.

1 participant