sources/ldap: add just-in-time user sync#22467
Open
smirnovsten wants to merge 2 commits into
Open
Conversation
✅ Deploy Preview for authentik-storybook ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for authentik-integrations 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. |
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
The PR adds just-in-time user synchronization. When a user attempts to log in and no matching user exists, an LDAP query is made in an attempt to fetch said user. The user is stored locally if successfully fetched.
A new setting (Sync users just-in-time) has been added to the LDAP source to enable and disable this functionality. An additional setting (User just-in-time search filter) has also been added to give the admins some control over how the query is made.
The functionality is useful for authentik deployments that want to get users from very large LDAP systems, where doing a full sync is an expensive operation. Using this feature, users can be synced as they first log in, which results in much lower load.
The changes should be fully backwards-compatible. No new requirements are introduced. The documentation has also been updated.
The PR is loosely based on #10441.
closes #5764
closes #8080
Checklist
ak test authentik/)make lint-fix)If an API change has been made
make gen)If changes to the frontend have been made
make web)If applicable
make docs)