auth: JWKS cache refresh interval is hardcoded at 1 hour #8

Open
opened 2026-05-14 08:44:14 +00:00 by mathias · 0 comments
Owner

The JWKS refresh interval is hardcoded at 1 hour in jwt.go. If Dex rotates signing keys, gitea-mcp will reject valid JWTs issued with the new key for up to 60 minutes.

File: internal/auth/jwt.go:44

Suggestion:

  • Make configurable via JWKS_REFRESH_INTERVAL env var (e.g. 15m, 1h)
  • Default to current 1h to preserve existing behaviour
  • Log the configured value at startup
The JWKS refresh interval is hardcoded at 1 hour in `jwt.go`. If Dex rotates signing keys, gitea-mcp will reject valid JWTs issued with the new key for up to 60 minutes. **File:** `internal/auth/jwt.go:44` **Suggestion:** - Make configurable via `JWKS_REFRESH_INTERVAL` env var (e.g. `15m`, `1h`) - Default to current 1h to preserve existing behaviour - Log the configured value at startup
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mathias/gitea-mcp#8