vault package

Submodules

vault.apps module

class vault.apps.VaultConfig(app_name, app_module)

Bases: django.apps.config.AppConfig

Configuration for the vault app

label = u'vault'
name = u'vault'
verbose_name = u'Vault'

vault.exceptions module

Defines exceptions that can occur when conduction secrets transactions

exception vault.exceptions.InvalidSecretsAuthorization

Bases: exceptions.Exception

Exception indicating that the provided credentials to a secrets request was invalid

exception vault.exceptions.InvalidSecretsConfiguration

Bases: exceptions.Exception

Exception indicating that the secrets backend is not properly configured

exception vault.exceptions.InvalidSecretsRequest

Bases: exceptions.Exception

Exception indicating that the secrets request was invalid

exception vault.exceptions.InvalidSecretsToken

Bases: exceptions.Exception

Exception indicating that the secrets token was invalid

exception vault.exceptions.InvalidSecretsValue

Bases: exceptions.Exception

Exception indicating that the secrets value was invalid

vault.secrets_handler module

Handles secret getters and setters for Scale

class vault.secrets_handler.SecretsHandler

Bases: object

Represents a secrets handler for setting and retrieving secrets

get_job_type_secrets(job_name)

Retrieves the secrets located at the job_name within the backend

Parameters:job_name (str) – path within the secrets backend that the secret is stored
Returns:secret_values
Return type:str
list_job_types()

Gets the names of all job types that have secrets

Returns:all_job_types
Return type:[string]
set_job_type_secrets(job_name, secrets)

write job-type secrets to the secrets backend

Parameters:
  • job_name (str) – name of the job that the secrets belong to. Format: [job_name]-[job_version]
  • secrets (dict) – dict with name:value pairs for all secrets associated with the job
Returns:

Module contents