#1424 Searching certs using /ca/ee/ca/listCerts interface with criteria as "VALID" results in revoked certs also to be displayed
Closed: Invalid Opened by mharmsen.

When searching certs using interface /ca/ee/ca/listCerts . with criteria
"VALID" to return valid certs , returns REVOKED Certs also.

curl --basic --dump-header /tmp/tmp.Y8Ie8yqFBH/admin_out -d "op=listCerts&query
CertFilter=(certStatus=VALID)&serialFrom=0&serialTo=300&skipNonValid=on&querySe
ntinelDown=0&querySentinelUp=0&direction=down&maxCount=1000" -k
https://blade01.idm.lab.eng.rdu2.redhat.com:30042/ca/ee/ca/listCerts

Steps to Reproduce:

1.Setup CA
2.Enroll few certs
3.Using curl list certs with Filter certStatus=VALID,

Actual results:

Results show both VALID And REVOKED certs

Expected results:

Should show only VALID certs

Additional info:

CA Debug logs show query filter was passed properly
[17/Jun/2015:21:23:25][http-bio-30042-exec-5]: CMSServlet:service() uri =
/ca/ee/ca/listCerts
[17/Jun/2015:21:23:25][http-bio-30042-exec-5]: CMSServlet::service() param
name='op' value='listCerts'
[17/Jun/2015:21:23:25][http-bio-30042-exec-5]: CMSServlet::service() param
name='queryCertFilter' value='(certStatus=VALID)'
[17/Jun/2015:21:23:25][http-bio-30042-exec-5]: CMSServlet::service() param
name='serialFrom' value='0'
[17/Jun/2015:21:23:25][http-bio-30042-exec-5]: CMSServlet::service() param
name='serialTo' value='300'
[17/Jun/2015:21:23:25][http-bio-30042-exec-5]: CMSServlet::service() param
name='skipNonValid' value='on'
[17/Jun/2015:21:23:25][http-bio-30042-exec-5]: CMSServlet::service() param
name='querySentinelDown' value='0'
[17/Jun/2015:21:23:25][http-bio-30042-exec-5]: CMSServlet::service() param
name='querySentinelUp' value='0'
[17/Jun/2015:21:23:25][http-bio-30042-exec-5]: CMSServlet::service() param
name='direction' value='down'
[17/Jun/2015:21:23:25][http-bio-30042-exec-5]: CMSServlet::service() param
name='maxCount' value='1000'
[17/Jun/2015:21:23:25][http-bio-30042-exec-5]: CMSServlet: caListCerts start to
service.
[17/Jun/2015:21:23:25][http-bio-30042-exec-5]: IP: 192.168.122.133
Providing the output of the curl output.

This is actually the correct behavior. By default the useClientFilter in web.xml is not set, so the queryCertFilter parameter will be ignored. To return valid certificates only the query should use skipRevoked=on instead.

Metadata Update from @mharmsen:
- Issue assigned to edewata
- Issue set to the milestone: 10.2.5

Dogtag PKI is moving from Pagure issues to GitHub issues. This means that existing or new
issues will be reported and tracked through Dogtag PKI's GitHub Issue tracker.

This issue has been cloned to GitHub and is available here:
https://github.com/dogtagpki/pki/issues/1984

If you want to receive further updates on the issue, please navigate to the
GitHub issue and click on Subscribe button.

Thank you for understanding, and we apologize for any inconvenience.

Metadata