Bug 1458837

Summary: Ldap, entry for non existing user are cached.
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Jiri Ondrusek <jondruse>
Component: Domain ManagementAssignee: Jiri Ondrusek <jondruse>
Status: CLOSED EOL QA Contact: Martin Simka <msimka>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.4.15CC: brian.stansberry, dandread
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-08-19 12:44:18 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jiri Ondrusek 2017-06-05 15:11:42 UTC
Description of problem:
Even if cached entry should be used, new search is executed. See steps to reproduce.



Steps to Reproduce:
1 - configure security realm to use cache with eviction by size strategy
            
<security-realm name="authn-by-search-time-3-1">
                <authentication>
                    <ldap connection="ldap-connection" base-dn="ou=People,dc=jboss,dc=org" recursive="true">
                        <cache eviction-time="30" max-cache-size="1" cache-failures="false"/>
                        <username-filter attribute="uid"/>
                    </ldap>
                </authentication>
            </security-realm>

2 - configure http interface to be secured by this realm
            <http-interface security-realm="authn-by-search-time-3-1">
                <http-upgrade enabled="true"/>
                <socket-binding http="management-http"/>
            </http-interface>
access http://localhost:9990/console with existing user e.g. "jduke"
access http://localhost:9990/console with non existing user e.g. "test"
In log there is message "Entry with key 'jduke' evicted from cache due to cache being above maximum size." When you access http://localhost:9990/console again with "jduke", then Wireshark shows that LDAP call occured.

Actual results:


Expected results:
'jduke' should be found in cache.


Additional info: