pki-bot / pki-issues-final

0 stars 0 forks source link

Combining REST resources for managing certificates #675

Open pki-bot opened 4 years ago

pki-bot commented 4 years ago

This issue was migrated from Pagure Issue #679. Originally filed by edewata (@edewata) on 2013-07-03 20:18:09:


Currently the operations to manage certificates are handled by separate REST resources which are more RPC-like. They should be combined into a single resource which is the certificates itself. This way the URL will not change suppose the operations change in the future.

Here is the current interface:

public interface CertResource {

    @POST
    @Path("agent/certs/{id}/revoke-ca")
    public CertRequestInfo revokeCACert(@PathParam("id") CertId id,
        CertRevokeRequest request);

    @POST
    @Path("agent/certs/{id}/revoke")
    public CertRequestInfo revokeCert(@PathParam("id") CertId id,
        CertRevokeRequest request);

    @POST
    @Path("agent/certs/{id}/unrevoke")
    public CertRequestInfo unrevokeCert(@PathParam("id") CertId id,
        CertUnrevokeRequest request);
}

Proposed interface:

public interface CertResource {

    @POST
    @Path("agent/certs/{id}")
    public CertRequestInfo processCert(@PathParam("id") CertId id,
        @QueryParam("action") String action,
        CertRevokeRequest request);
}
pki-bot commented 4 years ago

Comment from edewata (@edewata) at 2017-02-27 14:01:41

Metadata Update from @edewata: