Skip to content

fix(tests): authenticate basic auth requests with the username - #3318

Open
dschmidt wants to merge 1 commit into
mainfrom
fix/e2e-basic-auth-username
Open

fix(tests): authenticate basic auth requests with the username#3318
dschmidt wants to merge 1 commit into
mainfrom
fix/e2e-basic-auth-username

Conversation

@dschmidt

@dschmidt dschmidt commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Running the e2e suite with BASIC_AUTH=true fails for every created user: the API setup steps get a 401 and the server logs could not authenticate with username and password user: Alice, got code: 6.

getAuthHeader builds the basic credential from user.id, but that is only the key the steps address a user by. The create-user step builds { id: 'Alice', username: 'Alice-<run prefix>' } and creates the account under username, which becomes onPremisesSamAccountName and ends up as the LDAP uid, the attribute basic auth logs in with (AUTH_BASIC_LDAP_LOGIN_ATTRIBUTES defaults to uid).

username is required on the User type and set everywhere users are built, so admin and the other dummy users are unaffected: their id and username are identical.

Draft because it has only been exercised against a local backend so far.

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-<run prefix>' } 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".
@dschmidt
dschmidt marked this pull request as ready for review September 7, 2026 05:52
@dschmidt dschmidt changed the title Authenticate basic auth requests with the username fix(tests): authenticate basic auth requests with the username Sep 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant