Skip to content

core: add bulk session revocation#18564

Merged
dewi-tik merged 17 commits intogoauthentik:mainfrom
cdmx-in:revoke-user-sessions-ui
Jan 22, 2026
Merged

core: add bulk session revocation#18564
dewi-tik merged 17 commits intogoauthentik:mainfrom
cdmx-in:revoke-user-sessions-ui

Conversation

@cdmx-in
Copy link
Contributor

@cdmx-in cdmx-in commented Dec 3, 2025

Pull Request: Add Bulk Session Revocation Functionality for Admins

Details

This PR adds bulk session revocation functionality for Admins.
UserBulkRevokeSessionsForm added that allows administrators to revoke all active sessions for selected users, with a confirmation dialog to prevent accidental revocation.

Changes Made

  • Created new UserBulkRevokeSessionsForm.ts component for handling this bulk session revocation
  • Updated UserListPage.ts to integrate the new bulk action with the user list
  • Added user-friendly confirmation workflow
image image

Files Changed:

  • web/src/admin/users/UserBulkRevokeSessionsForm.ts (+207 lines)
  • web/src/admin/users/UserListPage.ts (+82/-38 lines)

@cdmx-in cdmx-in requested a review from a team as a code owner December 3, 2025 12:51
@netlify
Copy link

netlify bot commented Dec 3, 2025

Deploy Preview for authentik-docs ready!

Name Link
🔨 Latest commit c7e5516
🔍 Latest deploy log https://app.netlify.com/projects/authentik-docs/deploys/693fa59abf089700085af7eb
😎 Deploy Preview https://deploy-preview-18564--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.

@netlify
Copy link

netlify bot commented Dec 3, 2025

Deploy Preview for authentik-integrations ready!

Name Link
🔨 Latest commit c7e5516
🔍 Latest deploy log https://app.netlify.com/projects/authentik-integrations/deploys/693fa59aac55f700081a103d
😎 Deploy Preview https://deploy-preview-18564--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
Copy link

netlify bot commented Dec 3, 2025

Deploy Preview for authentik-storybook ready!

Name Link
🔨 Latest commit d25b2f6
🔍 Latest deploy log https://app.netlify.com/projects/authentik-storybook/deploys/69724d28dde52f0008553d71
😎 Deploy Preview https://deploy-preview-18564--authentik-storybook.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.

@cdmx-in cdmx-in changed the title feat: add bulk session revocation functionality for users feat: add bulk session revocation functionality for admins Dec 3, 2025
@codecov
Copy link

codecov bot commented Dec 3, 2025

Codecov Report

❌ Patch coverage is 83.33333% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 93.22%. Comparing base (226cf58) to head (d25b2f6).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
authentik/core/api/authenticated_sessions.py 83.33% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #18564      +/-   ##
==========================================
- Coverage   93.27%   93.22%   -0.06%     
==========================================
  Files         949      949              
  Lines       52172    52187      +15     
==========================================
- Hits        48664    48651      -13     
- Misses       3508     3536      +28     
Flag Coverage Δ
conformance 38.25% <83.33%> (+0.01%) ⬆️
e2e 44.09% <83.33%> (+0.01%) ⬆️
integration 23.14% <0.00%> (-0.06%) ⬇️
unit 91.49% <83.33%> (-0.01%) ⬇️
unit-migrate 91.53% <83.33%> (-0.01%) ⬇️

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

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

@rissson rissson changed the title feat: add bulk session revocation functionality for admins core: add bulk session revocation Dec 3, 2025
cdmx-in and others added 2 commits December 4, 2025 09:34
- Implemented BulkDeleteSessionSerializer for handling bulk session deletions.
- Added bulk_delete action to AuthenticatedSessionViewSet for revoking sessions by user IDs.
- Updated API schema to include new endpoint for bulk session deletion.
- Modified UserBulkRevokeSessionsForm to utilize the new bulk delete API.
@roney492 roney492 requested a review from a team as a code owner December 4, 2025 04:21
cdmx-in and others added 4 commits December 4, 2025 21:26
Co-authored-by: Marc 'risson' Schmitt <marc.schmitt@risson.space>
Signed-off-by: CodeMax IT Solutions Pvt. Ltd. <137166088+cdmx-in@users.noreply.github.com>
PassiveSerializer for BulkDeleteSessionSerializer

Co-authored-by: Marc 'risson' Schmitt <marc.schmitt@risson.space>
Signed-off-by: CodeMax IT Solutions Pvt. Ltd. <137166088+cdmx-in@users.noreply.github.com>
user_pks  instead of user_ids

Co-authored-by: Marc 'risson' Schmitt <marc.schmitt@risson.space>
Signed-off-by: CodeMax IT Solutions Pvt. Ltd. <137166088+cdmx-in@users.noreply.github.com>
@cdmx-in
Copy link
Contributor Author

cdmx-in commented Dec 4, 2025

@rissson, have made the requested changes, please review

Copy link
Member

@rissson rissson left a comment

Choose a reason for hiding this comment

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

Just a minor nit, otherwise the backend looks good to me!

@rissson rissson added area:frontend Features or issues related to the browser, TypeScript, Node.js, etc area:backend labels Dec 5, 2025
@rissson rissson self-assigned this Dec 5, 2025
@github-project-automation github-project-automation bot moved this from Todo to In Progress in authentik Core Dec 5, 2025
@rissson rissson moved this from In Progress to Needs review in authentik Core Dec 5, 2025
@rissson rissson removed the status in authentik Core Dec 5, 2025
@rissson rissson moved this to In Progress in authentik Core Dec 5, 2025
@rissson rissson added this to the Release 2026.2 milestone Dec 5, 2025
Co-authored-by: Marc 'risson' Schmitt <marc.schmitt@risson.space>
Signed-off-by: CodeMax IT Solutions Pvt. Ltd. <137166088+cdmx-in@users.noreply.github.com>
@cdmx-in
Copy link
Contributor Author

cdmx-in commented Dec 5, 2025

Just a minor nit, otherwise the backend looks good to me!

Done. :)

@cdmx-in
Copy link
Contributor Author

cdmx-in commented Dec 15, 2025

Requesting a review for this PR, Please review and merge

@rissson
Copy link
Member

rissson commented Dec 15, 2025

hello, we're in the middle of a release, we'll take a look at this afterwards. Thanks again for your contribution!

@rissson rissson moved this from In Progress to Needs review in authentik Core Dec 15, 2025
@rissson rissson self-requested a review December 15, 2025 12:41
Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space>
@github-project-automation github-project-automation bot moved this from Needs review to In Progress in authentik Core Jan 15, 2026
@rissson
Copy link
Member

rissson commented Jan 15, 2026

@cdmx-in apart from the web lint job failing, this should be good to go.

@dewi-tik dewi-tik merged commit d60806d into goauthentik:main Jan 22, 2026
98 of 99 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in authentik Core Jan 22, 2026
kensternberg-authentik added a commit that referenced this pull request Jan 31, 2026
* main: (115 commits)
  internal: fix incorrect metric calculation (#19701)
  core, web: update translations (#19684)
  core: bump goauthentik.io/api/v3 from 3.2026020.12 to 3.2026020.14 (#19686)
  lifecycle/aws: bump aws-cdk from 2.1101.0 to 2.1102.0 in /lifecycle/aws (#19687)
  core: bump goauthentik/selenium from 143.0-ak-0.35.3 to 144.0-ak-0.35.7 in /tests/e2e (#19688)
  core: bump msgraph-sdk from 1.52.0 to 1.53.0 (#19689)
  core: bump ruff from 0.14.13 to 0.14.14 (#19690)
  core: bump twilio from 9.9.1 to 9.10.0 (#19691)
  core: bump gunicorn from 23.0.0 to 24.0.0 (#19692)
  web: bump the bundler group across 1 directory with 3 updates (#19693)
  web: bump unist-util-visit from 5.0.0 to 5.1.0 in /web (#19694)
  web: bump globals from 17.0.0 to 17.1.0 in /web (#19695)
  ci: bump actions/checkout from 6.0.1 to 6.0.2 (#19696)
  web: Form Modal Independence: Part 1 (#19395)
  web/common: add dev middleware to show warnings for consecutive identical requests (#19671)
  web/admin: fix file upload not preserving extension for custom names with dots (#19548)
  web/admin: fix brand form sending "undefined" string for blank default application (#19658)
  providers/proxy: Fix incorrect comparison of redirect URL and CookieDomain (#15686)
  core: add bulk session revocation (#18564)
  website/docs: endpoint devices: add serial number note (#19677)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:backend area:frontend Features or issues related to the browser, TypeScript, Node.js, etc

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants