Socket
Socket
Sign inDemoInstall

serverless-offline-secrets-manager-simulator

Package Overview
Dependencies
1
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    serverless-offline-secrets-manager-simulator

This plugin exposes a secrets manager compatible API on a configurable port whenever Serverless Offline is started.


Version published
Weekly downloads
99
increased by86.79%
Maintainers
1
Install size
68.0 kB
Created
Weekly downloads
 

Readme

Source

serverless-offline-secrets-manager-simulator

This plugin exposes a secrets manager compatible API on a configurable port whenever Serverless Offline is started. Secrets are stored in-memory and will be lost when the server is stopped

Supported API Calls

Installation

npm install serverless-offline-secrets-manager-simulator

In your serverless.yml:

plugins:
  - serverless-offline-secrets-manager-simulator

Configuration

custom:
  secrets-manager-simulator:
      port: 8007 # Optional - port to listen on. Defaults to 8007
      enableDebugEndpoint: true # Optional. Defaults to true. If false, the /list endpoint will not be available 
      secretsFile: /tmp/secrets.json # Optional. If specified, the plugin will persist secrets between runs to the specified json file 
      secrets: # Optional. List of key-value pairs to seed the secret manager with on startup
        - key: Secret1
          value: I-Am-A-Secret
        - key: Secret2
          value: I-Am-Another-Secret

Usage

Simply send appropriately formatted POST requests to http://127.0.0.1:[PORT] where PORT is specified in the configuration (or use the default 8007)

When using the AWS sdk, create your client with a custom endpoint specified:

import { SecretsManagerClient } from "@aws-sdk/client-secrets-manager"

const client = new SecretsManagerClient({ endpoint: "http://127.0.0.1:8007" })

The plugin provides a debug endpoint at /list which will list all secrets currently contained within the store

Keywords

FAQs

Last updated on 04 Sep 2023

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc