mrhid6 225b53bfa7 fix: Throttle audit logging for expired API token use
Every request presenting an expired token wrote a token.expired_use
audit row, and RateLimitTokens only applies once a session exists, so a
rejected token was never rate-limited. A looping job with one expired
token could write an unbounded number of audit rows, drowning the real
audit trail.

services.ShouldLogExpiredTokenUse now dedupes to at most one
token.expired_use record per token per minute, mirroring the throttle
TouchAPIToken already uses for last-used. It lives in services rather
than auth because the storage concern belongs beside the token's other
storage-backed state. The first use per window is still recorded, which
is what makes a forgotten job visible.
2026-08-13 08:31:12 +00:00
2026-08-07 10:21:00 +01:00
2026-07-24 09:51:30 +01:00
2026-07-28 15:07:19 +01:00
2026-08-12 14:58:57 +00:00
2026-07-29 10:35:07 +01:00
2026-08-11 15:03:03 +00:00
2026-07-26 14:46:38 +01:00
2026-07-28 10:30:29 +01:00
S
Description
No description provided
14 MiB
agent/v1.3.4
Latest
2026-09-07 15:50:25 +00:00
Languages
JavaScript 71.9%
TypeScript 15.1%
Go 12.8%