Bug 499842 - Revoking an unknown serial numbers does not return useful error
Revoking an unknown serial numbers does not return useful error
Status: CLOSED CURRENTRELEASE
Product: Dogtag Certificate System
Classification: Community
Component: CA (Show other bugs)
1.1
All Linux
medium Severity medium
: ---
: ---
Assigned To: Andrew Wnuk
Chandrasekar Kannan
: Reopened
Depends On:
Blocks: 431020 freeipa20 445047
  Show dependency treegraph
 
Reported: 2009-05-08 10:32 EDT by Rob Crittenden
Modified: 2015-01-05 20:19 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-06-04 16:32:57 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
proposed fix (1.50 KB, patch)
2009-11-16 17:14 EST, Andrew Wnuk
no flags Details | Diff

  None (edit)
Description Rob Crittenden 2009-05-08 10:32:42 EDT
Description of problem:

I'm accessing bits of the CA directly by issuing remote authenticated requests. If I revoke a non-existent certificate I get a generic error, not a "unknown certificate" error.

For example, I issue this request to revoke a non-issued certificate:

https://catest.example.com:9444/ca/agent/ca/doRevoke

POST /ca/agent/ca/doRevoke HTTP/1.1
Host: catest.example.com:9444
Accept-Encoding: identity
Content-Length: 81
Content-type: application/x-www-form-urlencoded
Accept: text/plain

revocationReason=0&totalRecordCount=1&revokeAll=%28certRecordId%3D99%29&op=revoke

The error is:

fixed.errorDetails = "Error encountered while marking certificate revoked.";
fixed.authorityName = "Certificate Manager";

Not particularly helpful. What error occurred?
Comment 7 Andrew Wnuk 2009-11-16 17:14:23 EST
Created attachment 369801 [details]
proposed fix
Comment 8 Matthew Harmsen 2009-11-16 17:19:01 EST
attachment (id=369801) +mharmsen
Comment 9 Andrew Wnuk 2009-11-16 17:50:20 EST
svn commit pki/base/common/src/LogMessages_en.properties
Sending        pki/base/common/src/LogMessages_en.properties
Transmitting file data .
Committed revision 823.

svn commit pki/base/common/src/com/netscape/cms/servlet/cert/DoRevoke.java
Sending        pki/base/common/src/com/netscape/cms/servlet/cert/DoRevoke.java
Transmitting file data .
Committed revision 824.
Comment 10 Andrew Wnuk 2009-11-16 17:53:57 EST
In case were no certificate was found to be revoked, error message:
  "Error encountered while marking certificate revoked."
was replaced with
  "Attempt to revoke non-existent certificate(s).".
Comment 12 Kashyap Chamarthy 2010-12-08 04:14:24 EST
Verified.
CS8.1 nightly(4-Dec-2010) ; x86_64
RHEL5.6 nightly  ; x86_64

Procedure:
(1)Disable random nonces securing access by setting  `ca.enableNonces=false` in CS.cfg
(2)Try to revoke a non-existent cert (99) by invoking the doRevoke servlet url as below

##################################
[root@iceberg ~]# grep -i enableNnonce /var/lib/pki-ca1/conf/CS.cfg
ca.enableNonces=false
[root@iceberg ~]# 
#################################
https://iceberg.pnq.redhat.com:35333/ca/agent/ca/doRevoke?op=doRevoke&revocationReason=0&revokeAll=%28certRecordId=99%29&op=revoke
#################################

Result: (as expected)
Attempt to revoke non-existent certificate(s)

Note You need to log in before you can comment on or make changes to this bug.