Test user login fails: keycloak-test-users.env has wrong usernames #249

Open
opened 2026-06-18 21:03:57 +00:00 by ldraney · 0 comments
Owner

Type

Bug

Lineage

Standalone — discovered during TestFlight onboarding session.

Repo

ldraney/landscaping-assistant

What Broke

Test user credentials in ~/secrets/landscaping-assistant/keycloak-test-users.env list short-form usernames (e.g. lucas-super-admin), but the actual Keycloak usernames are full email addresses (e.g. lucas-super-admin@test.landscaping.local). Login fails with "Invalid username or password."

Root cause: the landscaping realm has registrationEmailAsUsername = true, so when test users were created their email became their username. The secrets file was written with short-form names that don't exist in Keycloak.

Repro Steps

  1. Go to https://landscaping-assistant.app
  2. Click "Sign in"
  3. Enter username lucas-super-admin and password Test1234!
  4. Observe: "Invalid username or password."
  5. Enter username lucas-super-admin@test.landscaping.local with same password
  6. Observe: Login succeeds

Expected Behavior

Credentials documented in keycloak-test-users.env should work as-is without needing to know the @test.landscaping.local suffix.

Environment

  • Cluster/namespace: prod
  • Keycloak realm: landscaping (auth.palinks.app)
  • Affected users: all 5 test users (lucas-super-admin, lucas-admin, lucas-lead, lucas-crew, lucas-client)

Acceptance Criteria

  • All test users can log in using credentials from keycloak-test-users.env without modification
  • keycloak-test-users.env documents the correct usernames
  • No regression in production login flow
  • project-landscaping-assistant — project this affects
  • docs/keycloak-setup.md — documents test users with short-form names
### Type Bug ### Lineage Standalone — discovered during TestFlight onboarding session. ### Repo `ldraney/landscaping-assistant` ### What Broke Test user credentials in `~/secrets/landscaping-assistant/keycloak-test-users.env` list short-form usernames (e.g. `lucas-super-admin`), but the actual Keycloak usernames are full email addresses (e.g. `lucas-super-admin@test.landscaping.local`). Login fails with "Invalid username or password." Root cause: the landscaping realm has `registrationEmailAsUsername = true`, so when test users were created their email became their username. The secrets file was written with short-form names that don't exist in Keycloak. ### Repro Steps 1. Go to https://landscaping-assistant.app 2. Click "Sign in" 3. Enter username `lucas-super-admin` and password `Test1234!` 4. Observe: "Invalid username or password." 5. Enter username `lucas-super-admin@test.landscaping.local` with same password 6. Observe: Login succeeds ### Expected Behavior Credentials documented in `keycloak-test-users.env` should work as-is without needing to know the `@test.landscaping.local` suffix. ### Environment - Cluster/namespace: prod - Keycloak realm: landscaping (auth.palinks.app) - Affected users: all 5 test users (lucas-super-admin, lucas-admin, lucas-lead, lucas-crew, lucas-client) ### Acceptance Criteria - [ ] All test users can log in using credentials from keycloak-test-users.env without modification - [ ] keycloak-test-users.env documents the correct usernames - [ ] No regression in production login flow ### Related - `project-landscaping-assistant` — project this affects - `docs/keycloak-setup.md` — documents test users with short-form names
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ldraney/landscaping-assistant#249
No description provided.