
Security News
Package Maintainers Call for Improvements to GitHub’s New npm Security Plan
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
fastify-secrets-gcp
Advanced tools
Fastify secrets plugin for Google cloud platform secrets manager
npm install --save fastify-secrets-gcp
In order to be able to read from gcp secrets manager you will need some permissions. You will also probably manage permissions in different ways in local dev and production environment.
In general you may want to use a different secrets manager on your local machine (i.e. fastify-secrets-env
to read secrets from env variables).
If you want run fastify-secrets-gcp
in the local environment too you will need to follow these steps:
.gitignore
to avoid commiting it)GOOGLE_APPLICATION_CREDENTIALS
to the absolute path of the downloaded keyIf you already have a custom Service Account for your service Clour Run you will need to give it access to Secrets Manager. Otherwise you will need to create a new custom Service Account with access to Secrets Manager and assign it to Cloud Run.
In any case you will need to grant the "Secret Manager Secret Accessor" role.
const FastifySecrets = require('fastify-secrets-gcp')
fastify.register(FastifySecrets, {
secrets: {
dbPassword: 'projects/PROJECT-ID/secrets/SECRET-ID/versions/latest'
}
})
await fastify.ready()
console.log(fastify.secrets.dbPassword) // content of projects/PROJECT-ID/secrets/SECRET-ID/versions/latest
The plugin only expect the secrets
object in the options.
It is a map of keys and resource ids for the secrets. fastify-secrets-gcp
will decorate the fastify server with a secrets
object where keys will be the same keys of the options and the value will be the content of the secret as fetched from GCP Secrets Manager
See CONTRIBUTING.md
Copyright NearForm Ltd 2020. Licensed under the Apache-2.0 license.
FAQs
Fastify secrets plugin for Google cloud platform secrets manager
We found that fastify-secrets-gcp demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.