Code Monkey home page Code Monkey logo

ejson2env's Introduction

Build Status Go Report Card

ejson2env

ejson2env is a tool to simplify storing secrets that should be accessible in the shell environment in your git repo. ejson2env is based on the ejson library and extends the ejson file format.

ejson2env exports all of the values in the environment object in the ejson file to the shell environment.

For example, with the below ejson file:

{
    "_public_key": "<public key here>",
    "environment": {
        "SECRET_SHELL_VARIABLE": "<encrypted data>"
    }
}

Running:

$ ejson2env test.ejson

Would result in the following output:

export SECRET_SHELL_VARIABLE=<decrypted data>

You can then have your shell evaluate this output:

$ eval $(ejson2env test.ejson)

Using ejson2env

ejson2env's usage information is described in it's included manual page.

Installing ejson2env

ejson2env is available through a number of different routes and package managers. If you plan on modifying ejson2env, it is suggested that you install via go get.

Go

ejson2env can be installed using the regular go install tool:

$ go install github.com/Shopify/ejson2env/v2/cmd/ejson2env@latest

You can then find the compiled binary in $GOPATH/bin

Debian Package

You can download the latest version of the Debian package from the releases page.

Install the downloaded package by calling:

$ dpkg -i ejson2env_1.0.3_amd64.deb

RubyGems

You can install ejson2env using Ruby's Gem tool:

$ gem install ejson2env

Homebrew

Provided your install of Homebrew is configured to pull from Shopify's Homebrew repo, you can install ejson2env by calling:

$ brew install ejson2env

Contributing

Please review the Contributing document if you are interested in helping improve ejson2env!

ejson2env's People

Contributors

arunsathiya avatar burke avatar catherinejones avatar cdenyar avatar cjgu avatar cursedcoder avatar dependabot[bot] avatar donk-shopify avatar genevieveluyt avatar itsgarcia avatar jonpulsifer avatar mistydemeo avatar rafaelfranca avatar sambostock avatar samsonmar avatar shopify-rails[bot] avatar thepwagner avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ejson2env's Issues

Support same formats as krane

For mixed applications that require secrets at build AND at runetime, it would be great if you could support same syntax.
Eg storing vars in kubernetes_secrets/environment (json) AND ignoring _ at the beginning of env key names (unencrypted values)

Maybe I am also missing something?

Publish a snap package

Related to #7

Ref https://snapcraft.io/first-snap/golang

We should publish this as a snap such that we can snap install ejson2env. Travis can probably do the thing for us.

Here's the snapcraft.yaml that I used to build this in a pinch:

name: ejson2env
version: '1.0'
summary: ejson2env is based on the ejson library and extends the ejson file format.
description: |
  ejson2env is a tool to simplify storing secrets that should be accessible in the shell environment in your git repo.
confinement: devmode
base: core18
parts:
  ejson2env:
    plugin: go
    go-importpath: github.com/Shopify/ejson2env
    source: https://github.com/Shopify/ejson2env
    source-type: git
apps:
  ejson2env:
    command: bin/ejson2env

image

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.