fix(backend): Keycloak-Admin-Token laeuft ab - FFP-SYNC-001 bei Leerlauf #82
Labels
No labels
component/backend
component/docs
component/e2e
component/frontend
component/infra
component/keycloak
prio/high
prio/low
prio/medium
type/bug
type/chore
type/feature
type/refactor
type/test
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
WompSchmiede/FamilienFeierPlaner#82
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Der Admin-Token in kcApi (keycloak-admin.ts) wird einmal beim Backend-Start geholt und unbegrenzt gecached (let adminToken). Nach Ablauf der Keycloak-Token-Lifetime (Default 1-5 Minuten) schlaegt jeder Admin-API-Call mit 401 fehl, was zu FFP-SYNC-001 und HTTP 502 fuehrt.
Schnellfix (wird sofort umgesetzt)
401-Retry in kcApi: Bei 401-Response wird adminToken invalidiert, ein neuer Token per Password-Grant geholt und der Request einmal wiederholt.
Produktionsfix (fuer spaeter)
Statt Password-Grant (grant_type=password mit Admin-User/Passwort) auf Client-Credentials-Grant umstellen:
Umgebung