Module: Vault::Provision::Pki

Included in:
Config::Crl, Config::Urls, Intermediate::Generate::Internal, Roles, Root::Generate::Internal
Defined in:
lib/vault/provision/pki.rb

Overview

PKI/CA backend provisioning

Instance Method Summary collapse

Instance Method Details

#ca_type(path) ⇒ Object



15
16
17
# File 'lib/vault/provision/pki.rb', line 15

def ca_type path
  path.match(/pki-intermediate/) && true
end

#generated?(path) ⇒ Boolean

Returns:

  • (Boolean)


8
9
10
11
12
13
# File 'lib/vault/provision/pki.rb', line 8

def generated? path
  result = @vault.get "v1/#{path}/ca/pem"
  return true if result =~ /BEGIN CERTIFICATE/
rescue Vault::HTTPClientError
  return false
end