Class: Vault::Secret
Overview
Secret is a representation of a secret from Vault. Almost all data returned from Vault is represented as a secret.
Instance Attribute Summary collapse
-
#auth ⇒ SecretAuth?
readonly
Authentication information for this secret, if any.
-
#data ⇒ Hash<Symbol, Object>
readonly
Arbitrary data returned by the secret.
-
#lease_duration ⇒ Fixnum
readonly
The number of seconds this lease is valid.
-
#lease_id ⇒ String
readonly
Unique ID for the lease associated with this secret.
-
#metadata ⇒ Hash<Symbol, Object>
readonly
Read-only metadata information related to the secret.
-
#warnings ⇒ Array<String>?
readonly
List of warnings returned by the Vault server.
-
#wrap_info ⇒ WrapInfo?
readonly
Wrapped information sent with the request (only present in Vault 0.6+).
Instance Method Summary collapse
-
#renewable([r]) ⇒ Boolean
Returns whether this lease is renewable.
Methods inherited from Response
#==, decode, #initialize, #to_h
Constructor Details
This class inherits a constructor from Vault::Response
Instance Attribute Details
#auth ⇒ SecretAuth? (readonly)
Authentication information for this secret, if any. Most secrets will contain this field, but it may also be ‘nil`. When authenticating to Vault, the resulting Vault token will be included in this embedded field.
23 |
# File 'lib/vault/api/secret.rb', line 23 field :auth, load: ->(v) { SecretAuth.decode(v) } |
#data ⇒ Hash<Symbol, Object> (readonly)
Arbitrary data returned by the secret. The keys returned are dependent upon the request made. For more information on the names of the keys that may be returned, please see the Vault documentation.
36 |
# File 'lib/vault/api/secret.rb', line 36 field :data, freeze: true |
#lease_duration ⇒ Fixnum (readonly)
The number of seconds this lease is valid. If this number is 0 or nil, the secret does not expire.
59 |
# File 'lib/vault/api/secret.rb', line 59 field :lease_duration |
#lease_id ⇒ String (readonly)
Unique ID for the lease associated with this secret. The ‘lease_id` is a path and UUID that uniquely represents the secret. This may be used for renewing and revoking the secret, if permitted.
71 |
# File 'lib/vault/api/secret.rb', line 71 field :lease_id |
#metadata ⇒ Hash<Symbol, Object> (readonly)
Read-only metadata information related to the secret.
48 |
# File 'lib/vault/api/secret.rb', line 48 field :metadata, freeze: true |
#warnings ⇒ Array<String>? (readonly)
List of warnings returned by the Vault server. These are returned by the Vault server and may include deprecation information, new APIs, or request using the API differently in the future.
93 |
# File 'lib/vault/api/secret.rb', line 93 field :warnings, freeze: true |
Instance Method Details
#renewable([r]) ⇒ Boolean
Returns whether this lease is renewable.
81 |
# File 'lib/vault/api/secret.rb', line 81 field :renewable, as: :renewable? |