Module: Vault::Defaults
- Defined in:
- lib/vault/defaults.rb
Constant Summary collapse
- VAULT_ADDRESS =
The default vault address.
"https://127.0.0.1:8200".freeze
Class Method Summary collapse
-
.address ⇒ String
The address to communicate with Vault.
-
.options ⇒ Hash
The list of calculated options for this configurable.
-
.proxy_address ⇒ String?
The HTTP Proxy server address as a string.
-
.proxy_password ⇒ String?
The HTTP Proxy user password as a string.
-
.proxy_port ⇒ String?
The HTTP Proxy server port as a string.
-
.proxy_username ⇒ String?
The HTTP Proxy server username as a string.
-
.ssl_pem_file ⇒ String?
The path to a pem on disk to use with custom SSL verification.
-
.ssl_verify ⇒ true, false
Verify SSL requests (default: true).
-
.token ⇒ String?
The vault token to use for authentiation.
Class Method Details
.address ⇒ String
The address to communicate with Vault.
16 17 18 |
# File 'lib/vault/defaults.rb', line 16 def address ENV["VAULT_ADDR"] || VAULT_ADDRESS end |
.options ⇒ Hash
The list of calculated options for this configurable.
10 11 12 |
# File 'lib/vault/defaults.rb', line 10 def Hash[*Configurable.keys.map { |key| [key, public_send(key)] }.flatten] end |
.proxy_address ⇒ String?
The HTTP Proxy server address as a string
28 29 30 |
# File 'lib/vault/defaults.rb', line 28 def proxy_address ENV["VAULT_PROXY_ADDRESS"] end |
.proxy_password ⇒ String?
The HTTP Proxy user password as a string
40 41 42 |
# File 'lib/vault/defaults.rb', line 40 def proxy_password ENV["VAULT_PROXY_PASSWORD"] end |
.proxy_port ⇒ String?
The HTTP Proxy server port as a string
46 47 48 |
# File 'lib/vault/defaults.rb', line 46 def proxy_port ENV["VAULT_PROXY_PORT"] end |
.proxy_username ⇒ String?
The HTTP Proxy server username as a string
34 35 36 |
# File 'lib/vault/defaults.rb', line 34 def proxy_username ENV["VAULT_PROXY_USERNAME"] end |
.ssl_pem_file ⇒ String?
The path to a pem on disk to use with custom SSL verification
52 53 54 |
# File 'lib/vault/defaults.rb', line 52 def ssl_pem_file ENV["VAULT_SSL_CERT"] end |
.ssl_verify ⇒ true, false
Verify SSL requests (default: true)
59 60 61 62 63 64 65 |
# File 'lib/vault/defaults.rb', line 59 def ssl_verify if ENV["VAULT_SSL_VERIFY"].nil? true else %w[t y].include?(ENV["VAULT_SSL_VERIFY"].downcase[0]) end end |
.token ⇒ String?
The vault token to use for authentiation.
22 23 24 |
# File 'lib/vault/defaults.rb', line 22 def token ENV["VAULT_TOKEN"] end |