Repository navigation
sources/ldap: respect accountExpires attributes - #26135
Merged
dominic-r merged 14 commits intoOct 27, 2026
Merged
Conversation
✅ Deploy Preview for authentik-integrations ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for authentik-storybook ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for authentik-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
jsachs
force-pushed
the
feature/ldap-account-expires
branch
from
September 14, 2026 13:52
ded6662 to
ebc55c1
Compare
jsachs
marked this pull request as ready for review
September 15, 2026 13:17
dewi-tik
self-requested a review
September 15, 2026 13:50
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #26135 +/- ##
===========================================
+ Coverage 31.41% 92.42% +61.00%
===========================================
Files 1179 1194 +15
Lines 79312 81001 +1689
Branches 4497 4497
===========================================
+ Hits 24919 74864 +49945
+ Misses 54327 6071 -48256
Partials 66 66
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. |
BeryJu
reviewed
Sep 15, 2026
BeryJu
approved these changes
Sep 22, 2026
kensternberg-authentik
added a commit
that referenced
this pull request
Nov 5, 2026
* main: (89 commits) providers/scim: scope-aware adoption (#26174) sources/ldap: respect accountExpires attributes (#26135) web/flows: never let continuous login block the final redirect (#26269) website: document password hash import restrictions (#24235) core: restrict imported password hashers (#24234) core, web: update translations (#27148) server: retry requests on connections closed by a recycled worker (#27275) packages/django-postgres-cache, flows: count cache keys in the database (#25808) events: simplify execution of event rules/notifications (#26873) core: bump github.com/pires/go-proxyproto from 0.15.0 to 0.16.0 (#27260) core: bump goauthentik/platform-ssh from 26.04-ak-0.72.3 to 26.04-ak-0.72.4 in /tests/e2e (#27263) core: bump goauthentik/selenium from 155.0-ak-0.72.3 to 155.0-ak-0.72.4 in /tests/e2e (#27261) core: bump astral-sh/uv from 0.13.5 to 0.13.6 in /lifecycle/container (#27264) core: bump jsonpatch from 1.35 to 1.36 (#27269) outposts: refresh channel groups on hello (#27136) core: bump certifi from 2026.10.19 to 2026.10.23 (#27266) core: bump pluggy from 1.6.0 to v1.7.0 (#27238) core: bump markupsafe from 3.0.3 to v3.0.4 (#27225) core: bump httptools from 0.8.0 to v0.9.0 (#27219) core: bump iniconfig from 2.3.0 to v2.3.1 (#27221) ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Details
What does this PR change?
Adds support for Active Directory’s
accountExpiresattribute during LDAP user synchronization.is_activewhenuserAccountControlis available. Extending or clearing expiration allows reactivation when directory restrictions permit it.Why is this change needed?
authentik currently synchronizes AD disabled/locked status but does not account for account expiration. An expired AD account can therefore remain active in authentik.
A custom property mapping is not sufficient to address this reliably: the existing AD handler can overwrite the mapping’s
is_activeresult based on userAccountControl. AD’s timestamp encoding and “never expires” sentinels also require special handling.This change evaluates directory restrictions together so that expired accounts are consistently deactivated.
How was this tested?
Ran the LDAP source test suite, which includes new coverage.
Linked issues
Closes #22035
Checklist
make all)make docs)