GithubHelp home page GithubHelp logo

jansgescheit / insomnia-bitwarden-secrets Goto Github PK

View Code? Open in Web Editor NEW

This project forked from maxkpower/insomnia-bitwarden-secrets

0.0 0.0 0.0 90 KB

This Insomnia Plugin integrates Bitwarden Secrets Manager into Insomnia, enabling seamless access to encrypted secrets.

License: MIT License

JavaScript 100.00%

insomnia-bitwarden-secrets's Introduction

Insomnia bws Plugin

This Insomnia plugin allows you to interact with the Bitwarden Secrets Manager (bws) CLI to perform operations such as retrieving secrets and projects.

Requirements

bws CLI installed on your system. You can install the CLI using the following commands:

Installation

Linux and macOS

curl https://bws.bitwarden.com/install | sh` 

Windows

iwr https://bws.bitwarden.com/install | iex

Plugin Installation

In order for Insomnia to recognize the plugin as an Insomnia plugin, please copy the plugin files to the following locations:

MacOS: ~/Library/Application Support/Insomnia/plugins/ (escaped version: ~/Library/Application\ Support/Insomnia/plugins/) Windows: %APPDATA%\Insomnia\plugins\ Linux: $XDG_CONFIG_HOME/Insomnia/plugins/ or ~/.config/Insomnia/plugins/

Plugin Configuration

The plugin requires you to set the bws CLI path and access token in the environment variables.

Environment Image

Below is an example configuration:

{
  "__bws_plugin": {
    "cliPath": "/usr/local/bin/bws",
    "accessToken": "<your-access-token>"
  },
  "secret": "{% bws 'getSecret' 'your-secret-uuid' %}"
}
  • cliPath: Path to the bws CLI executable.
  • accessToken: Your Bitwarden access token.

Usage

Available Operations

  • Get Secret: Retrieve a secret by its UUID.
  • Get Project: Retrieve a project by its UUID.

Example Usage

Get Secret

To retrieve a secret by its UUID, use the following template tag in your Insomnia request:

"{% bws 'getSecret' 'your-secret-uuid' 'value' %}"

Get Project

To retrieve a project by its UUID, use the following template tag in your Insomnia request:

"{% bws 'getProject' 'your-project-uuid' 'name' %}"

Optional Field

You can specify an optional field to filter the value.

Tag Image

For instance, if you only want to get the value field in the example below:

{
  "id": "your-secret-id",
  "organizationId": "your-organization-id",
  "projectId": "your-project-id",
  "key": "your-key",
  "value": "your-value",
  "note": "",
  "creationDate": "2024-01-24T10:46:40.970622500Z",
  "revisionDate": "2024-04-09T08:51:11.377613300Z"
}

Use the following template tag:

"{% bws 'getSecret' 'your-secret-id' 'value' %}"

Using the Autocomplete Menu

Instead of manually typing the template tags, you can use the autocomplete menu to insert them. Press Ctrl + Space wherever environment variables can be used to launch the autocomplete menu and select the desired bws operation.

Autocomplete Image

For more information on referencing environment variables, visit the Insomnia documentation.

Contributing

If you find any issues or have suggestions for improvements, feel free to open an issue or submit a pull request.

License

This project is licensed under the MIT License.

insomnia-bitwarden-secrets's People

Contributors

maxkpower avatar jansgescheit avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.