Socket
Book a DemoInstallSign in
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

latest
npmnpm
Version
0.5.5
Version published
Weekly downloads
339
27.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

  • Secrets are loaded from AWS Secrets Manager at run time.
  • The request value is cached for 10 minutes to optimise request speed and cost.
  • Secrets are returned as string values.
  • 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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.