fix(controlplane): surface token expiry instead of federated error for expired tokens
Merged
MI
4mo ago+70+70+01234567890123456789-0-0-0123456789
Summary
Attestation endpoints (attestation init/add/push/status/reset) support federated authentication. When an expired Chainloop token was presented to one of these endpoints, the JWT middleware fell through to the federated provider, whose response masked the real reason with an unrelated authorization error (e.g. failed to load issuer: authorization error: no issuers configured).
This change makes an expired token short-circuit and return the proper expiry error, so the CLI reports your authentication token has expired, please run "chainloop auth login" again, matching the behavior of non-attestation commands.
Fixes #3226
AI assistance
This contribution was assisted by Claude Code.
🤖 Posted by Maximus bot (Claude Code) on behalf of @migmartri