Module: ConfigurationService::Provider::Vault::PathHelper
- Defined in:
- lib/configuration_service/provider/vault/path_helper.rb
Overview
Utility module for creating Vault paths
The module supports:
-
versioning paths to support backward-incompatible changes to the pathing and data schemes;
-
composing the configuration identifier into the path, and
-
composing a revision (or “latest”) into the path, to support revision history.
Constant Summary collapse
- PREFIX =
"secret/config/v1"
Class Method Summary collapse
-
.path(identifier, revision = "latest") ⇒ String
Revision path.
-
.policy_path(identifier) ⇒ String
Policy path.
Class Method Details
.path(identifier, revision = "latest") ⇒ String
Revision path
32 33 34 |
# File 'lib/configuration_service/provider/vault/path_helper.rb', line 32 def self.path(identifier, revision = "latest") "#{policy_path(identifier)}/#{revision}" end |
.policy_path(identifier) ⇒ String
Policy path
Since policies must apply to all revisions of the identified configuration, the policy path is necessarily broad.
47 48 49 |
# File 'lib/configuration_service/provider/vault/path_helper.rb', line 47 def self.policy_path(identifier) "#{PREFIX}/#{identifier}" end |