fix(auth): memory leaks

alb-provider: JWT verification block was wrapped in generic error
that turned 401 to 500 causing clients to retry the login

cimd: cimd clients are not registered in oidc_clients table
so inserting offline sessions for them violates the foreign key
constraint. dropping the fk.

offline: return access token even when refresh token issuing fails.
if the refresh token issue fails for some reason, it will return
500 which will then cause client to retry even it can get valid
access token without refresh token.

closes #33329
Signed-off-by: Hellgren Heikki <heikki.hellgren@op.fi>
This commit is contained in:
Hellgren Heikki
2026-03-17 09:13:39 +02:00
parent c08e4daf24
commit 634ededdc9
7 changed files with 170 additions and 37 deletions
+9
View File
@@ -0,0 +1,9 @@
---
'@backstage/plugin-auth-backend-module-aws-alb-provider': patch
'@backstage/plugin-auth-backend': patch
---
Fixed a foreign key constraint violation when issuing refresh tokens for CIMD clients, and
prevented a failed refresh token issuance from failing the entire token exchange.
Fixed AWS ALB auth provider incorrectly returning HTTP 500 instead of 401 for JWT validation failures,
which caused retry loops and memory pressure under load.