Socket
Book a DemoInstallSign in
Socket

@rollinginfra/secret-encryption-google-kms

Package Overview
Dependencies
Maintainers
2
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rollinginfra/secret-encryption-google-kms

Encrypt and decrypt secret strings using the Google KMS service.

latest
npmnpm
Version
1.0.0
Version published
Maintainers
2
Created
Source

Secret Encryption - Google KMS

Encrypt and decrypt secret strings using the Google KMS service.

Set Up Google KMS

  • Open Google KMS in the Google Cloud Console
  • Enable the API (if not already enabled) by clicking "Enable API"
  • Go to "Security" -> "Key Management" in the Google Cloud Console
  • Create a key ring, noting down the key ring name and key ring location for later.
  • Create a key in your new key ring, noting down the key name for later. The "Purpose" must be set to "Symmetric encrypt/decrypt". All other settings can have any value.
  • (Optional) Use "+ Add Member" on the permissions tab to give the "Cloud KMS CryptoKey Encrypter/Decrypter" role to anyone account that needs to use this secret store.

Set up your local environment

You can set up your local environment by running gcloud init and following the prompts to authenticate.

import SecretEncryptionGoogleKms from '@rollinginfra/secret-encryption-google-kms';

const encryption = new SecretEncryptionGoogleKms({
  googleProjectID: `YOUR_GOOGLE_PROJECT_NAME`,
  keyRingName: `YOUR_KEY_RING_NAME`,
  keyName: `YOUR_KEY_NAME`,
  location: `YOUR_KEY_RING_LOCATION`,
});

FAQs

Package last updated on 05 Jul 2021

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