Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

google-secrets-manager-cloudflare

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

google-secrets-manager-cloudflare

Google Secrets Manager - Cloudflare

  • 1.0.0
  • unpublished
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Node.js Google Secrets Manager - Cloudflare

Integrating Google Secret Manager with Cloudflare Workers to securely manage and dynamically retrieve sensitive information at the edge

Prerequisites

Before you begin, make sure you have the following:

  • Node.js installed (https://nodejs.org/)
  • Google Cloud Platform (GCP) account with a project set up

Installation

Install project dependencies:

npm install google-cloud-secrets-manager

Configuration

To use the different functions in this project, you need to set up the following environment variables:

GCP_USER: Your Google Cloud Platform user (email) associated with the project. GCP_KEY: The path to your GCP service account key file (JSON file). GCP_PROJECT_NAME: The name of your GCP project where Secrets Manager will be used.

You can set these variables by creating a .env file in the root of the project:

GCP_USER=your-user@example.com
GCP_KEY=/path/to/your/key.json
GCP_PROJECT_NAME=your-project-name

Make sure to replace the values with your actual GCP information.

Usage

The project provides the following functionalities:

Creating a new secret in Google Cloud Secrets Manager. Retrieving the value of a secret. To run the code demonstrating these functionalities, use the following commands:

Create a secret:

    const secretsStore = new SecretsStore({user, key, project_name});
    await secretsStore.storeCredential('secretId', 'secret', {'label1':'labelValue1', 'label2':'labelValue2'});

Get the value of a secret:

    const secretsStore = new SecretsStore({user, key, project_name});
    await secretsStore.retrieveCredential('secretId');

Update the value of a secret:

    const secretsStore = new SecretsStore({user, key, project_name});
    await secretsStore.updateCredential('secretId', 'newSecret');

Disclaimer

This project is not supported by or part of Google Cloud or Cloudflare

Keywords

FAQs

Package last updated on 24 Aug 2023

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc