You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
UX-07: Swagger UI's token expires after 5 minutes; give cmapi-docs a longer access token #283
Swagger UI at /docs signs in through client cmapi-docs and does not renew the token. Realm cmapi issues access tokens for 5 minutes (accessTokenLifespan: 300, deploy/manifests/environments/crc/realm/10-realm-import.yaml:47; the chart's keycloak-realm.yaml:77). So 5 minutes after Authorize, every call answers:
The owner hit this on CRC on 2026-11-15: "why so many fast expiration time". The portal does not have the problem, because it renews before the 5 minutes end (docs/15, "Renewal").
What it must do
Keep the realm's 5 minutes for the portal and for automation: a bearer token cannot be revoked once issued.
Give client cmapi-docs alone a longer access token, through Keycloak's per-client attribute access.token.lifespan. Proposed: 1800 s (30 min), within its client.session.max.lifespan of 28800 (10-realm-import.yaml:284). Research the value against current guidance and record it.
Apply it in the plain realm import and the chart, and update docs/15's token table.
On the running CRC, apply it as a change to realm cmapi only. No other realm is touched.
Research mandate
Read the Keycloak 26 server administration guide on client-level token lifespans (Advanced settings, "Access Token Lifespan"). Confirm the attribute name for RHBK 26.6.7.
Read RFC 9700 (OAuth 2.0 Security BCP) on access-token lifetime, and RFC 9068.
Cite each with the date it was read.
How to prove it
The realm test: a token from cmapi-docs has exp - iat = 1800, and a token from cmapi-portal or cmapi-automation has 300. It fails on main and passes after.
On CRC: sign in through /docs, then call an endpoint after 6 minutes and get 200.
Activity