0.0.3 • Published 5 years ago

@aldinger/vault v0.0.3

Weekly downloads
1
License
WTFPL
Repository
-
Last release
5 years ago

Usage

const vault = require('@teamsnap/vault-key')

const secrets = [
  'secret-engine/data/secret-name',
  'secret-engine-2/data/another-secret-name'
]

const secretData = vault.getSecrets(secrets)

console.log('Secret values:', JSON.stringify(secretData, null, 4))
console.log(`secret-key value = ${secretData['secret-engine/data/secret-name']['secret-key']}`)
console.log(`secret-key-2 value = ${secretData['secret-engine-2/data/another-secret-name']['secret-key-2']}`)

Environment Variable Configuration

Environment VariableDefaultRequired (GCP)Required (other environments)ExampleDescription
ENVIRONMENT"development"NoNoproductionIf set to anything but production, prints trace level logs
FUNCTION_IDENTITY""NoYesmy-project-123@appspot.gserviceaccount.comEmail address associated with service account
GCLOUD_PROJECT""NoYesmy-project-123Project ID the service account belongs to
GOOGLE_APPLICATION_CREDENTIALS""NoYesservice-account/my-project-123.serviceaccount.jsonPath to service account credentials file
TRACE_ENABLED"false"NoNotrueWhether or to enable opencensus tracing
TRACE_PREFIX"vault"NoNomy-companyPrefix added to name of tracing spans
VAULT_ADDR""YesYeshttps://vault.my-company.comVault address including protocol
VAULT_ROLE""YesYesvault-role-cloud-functionsName of role created in Vault for GCP auth

Publishing

  1. On MacOS: make build_all
  2. npm publish --access public
0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago