Giter VIP home page Giter VIP logo

bens's Introduction

BENS

Build environment security

A simple secure variable store.

Many systems have secure vaults:

  • Ansible has vault
  • Hashicorp has vault (as well)
  • most ci systems let you store environmental variables on your build nodes
  • k8s has secrets
  • macOS has keychain

All of these secure variables store systems don't integrate with each other, few of them are cross platform, and all of them bring along a lot of dependencies.

I went looking, but I couldn't find a simple secure variable store that would work on both Windows and Linux without any dependences. So, I decided to build one.

Setup

BENS requires a yaml configuration file to store the environment, a public and private key, and a pass file to store the password for the private key. You can generate all of these by running the scripts\init.sh script. Note: this script depends on openssl and bas64 so they must be installed on your system before running the script.

Running

If you're working directory contains the keys and yaml files all you have to do to run bens is the following:

bens environment

The init.sh generates a dummy variable in the default environment so you should see an environment formated for shell. To load it into your shell run eval $(bens environment). The environment commands requires the private key and pass file to run. If you don't have access to those the command will fail.

The other bens command add only requires the public key and yaml files. To add the variable FOO with the value "bar" you simply run the following:

bens add BAR "bar"

Now that you've added run environment against to verify it was added.

Environment Variables

  • BENS_PASS: If set read the pass from this environmental variable, unless --ask-pass is specified on the command line. This environment variable isn't required, if it's unset the pass is read from the pass.txt file.

Limitations

  • Values for environmental variables are limited to the size of an RSA block

bens's People

Contributors

matthardcastle avatar

Watchers

 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.