Uploaded image for project: 'Puppet Server'
  1. Puppet Server
  2. SERVER-977

DELETE handler not implemented in the certificate_request API

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • None
    • SERVER 2.4.0
    • 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

          Activity

            People

              Unassigned Unassigned
              pyther Matthew Gyurgyik
              Erik Dasher Erik Dasher
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support