Class: Puppet::Application::Cert

Inherits:
Puppet::Application show all
Defined in:
lib/puppet/application/cert.rb

Constant Summary

Constants inherited from Puppet::Application

DOCPATTERN

Constants included from Util

Util::AbsolutePathPosix, Util::AbsolutePathWindows, Util::DEFAULT_POSIX_MODE, Util::DEFAULT_WINDOWS_MODE, Util::RFC_3986_URI_REGEX

Constants included from Util::POSIX

Util::POSIX::LOCALE_ENV_VARS, Util::POSIX::USER_ENV_VARS

Constants included from Util::SymbolicFileMode

Util::SymbolicFileMode::SetGIDBit, Util::SymbolicFileMode::SetUIDBit, Util::SymbolicFileMode::StickyBit, Util::SymbolicFileMode::SymbolicMode, Util::SymbolicFileMode::SymbolicSpecialToBit

Instance Attribute Summary collapse

Attributes inherited from Puppet::Application

#command_line, #options

Instance Method Summary collapse

Methods inherited from Puppet::Application

[], #app_defaults, available_application_names, banner, clear!, clear?, clear_everything_for_tests, #configure_indirector_routes, controlled_run, #deprecate, #deprecated?, environment_mode, exit, find, get_environment_mode, #handle_logdest_arg, #handlearg, #initialize, #initialize_app_defaults, interrupted?, #log_runtime_environment, #name, option, option_parser_commands, #preinit, restart!, restart_requested?, #run, #run_command, run_mode, #set_log_level, #setup_logs, stop!, stop_requested?, try_load_class

Methods included from Util

absolute_path?, benchmark, chuser, clear_environment, default_env, deterministic_rand, deterministic_rand_int, exit_on_fail, get_env, get_environment, logmethods, merge_environment, path_to_uri, pretty_backtrace, replace_file, safe_posix_fork, set_env, symbolizehash, thinmark, uri_encode, uri_query_encode, uri_to_path, which, withenv, withumask

Methods included from Util::POSIX

#get_posix_field, #gid, #idfield, #methodbyid, #methodbyname, #search_posix_field, #uid

Methods included from Util::SymbolicFileMode

#normalize_symbolic_mode, #symbolic_mode_to_int, #valid_symbolic_mode?

Constructor Details

This class inherits a constructor from Puppet::Application

Instance Attribute Details

#allObject

Returns the value of attribute all.



7
8
9
# File 'lib/puppet/application/cert.rb', line 7

def all
  @all
end

#caObject

Returns the value of attribute ca.



7
8
9
# File 'lib/puppet/application/cert.rb', line 7

def ca
  @ca
end

#digestObject

Returns the value of attribute digest.



7
8
9
# File 'lib/puppet/application/cert.rb', line 7

def digest
  @digest
end

#signedObject

Returns the value of attribute signed.



7
8
9
# File 'lib/puppet/application/cert.rb', line 7

def signed
  @signed
end

Instance Method Details

#helpObject



105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
# File 'lib/puppet/application/cert.rb', line 105

def help
   <<-HELP
This command is no longer functional, please use `puppetserver ca` instead.

puppet-cert(8) -- #{summary}
========

ACTIONS
-------
Every action except 'list' and 'generate' requires a hostname to act on,
unless the '--all' option is set.

* clean:
Use `puppetserver ca clean --certname NAME[,NAME...]`

* fingerprint:
Use openssl directly:
`openssl x509 -noout -fingerprint -<digest> -inform pem -in certificate.crt`

* generate:
Use `puppetserver ca generate --certname NAME[,NAME...]`

* list:
Use `puppetserver ca list [--all]`

* print:
Use openssl directly:
`openssl x509 -noout -text -in certificate.pem`

* revoke:
Use `puppetserver ca revoke --cerntname NAME[,NAME...]`

* sign:
Use `puppetserver ca sign --cerntname NAME[,NAME...]`

* verify:
Use `puppet ssl verify [--certname NAME]`

* reinventory:
Removed.

OPTIONS
-------
There are a couple important notes about previously-supported options.

* --allow-dns-alt-names:
In order to sign certificates with subject alternative names using
`puppetserver ca sign`, the `allow-subject-alt-names` setting must be
set to true in the `certificate-authority` section of Puppet Server's
config.

* --allow-authorization-extensions:
In order to sign certificates with authorization extensions using
`puppetserver ca sign`, the `allow-authorization-extensions` setting must be
set to true in the `certificate-authority` section of Puppet Server's
config.
HELP
end

#mainObject



164
165
166
# File 'lib/puppet/application/cert.rb', line 164

def main
  help
end

#parse_optionsObject



172
173
174
175
176
177
178
179
180
181
182
183
184
185
# File 'lib/puppet/application/cert.rb', line 172

def parse_options
  # handle the bareword subcommand pattern.
  result = super
  unless self.subcommand then
    if sub = self.command_line.args.shift then
      self.subcommand = sub
    else
      puts help
      exit
    end
  end

  result
end

#setupObject



168
169
170
# File 'lib/puppet/application/cert.rb', line 168

def setup
  deprecate
end

#subcommandObject



9
10
11
# File 'lib/puppet/application/cert.rb', line 9

def subcommand
  @subcommand
end

#subcommand=(name) ⇒ Object



13
14
15
16
17
# File 'lib/puppet/application/cert.rb', line 13

def subcommand=(name)
  # Handle the nasty, legacy mapping of "clean" to "destroy".
  sub = name.to_sym
  @subcommand = (sub == :clean ? :destroy : sub)
end

#summaryObject



101
102
103
# File 'lib/puppet/application/cert.rb', line 101

def summary
  _("Manage certificates and requests (Disabled)")
end