View Source ExSecrets.Providers.GoogleSecretManager (ex_secrets v0.3.4)
Google Secret Manager provider provides secrets from an Google Secret Manager through a rest API.
configuration
Configuration
Using the Service Account Credentials File
Application.put_env(:ex_secrets, :providers, %{
google_secret_manager: %{
service_account_credentials_path: ".temp/cred.json"
}
})
Using the json file contents
Application.put_env(:ex_secrets, :providers, %{
google_secret_manager: %{
service_account_credentials: %{
"type" => "service_account",
"project_id" => "project-id",
"private_key_id" => "keyid",
"private_key" => "-----BEGIN PRIVATE KEY-----...-----END PRIVATE KEY-----
",
"client_email" => "secretaccess@project-id.iam.gserviceaccount.com",
"client_id" => "client-id",
"auth_uri" => "https://accounts.google.com/o/oauth2/auth",
"token_uri" => "https://oauth2.googleapis.com/token",
"auth_provider_x509_cert_url" => "https://www.googleapis.com/oauth2/v1/certs",
"client_x509_cert_url" => "https://www.googleapis.com/robot/v1/metadata/x509/secretaccess%40project-id.iam.gserviceaccount.com",
"universe_domain" => "googleapis.com"
}
}
})
CRC32C Verification
When google returns the CRC32C value, the provider will verify the value with the data returned from the API. If the values do not match, the provider will return an error. The provider uses the crc32cer library https://hex.pm/packages/crc32cer to verify the CRC32C value.
Link to this section Summary
Functions
Returns a specification to start this module under a supervisor.
Callback implementation for ExSecrets.Providers.Behaviour.get/1
.
Callback implementation for GenServer.init/1
.
Callback implementation for ExSecrets.Providers.Behaviour.reset/0
.
Callback implementation for ExSecrets.Providers.Behaviour.set/2
.
Link to this section Functions
Returns a specification to start this module under a supervisor.
See Supervisor
.
Callback implementation for ExSecrets.Providers.Behaviour.get/1
.
Callback implementation for GenServer.init/1
.
Callback implementation for ExSecrets.Providers.Behaviour.reset/0
.
Callback implementation for ExSecrets.Providers.Behaviour.set/2
.