Details
-
Bug
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
None
-
None
-
1
-
Server Jade 2016-04-06, Server Jade 2016-04-20
Description
API Documentation indicates the certificate_request should support destroy/delete.
https://docs.puppetlabs.com/puppet/4.2/reference/http_api/http_certificate_request.html#destroy
$ curl -X GET -H 'Accept: s' -k --cert /home/msg31/.config/nasi/infra-mgmt.ccs.ornl.gov.cert.pem --key /home/msg31/.config/nasi/infra-mgmt.ccs.ornl.gov.key.pem https://puppetca1.ccs.ornl.gov:8140/puppet-ca/v1/certificate_request/msg31-test2.ccs.ornl.gov?environment=production
Returns the CSR (works as expected)
$ curl -X DELETE -H 'Accept: s' -k --cert /home/msg31/.config/nasi/infra-mgmt.ccs.ornl.gov.cert.pem --key /home/msg31/.config/nasi/infra-mgmt.ccs.ornl.gov.key.pem https://puppetca1.ccs.ornl.gov:8140/puppet-ca/v1/certificate_request/msg31-test2.ccs.ornl.gov?environment=production
Returns a 404 Not Found (not expected/broken)
After a conversation with camlow325, KevinCorcoran, and cprice404 it appears this not implemented. See code: https://github.com/puppetlabs/puppet-server/blob/master/src/clj/puppetlabs/services/ca/certificate_authority_core.clj#L265-L269
Relevant sections of the IRC log
<camlow325> nwolfe: Hmm, kind of looks like we aren't supporting DELETE for the certificate_request API in the Puppet Server CA. Agree?
<camlow325> I don't see a DELETE handler for it - https://github.com/puppetlabs/puppet-server/blob/master/src/clj/puppetlabs/services/ca/certificate_authority_core.clj#L265-L269.
<KevinCorcoran> camlow325: pyther: Yeah, that looks like a bug.
<KevinCorcoran> I don't think we left it out on purpose.
<camlow325> KevinCorcoran: Yeah, I think you're right
<KevinCorcoran> Looks like we missed that at the very beginning with Puppet Server, we've never supported DELETE on that endpoint. Not a recent regression. Ya know, I really hate how with compojure/comidi you just get a 404 when you get the verb wrong.
Attachments
Issue Links
- relates to
-
SERVER-1272 Create test suite to validate the Puppet HTTP CA API
-
- Closed
-
-
SERVER-913 Resurrect and Refactor the HTTP CA API tests.
-
- Closed
-
-
SERVER-1257 Add section to docs to indicate puppet-server may be chattier in logs than passenger
-
- Closed
-