From 65b4f514adc4cece7cd3149e6bdda73988051792 Mon Sep 17 00:00:00 2001 From: Dominik Schmidt Date: Mon, 7 Sep 2026 07:48:45 +0200 Subject: [PATCH] fix(e2e): authenticate basic auth requests with the username The user object carries the account name in username, id is only the key the steps address it by: the create-user step builds it as { id: 'Alice', username: 'Alice-' } and creates the account under username. Basic auth sent id, so every request as a created user got a 401 and the server logged "user: Alice, got code: 6". --- tests/e2e/support/api/http.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/e2e/support/api/http.ts b/tests/e2e/support/api/http.ts index 955b0ee7e4f..6755654ca33 100644 --- a/tests/e2e/support/api/http.ts +++ b/tests/e2e/support/api/http.ts @@ -7,7 +7,7 @@ import { TokenEnvironmentFactory } from '../environment' export const getAuthHeader = (user: User, isKeycloakRequest: boolean = false) => { const tokenEnvironment = TokenEnvironmentFactory(isKeycloakRequest ? 'keycloak' : null) const authHeader = { - Authorization: 'Basic ' + Buffer.from(user.id + ':' + user.password).toString('base64') + Authorization: 'Basic ' + Buffer.from(user.username + ':' + user.password).toString('base64') } if (!appConfig.basicAuth) {