Skip to content

Update ca_last_update/crl_last_update on HTTP 304#524

Merged
corporate-gadfly merged 1 commit into
mainfrom
fix-ca-refresh-304
Jul 6, 2026
Merged

Update ca_last_update/crl_last_update on HTTP 304#524
corporate-gadfly merged 1 commit into
mainfrom
fix-ca-refresh-304

Conversation

@bastelfreak

Copy link
Copy Markdown
Contributor

A 304 Not Modified response confirms the local CA certificate or CRL is current, so the refresh-interval TTL should be reset. Previously ca_last_update (backed by ca.pem's mtime) never advanced past the initial download in steady state, so every agent run saw a stale mtime and re-issued the conditional GET regardless of ca_refresh_interval.

The CRL path had the same structural issue but was latent because CRL endpoints typically respond 200 often enough that save_crls bumps the mtime naturally. Fix it for symmetry.

Fixes #435

Short description

Checklist

I have:

A 304 Not Modified response confirms the local CA certificate or CRL
is current, so the refresh-interval TTL should be reset. Previously
ca_last_update (backed by ca.pem's mtime) never advanced past the
initial download in steady state, so every agent run saw a stale
mtime and re-issued the conditional GET regardless of
ca_refresh_interval.

The CRL path had the same structural issue but was latent because CRL
endpoints typically respond 200 often enough that save_crls bumps the
mtime naturally. Fix it for symmetry.

Fixes #435

Signed-off-by: SAY-5 <say.apm35@gmail.com>
@bastelfreak bastelfreak self-assigned this Jul 6, 2026
@bastelfreak bastelfreak added the bug Something isn't working label Jul 6, 2026
@bastelfreak

Copy link
Copy Markdown
Contributor Author

rebase of #440

@bastelfreak bastelfreak mentioned this pull request Jul 6, 2026
@corporate-gadfly corporate-gadfly merged commit 5d57558 into main Jul 6, 2026
21 checks passed
@corporate-gadfly corporate-gadfly deleted the fix-ca-refresh-304 branch July 6, 2026 19:27
@bastelfreak bastelfreak added the backport 8.x backports the merged PR to the 8.x branch label Jul 6, 2026
@OpenVoxProjectBot

Copy link
Copy Markdown
Contributor

Successfully created backport PR for 8.x:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport 8.x backports the merged PR to the 8.x branch bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: ca_refresh_interval is not respected — agent refreshes CA on every run when server responds 304

5 participants