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

@vyro-x/node-secrets

Package Overview
Dependencies
Maintainers
6
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vyro-x/node-secrets

Server-side secret management utility for Node.js

  • 0.5.5
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
164
increased by264.44%
Maintainers
6
Weekly downloads
 
Created
Source

Node Secrets

Server-side secret management utils for Node.js

Usage

import { GraphQLClient } from 'graphql-request';
import { config } from './config';
import { getSecretFromArn } from './getSecretFromArn';

export const hasuraClient = new GraphQLClient(config.HASURA_ENDPOINT, {
  requestMiddleware: async (request) => {
    const adminSecret = await getSecretFromArn(config.HASURA_ADMIN_SECRET_ARN);

    return {
      ...request,
      headers: {
        ...request.headers,
        'x-hasura-admin-secret': adminSecret,
      },
    };
  },
});

How it works

  1. Secrets are loaded from AWS Secrets Manager at run time.
  2. The request value is cached for 10 minutes to optimise request speed and cost.
  3. Secrets are returned as string values.
  4. An error is thrown if the secret cannot be found.

FAQs

Package last updated on 19 Jun 2024

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