jenkinsci / jenkinsci/active-directory-plugin
[JENKINS-28858] More aggressive group membership caching
- Dominant language
- Java
- Stars
- 53
- Forks
- 115
- PR merge metrics
- No merged PRs in 30d
Description
In too many organizations, AD is too large and login takes too long. The bulk of this time is spent on looking up group memberships.
We should do more aggressive caching of the memberships to cut down this cost. In particular, we should cache the map from DN of group/user to its memberOf attributes.
We can have a long cache retention value (say 24hrs?) to improve the out of the box experience.
Where this hurts is when a group membership changes. Possible mitigations are:
- Let the user login immediately, but uses that loging credential in the background to recompute membership asynchronously. When the result is available, update the group list after the fact.
- Expose a method for Groovy script to purge the cache
- Have a system property to control the cache timeout
---
Originally reported by
kohsuke, imported from: More aggressive group membership caching
Raw content of original issue
In too many organizations, AD is too large and login takes too long. The bulk of this time is spent on looking up group memberships.
We should do more aggressive caching of the memberships to cut down this cost. In particular, we should cache the map from DN of group/user to its memberOf attributes.
We can have a long cache retention value (say 24hrs?) to improve the out of the box experience.
Where this hurts is when a group membership changes. Possible mitigations are:
- Let the user login immediately, but uses that loging credential in the background to recompute membership asynchronously. When the result is available, update the group list after the fact.
- Expose a method for Groovy script to purge the cache
- Have a system property to control the cache timeout
Contributor guide
Research direction
No files, tests, or entry points are named. Start by tracing the active-directory-plugin's group membership lookup and determine how DN-to-memberOf results could be cached. Define the retention and membership-change behavior, including the proposed 24-hour timeout and possible purge, asynchronous refresh, or system-property controls.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- authentication
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100