Skip to content

Commit

Permalink
(PUP-868) deprecate misc cert-related faces
Browse files Browse the repository at this point in the history
This PR deprecates the certificate_request, certificate_revocation_list, and ca faces.

Original context from @nfagerlund on redmine #15860:

The real puppet cert mgmt command is “puppet cert.” It’s one of the classic
applications. But for some reason, there are a TON of faces related to certs
hanging around! I’m seeing:
- ca
- certificate
- certificate_request
- certificate_revocation_list
- None of these act as a replacement for puppet cert.  By using a patchwork of
  them, you might be able to get all of the functionality of puppet cert, but
  it’s not clear. This is a result of us simply exposing these indirector
  endpoints on the command line without spending any time thinking about a
  usable API for interacting with them.
- Because the find/search/save/destroy actions are generally bad fits for a
  command line API, these faces are all cluttered up with at least partially
  unusable actions.
- Because they act through the indirector, and agent and master use different
  termini for all of these endpoints, it’s not clear which faces and actions
  are meant to be used on the agent and which on the master. Additionally, some
  of these may be intended to act remotely.
- Some of these faces have actions whose behavior conflicts with an
  identically-named action on ‘puppet cert.’ Particularly, see puppet
  certificate generate vs. puppet cert generate vs.  puppet ca generate
  (?????).
- Some of these faces (particularly puppet ca) have completely undocumented
  actions. This is my “someone added an action without a description string”
  face: >:|
  • Loading branch information
Moses Mendoza committed Jan 9, 2017
1 parent 960e528 commit 3692abf
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/puppet/face/ca.rb
Expand Up @@ -254,4 +254,6 @@
end
end
end

deprecate
end
2 changes: 2 additions & 0 deletions lib/puppet/face/certificate_request.rb
Expand Up @@ -51,4 +51,6 @@

get_action(:save).summary "API only: submit a certificate signing request."
get_action(:save).arguments "<x509_CSR>"

deprecate
end
2 changes: 2 additions & 0 deletions lib/puppet/face/certificate_revocation_list.rb
Expand Up @@ -51,4 +51,6 @@

deactivate_action(:search)
deactivate_action(:save)

deprecate
end
10 changes: 10 additions & 0 deletions spec/unit/face/ca_spec.rb
@@ -0,0 +1,10 @@
#! /usr/bin/env ruby
require 'spec_helper'
require 'puppet/face'

describe Puppet::Face[:ca, '0.1.0'] do
it "should be deprecated" do
expect(subject.deprecated?).to be_truthy
end
end

10 changes: 10 additions & 0 deletions spec/unit/face/certificate_request_spec.rb
@@ -0,0 +1,10 @@
#! /usr/bin/env ruby
require 'spec_helper'
require 'puppet/face'

describe Puppet::Face[:certificate_request, '0.0.1'] do
it "should be deprecated" do
expect(subject.deprecated?).to be_truthy
end
end

10 changes: 10 additions & 0 deletions spec/unit/face/certificate_revocation_list_spec.rb
@@ -0,0 +1,10 @@
#! /usr/bin/env ruby
require 'spec_helper'
require 'puppet/face'

describe Puppet::Face[:certificate_revocation_list, '0.0.1'] do
it "should be deprecated" do
expect(subject.deprecated?).to be_truthy
end
end

0 comments on commit 3692abf

Please sign in to comment.