Issue 7934 - wrong search behavior in accesslog entries
Summary: wrong search behavior in accesslog entries
Status: VERIFIED FIXED
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: slapd (show other issues)
Version: 2.4.39
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-08 13:41 UTC by alexoz66@gmail.com
Modified: 2014-10-23 07:34 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description alexoz66@gmail.com 2014-09-08 13:41:46 UTC
Full_Name: John Alex.
Version: 2.4.39
OS: FreeBSD 9.2
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (37.6.134.63)


Values of reqAttr in accesslog entries are not searchable the normal way if they
contain at least an uppercase character.

Even though the reqAttr attribute has a caseIgnoreMatch search rule, the only
way to search for values containing uppercase characters is to explicitly use a
caseExactMatch rule.

Consider this accesslog entry for example: 

dn: reqStart=20140905054555.000001Z,cn=accesslog
objectClass: auditSearch
reqAttr: givenName
reqAttrsOnly: FALSE
reqAuthzID: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth
reqDerefAliases: never
reqDN: dc=example,dc=com
reqEnd: 20140905054555.000002Z
reqEntries: 9
reqFilter: (objectClass=*)
reqResult: 0
reqScope: sub
reqSession: 1268
reqSizeLimit: 500
reqStart: 20140905054555.000001Z
reqTimeLimit: 3600
reqType: search


Searching with "(reqAttr=givenName)" will not return results, while using
"(reqAttr:caseExactMatch:=givenName)" will return the above entry. Accesslog
entries where values of reqAttr contain only lowercase characters are returned
correctly with the "(reqAttr=givenName)" filter.

The same behavior can be observed with reqFilter (and probably other attributes
as well but I didn't test).

This applies to entries added to the db by the accesslog overlay and not to
entries otherwise inserted.
Comment 1 Howard Chu 2014-09-08 13:58:54 UTC
alexoz66@gmail.com wrote:
> Full_Name: John Alex.
> Version: 2.4.39
> OS: FreeBSD 9.2
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (37.6.134.63)
>
>
> Values of reqAttr in accesslog entries are not searchable the normal way if they
> contain at least an uppercase character.

Thanks for the report, fixed in git master
>
> Even though the reqAttr attribute has a caseIgnoreMatch search rule, the only
> way to search for values containing uppercase characters is to explicitly use a
> caseExactMatch rule.
>
> Consider this accesslog entry for example:
>
> dn: reqStart=20140905054555.000001Z,cn=accesslog
> objectClass: auditSearch
> reqAttr: givenName
> reqAttrsOnly: FALSE
> reqAuthzID: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth
> reqDerefAliases: never
> reqDN: dc=example,dc=com
> reqEnd: 20140905054555.000002Z
> reqEntries: 9
> reqFilter: (objectClass=*)
> reqResult: 0
> reqScope: sub
> reqSession: 1268
> reqSizeLimit: 500
> reqStart: 20140905054555.000001Z
> reqTimeLimit: 3600
> reqType: search
>
>
> Searching with "(reqAttr=givenName)" will not return results, while using
> "(reqAttr:caseExactMatch:=givenName)" will return the above entry. Accesslog
> entries where values of reqAttr contain only lowercase characters are returned
> correctly with the "(reqAttr=givenName)" filter.
>
> The same behavior can be observed with reqFilter (and probably other attributes
> as well but I didn't test).
>
> This applies to entries added to the db by the accesslog overlay and not to
> entries otherwise inserted.
>
>


-- 
   -- Howard Chu
   CTO, Symas Corp.           http://www.symas.com
   Director, Highland Sun     http://highlandsun.com/hyc/
   Chief Architect, OpenLDAP  http://www.openldap.org/project/

Comment 2 Howard Chu 2014-09-08 14:00:28 UTC
changed notes
changed state Open to Test
moved from Incoming to Software Bugs
Comment 3 Quanah Gibson-Mount 2014-09-08 16:43:14 UTC
changed notes
changed state Test to Release
Comment 4 OpenLDAP project 2014-10-23 07:34:29 UTC
fixed in master
fixed in RE25
fixed in RE24
Comment 5 Quanah Gibson-Mount 2014-10-23 07:34:29 UTC
changed notes
changed state Release to Closed