[
https://issues.apache.org/jira/browse/KARAF-7671?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18013519#comment-18013519
]
ASF GitHub Bot commented on KARAF-7671:
---------------------------------------
globalbus commented on PR #1945:
URL: https://github.com/apache/karaf/pull/1945#issuecomment-3180915212
@mattrpav
I also modified LDAPCache behaviour on my own.
I'm only clearing cache pool on Activator stop, not on start.
The problem is to evict cache. When I used ApacheDS, it support event
protocol to launch ObjectChangeListener (that has own drawbacks, like it's need
a connection without read timeout). OpenLDAP does not provide support for this.
I finished with custom webhook to clear cache (propagated by JMS to all
nodes). But cache can be cleared for all users, not only for changed one, so
it's suboptimal.
Anyway, LDAPCache "static" field with caches is a pain in ass. Only way to
extend functionality is to copy/paste/fork code. But I don't have better idea
for it at the moment. Maybe we could put an instance to
javax.security.auth.login.AppConfigurationEntry.options and fetch it from
there, instead of static methods? I'm not tried this approach yet.
> LDAP login module cache fixes
> -----------------------------
>
> Key: KARAF-7671
> URL: https://issues.apache.org/jira/browse/KARAF-7671
> Project: Karaf
> Issue Type: Task
> Affects Versions: 4.4.3
> Reporter: Matt Pavlovich
> Assignee: Jean-Baptiste Onofré
> Priority: Major
> Fix For: 4.5.0, 4.4.9
>
>
> 1. Cache is cleared on every login via the initialize method
> 2. LDAPLoginModule needs thread synchronization fixes to not rely on
> method-sync and class-level static cache field.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)