Giter Site home page Giter Site logo

insomnia-plugin-op's Introduction

1Password CLI Plugin for Insomnia

A plugin to retrieve secrets from your 1Password Vault.

Motivation

Even though Insomnia can be configured to be end-to-end encrypted I still don't like to have my secrets stored in plain text. In addition, Insomnia would be another place where I'd need to keep my secrets within environment variables in sync (e.g. if I change a password).

Using the Plugin system from Insomnia secrets can safely be retrieved from a 1Password Vault authenticating via e.g. biometrics.

Getting started

Configuration

If you install the 1Password CLI via a package manager (like Homebrew), then you need to tell the plugin the path to the CLI.

Add the following variables into your base environment:

{
  "__op_plugin": {
    // Either the directory containing `op` or directly the full path to the cli.
    "cliPath": "/opt/homebrew/bin/op"
  }
}

Usage

  1. Hit Ctrl + Space and select the 1Password => Fetch Secret action. Usage-1

  2. Click on the action and paste a reference to your 1Password Secret. Usage-2

As an alternative, you can also add the secret reference to your environment variables and reference this variable inside the action.

Caveats

Due to the fact that Insomnia retrieves the values every time when you e.g. hover over a variable the plugin uses node-cache to cache secrets for one hour. If you want to purge the cache, restart Insomnia.

Acknowledgements

  • Huge thanks to the the folks at 1Password for creating an awesome password manager.
  • Thanks to Insomnia for creating an extensible API client.

insomnia-plugin-op's People

Contributors

benvp avatar

Stargazers

Jeroen Van den Berghe avatar

Watchers

 avatar

insomnia-plugin-op's Issues

Integrate 1Password SDKs

Hey there,

Curious if you're open to adding support for the new 1Password SDKs to this Insomnia plugin. The new SDKs allow direct access to 1Password secrets without needing to install the CLI, streamlining the integration process and reducing dependencies.

Benefits:

  • Load secrets directly from 1Password using SDKs in Go, JS, or Python
  • Retrieve, create, edit, and delete items within 1Password vaults.
  • Use 1Password Service Accounts to authenticate.

Feel free to reach out to discuss in more detail. Thanks!

Secrets are requested every hour, even without a request happening

First of all: loving the neet plugin, works great!

A minor discomfort for me is that when Insomnia is open, but idle in the background, I will get requested access to 1Password secrets every hour.

I guess this happens because the cache expired and Insomnia is doing something in the background that needs the environments. Is this something you have an impact on to fix?

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.