[PATCH] 65 Added cert revocation REST service.
The cert revocation REST service is based on DoRevoke and DoUnrevoke servlets. It provides an interface to manage certificate revocation. Ticket #161 -- Endi S. Dewata
On 6/7/2012 9:28 AM, Endi Sukma Dewata wrote:
The cert revocation REST service is based on DoRevoke and DoUnrevoke servlets. It provides an interface to manage certificate revocation.
Ticket #161
New patch attached. The servlets and REST service have been refactored to use a common processor. -- Endi S. Dewata
Some initial comments: (Many of these have been mentioned on irc already) 1. In revokeCert(), you should throw BadRequestException() or similar rather than EBaseException if the cert being revoked is the CA cert, or if the cert is already revoked. That should show up as a 4XX error. 2. It looks like you do not handle nonces. We need a task to figure out how to do this. 3. There is still a fair amount of logic that is in the legacy servlet and RESTful servlet. I would suggest moving the logic that checks whether or not the cert should be revoked - ie. is already revoked, or ca cert already revoked or belongs to different subject or is a system cert to processor.addCertificateToRevoke() or some similar method. You can use exceptions/ returns to populate rarg appropriately in the legacy servlet. 4. What happens if the request is pending or rejected -- ie. not completed. How would the client know? Should we be returning some kind of revocation status object? Or the revocation request itself? I do like the fact that the RevocationProcessor inherits from Processor. We'll need to square up my ProfileProcessor to do the same thing. Ade On Tue, 2012-06-26 at 19:15 -0500, Endi Sukma Dewata wrote:
On 6/7/2012 9:28 AM, Endi Sukma Dewata wrote:
The cert revocation REST service is based on DoRevoke and DoUnrevoke servlets. It provides an interface to manage certificate revocation.
Ticket #161
New patch attached. The servlets and REST service have been refactored to use a common processor.
_______________________________________________ Pki-devel mailing list Pki-devel@redhat.com https://www.redhat.com/mailman/listinfo/pki-devel
I'm posting some new patches. Please apply in this order: 71, 65-2, 66-2, 72. On 6/27/2012 2:42 PM, Ade Lee wrote:
1. In revokeCert(), you should throw BadRequestException() or similar rather than EBaseException if the cert being revoked is the CA cert, or if the cert is already revoked. That should show up as a 4XX error.
Fixed. I also added UnauthorizedException.
2. It looks like you do not handle nonces. We need a task to figure out how to do this.
https://fedorahosted.org/pki/ticket/213
3. There is still a fair amount of logic that is in the legacy servlet and RESTful servlet. I would suggest moving the logic that checks whether or not the cert should be revoked - ie. is already revoked, or ca cert already revoked or belongs to different subject or is a system cert to processor.addCertificateToRevoke() or some similar method. You can use exceptions/ returns to populate rarg appropriately in the legacy servlet.
Some cert validation logic has been moved into validateCertificateToRevoke(). There is an authorization logic that I left in the servlet/REST service, it should be moved to Tomcat authentication later.
4. What happens if the request is pending or rejected -- ie. not completed. How would the client know? Should we be returning some kind of revocation status object? Or the revocation request itself?
The REST methods now return the request objects which contain the request status. The CLI will check, if the status is complete it will show the cert info. Otherwise, it will show the request status. -- Endi S. Dewata
On 7/6/2012 10:59 AM, Endi Sukma Dewata wrote:
I'm posting some new patches. Please apply in this order: 71, 65-2, 66-2, 72.
New patch attached. Please apply in this order: 65-3, 66-3, 72-1. It fixes the exception messages to show CMSGW_UNAUTHORIZED and "CA signing certificate". I also removed unused fields in revocation request object. -- Endi S. Dewata
On 7/10/2012 12:58 PM, Endi Sukma Dewata wrote:
New patch attached. Please apply in this order: 65-3, 66-3, 72-1.
It fixes the exception messages to show CMSGW_UNAUTHORIZED and "CA signing certificate". I also removed unused fields in revocation request object.
New patch attached. It now uses BadRequestException and UnauthorizedException based on CMSException instead of the ones from RESTEasy. These exceptions can carry more information including exception class name and message. -- Endi S. Dewata
On 7/10/2012 6:02 PM, Endi Sukma Dewata wrote:
On 7/10/2012 12:58 PM, Endi Sukma Dewata wrote:
New patch attached. Please apply in this order: 65-3, 66-3, 72-1.
It fixes the exception messages to show CMSGW_UNAUTHORIZED and "CA signing certificate". I also removed unused fields in revocation request object.
New patch attached. It now uses BadRequestException and UnauthorizedException based on CMSException instead of the ones from RESTEasy. These exceptions can carry more information including exception class name and message.
ACKed by Ade, pushed to master. -- Endi S. Dewata
participants (2)
-
Ade Lee -
Endi Sukma Dewata