Skip to content

web: e2e tests for account lockdown - #24766

Merged
GirlBossRush merged 2 commits into
dominic/user-offboarding-e2efrom
dominic/account-lockdown-e2e
Sep 16, 2026
Merged

GirlBossRush merged 2 commits into
dominic/user-offboarding-e2efrom
dominic/account-lockdown-e2e

Conversation

@dominic-r

@dominic-r dominic-r commented Aug 4, 2026 •

Copy link
Copy Markdown
Member

Details

What does this PR change?

Adds web/test/browser/320-account-lockdown.test.ts, covering the enterprise account lockdown feature from both entry points:

  • An administrator locking another account from the user details page. The action only starts the lockdown flow, so the test follows the returned flow link and lets the stage execute in the flow executor.
  • A user locking their own account from the Security tab of user settings. This deletes their own session, so the stage hands them off to its configured completion flow.
  • The action being hidden for the administrator's own account on the user details page.

Each case proves the lockdown actually took effect rather than inferring it from the UI: the target signs in successfully beforehand, and afterwards the account reads inactive and its credentials are rejected.

Also adds web/test/blueprints/test-account-lockdown-flow.yaml. Nothing seeds a lockdown flow, and the feature is inert until a brand points at one, so the blueprint supplies the flow, the stage, and the binding — including self_service_completion_flow, without which the stage refuses to run a self-service lockdown because it deletes the caller's session. The suite drives only the brand field an operator actually configures.

Why is this change needed?

Account lockdown had no browser coverage.

How was this tested?

npx playwright test 320-account-lockdown against a local instance with a valid enterprise license: 3 tests green, stable across --repeat-each=2.

The beforeAll that points the brand at the lockdown flow is read-only once configured, so repeat runs don't race on the brand row — the describe is also serial for the same reason.

Linked issues

Closes #24764


Co-Authored-By: Claude Opus 5 [email protected]

🤖 Generated with Claude Code

@dominic-r
dominic-r requested a review from a team as a code owner August 4, 2026 18:09
@dominic-r dominic-r self-assigned this Aug 4, 2026
@netlify

netlify Bot commented Aug 4, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for authentik-integrations ready!

Name Link
🔨 Latest commit 06eeabf
🔍 Latest deploy log https://app.netlify.com/projects/authentik-integrations/deploys/6a723602071d9c00092d77aa
😎 Deploy Preview https://deploy-preview-24766--authentik-integrations.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Aug 4, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for authentik-docs ready!

Name Link
🔨 Latest commit 06eeabf
🔍 Latest deploy log https://app.netlify.com/projects/authentik-docs/deploys/6a7236024e30a1000780f17b
😎 Deploy Preview https://deploy-preview-24766--authentik-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@codecov

codecov Bot commented Aug 4, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.89%. Comparing base (238266f) to head (a6ec5d5).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@                      Coverage Diff                      @@
##           dominic/user-offboarding-e2e   #24766   +/-   ##
=============================================================
  Coverage                         91.89%   91.89%           
=============================================================
  Files                              1171     1171           
  Lines                             75653    75653           
  Branches                           4056     4056           
=============================================================
  Hits                              69522    69522           
  Misses                             6089     6089           
  Partials                             42       42           
Flag Coverage Δ
conformance 33.69% <ø> (ø)
e2e 38.36% <ø> (ø)
integration 30.41% <ø> (ø)
rust 42.89% <ø> (ø)
unit 93.45% <ø> (ø)
unit-migrate 93.48% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@github-actions

github-actions Bot commented Aug 4, 2026 •

Copy link
Copy Markdown
Contributor

authentik PR Installation instructions

Instructions for docker-compose

Add the following block to your .env file:

AUTHENTIK_IMAGE=ghcr.io/goauthentik/dev-server
AUTHENTIK_TAG=gh-a6ec5d5822b03a242328ab2dae262ad75d5d1549
AUTHENTIK_OUTPOSTS__CONTAINER_IMAGE_BASE=ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s

Afterwards, run the upgrade commands from the latest release notes.

Instructions for Kubernetes

Add the following block to your values.yml file:

authentik:
    outposts:
        container_image_base: ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s
global:
    image:
        repository: ghcr.io/goauthentik/dev-server
        tag: gh-a6ec5d5822b03a242328ab2dae262ad75d5d1549

Afterwards, run the upgrade commands from the latest release notes.

@dominic-r
dominic-r force-pushed the dominic/account-lockdown-e2e branch from fa7ef95 to 06eeabf Compare August 4, 2026 18:57
Copilot AI lite review requested due to automatic review settings August 4, 2026 18:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@dominic-r
dominic-r force-pushed the dominic/account-lockdown-e2e branch from 06eeabf to 083044c Compare September 13, 2026 01:23
@GirlBossRush
GirlBossRush force-pushed the dominic/account-lockdown-e2e branch from 083044c to 3bc8c26 Compare September 13, 2026 06:51
@dominic-r
dominic-r force-pushed the dominic/account-lockdown-e2e branch from 3bc8c26 to cc856c6 Compare September 14, 2026 16:07
@dominic-r dominic-r mentioned this pull request Sep 14, 2026
1 of 3 tasks
@dominic-r
dominic-r force-pushed the dominic/account-lockdown-e2e branch from cc856c6 to d7821c2 Compare September 14, 2026 16:20
dominic-r and others added 2 commits September 14, 2026 12:55
Adds web/test/browser/320-account-lockdown.test.ts, covering the enterprise
account lockdown feature from both entry points:

- An administrator locking another account from the user details page.
- A user locking their own account from the Security tab of user settings,
  which deletes their session and hands them to the stage's completion flow.
- The action being hidden for the administrator's own account.

Each case proves the lockdown took effect rather than inferring it: the
target signs in successfully beforehand, and afterwards the account reads
inactive and its credentials are rejected.

Nothing seeds a lockdown flow, and the feature is inert until a brand points
at one, so test/blueprints/test-account-lockdown-flow.yaml supplies the flow,
the stage, and the binding. The suite drives only the brand field an operator
actually configures, and that hook is read-only once set so repeat runs do
not race on the brand row.

Co-Authored-By: Claude Opus 5 <[email protected]>
Signed-off-by: Dominic R <[email protected]>
@dominic-r
dominic-r force-pushed the dominic/account-lockdown-e2e branch from d7821c2 to a6ec5d5 Compare September 14, 2026 16:55
@github-project-automation github-project-automation Bot moved this from Todo to In Progress in authentik Core Sep 16, 2026
@GirlBossRush
GirlBossRush merged commit ebb8d27 into main Sep 16, 2026
151 of 170 checks passed
@GirlBossRush
GirlBossRush deleted the dominic/account-lockdown-e2e branch September 16, 2026 15:20
@github-project-automation github-project-automation Bot moved this from In Progress to Done in authentik Core Sep 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

web: e2e coverage for account lockdown

3 participants