Skip to content

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

Merged
dschmidt merged 1 commit into
mainfrom
fix/e2e-basic-auth-username
Oct 8, 2026
Merged

dschmidt merged 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.

@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
@kulmann
kulmann marked this pull request as draft September 10, 2026 08:32
@dschmidt
dschmidt requested a review from v-scharf September 27, 2026 07:01
@dschmidt
dschmidt marked this pull request as ready for review September 27, 2026 07:01
@dschmidt
dschmidt marked this pull request as draft September 27, 2026 07:01
@dschmidt

Copy link
Copy Markdown
Contributor Author

@kulmann why did you mark this as draft?

@v-scharf

Copy link
Copy Markdown
Contributor

@kulmann why did you mark this as draft?

probably due this one. in description:

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

but I think we can merge it

@dschmidt

Copy link
Copy Markdown
Contributor Author

@kulmann can you undraft and merge?

@dschmidt
dschmidt marked this pull request as ready for review October 8, 2026 07:00
@dschmidt
dschmidt marked this pull request as draft October 8, 2026 07:00
@kulmann
kulmann marked this pull request as ready for review October 8, 2026 07:04
@dschmidt
dschmidt force-pushed the fix/e2e-basic-auth-username branch from 65b4f51 to da29189 Compare October 8, 2026 07:11
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".
@kulmann

kulmann commented Oct 8, 2026

Copy link
Copy Markdown
Member

Sorry, I didn't follow the conversation here. Yes, I marked it as draft because the description mentioned it. I didn't want to block the PR. Sorry for the confusion 馃檲

@dschmidt

dschmidt commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor Author

Updated description :)

@dschmidt
dschmidt enabled auto-merge October 8, 2026 07:19
@dschmidt
dschmidt merged commit 231f1ab into main Oct 8, 2026
31 checks passed
@dschmidt
dschmidt deleted the fix/e2e-basic-auth-username branch October 8, 2026 07:45
@openclouders openclouders mentioned this pull request Oct 8, 2026
1 task
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.

3 participants