Account Lockdown
authentik: 2025.5.0+Enterprise
Account Lockdown is a security feature that allows administrators to quickly secure a user account during emergencies, such as suspected compromise or unauthorized access. Users can also lock down their own account if they believe it has been compromised.
What Account Lockdown does
When triggered, Account Lockdown performs the following actions (all configurable):
- Deactivates the user account: The user can no longer log in
- Sets an unusable password: Invalidates the user's password
- Terminates all active sessions: Immediately logs the user out of all devices and applications
- Revokes all tokens: Invalidates API, app password, recovery, verification, and OAuth2 tokens and grants
- Creates an audit event: Records the lockdown with the provided reason (can trigger notifications)
Account Lockdown cannot be triggered on the anonymous user or internal service accounts.
Prerequisites
- A Lockdown Flow must be configured on your Brand (System > Brands)
- The flow must contain an Account Lockdown Stage (Enterprise)
- For self-service lockdown, configure a Completion Flow on the stage
Use the packaged lockdown blueprint
authentik includes a packaged lockdown blueprint that creates a default lockdown flow (default-account-lockdown) and a self-service completion flow (default-account-lockdown-complete).
The blueprint creates:
| Order | Stage | Purpose |
|---|---|---|
| 0 | Prompt Stage | Warning message and reason input |
| 10 | Account Lockdown Stage | Executes lockdown actions |
| 20 | Prompt Stage (admin only) | Shows a confirmation message |
A separate completion flow (default-account-lockdown-complete) displays a message after self-service lockdowns.
Step 1. Download the blueprint
Download the lockdown blueprint by running:
wget https://goauthentik.io/blueprints/example/flow-default-account-lockdown.yaml
Alternatively, use this link to view and save the file.
Step 2. Import the blueprint file
- Log in to authentik as an administrator and open the authentik Admin interface.
- Navigate to Flows and Stages > Flows and click Import.
- Click Choose file, select
flow-default-account-lockdown.yaml, and then click Import.
Step 3. Set the lockdown flow on your brand
- Navigate to System > Brands.
- Edit your brand and set Lockdown flow to
default-account-lockdown.
Create a custom flow
- Navigate to Flows and Stages > Flows and create a flow with:
- Designation: Stage Configuration
- Authentication: Require authenticated user
- Add a Prompt Stage for warnings and reason collection
- Add an Account Lockdown Stage
- Optionally add an administrator-only completion Prompt Stage
- Set this flow as Lockdown flow on your Brand
For stage configuration details, see the Account Lockdown Stage documentation.
Trigger an Account Lockdown
From a User's detail page
- Navigate to Directory > Users and click on a user.
- Click Account Lockdown.
- Review the warning, enter a reason (recorded in the audit log), and click Continue.
- If your flow includes an administrator-only completion stage, it is shown after the lockdown completes.
Self-service Account Lockdown
Users can lock their own account from the User interface:
- Navigate to Settings.
- In the Account Lockdown section, click Lock my account.
- Enter a reason and click Continue.
After lockdown, the user is redirected to the configured completion page. They cannot log back in until an administrator restores access.
Configure the completion message
Since the user's session is deleted, the stage redirects to a separate unauthenticated flow:
- Create a flow with Authentication set to No authentication required
- Add a Prompt Stage with an alert field containing your message
- On your Account Lockdown Stage, set Completion flow to this flow
Configure notifications
Use Notification Rules to alert when lockdowns occur:
- Navigate to Customization > Policies and create an Event Matcher Policy
- Set Action to User Write
- Set Query to
action = "user_write" and context.action_id = "account_lockdown" - Navigate to Events > Notification Rules and create a rule
- Select a notification transport, such as
default-email-transport - Select a destination group, or enable Send notification to event user to notify the locked user
- Bind the Event Matcher Policy to the rule
Restore access after lockdown
- Navigate to Directory > Users and find the locked user (shown as inactive).
- Click Activate to re-enable the account.
- Use Set password or Create Recovery Link to set a new password.
- Advise the user to re-enroll MFA devices.
Troubleshooting
| Issue | Solution |
|---|---|
| "No lockdown flow configured" | Set a lockdown flow on your Brand (System > Brands) |
| Self-service shows login page | Configure a Completion flow on the stage with No authentication required |
| Warning message not showing | Ensure Initial value expression is enabled and field type is an alert type |