Code Monkey home page Code Monkey logo

ssstash's Introduction

ssstash

ssstash is a very simple tool that manages sensitive information in S3. All entities are encrypted at client side using KMS before sending to S3 (see Protecting Data Using Client-Side Encryption).

This is a S3 fork of credstash. Please refer to it for basic concepts.

Install

go get github.com/ojima-h/ssstash

or

Download from https://github.com/ojima-h/ssstash/releases

curl -L https://github.com/ojima-h/ssstash/releases/download/v0.0.1/ssstash-0.0.1.linux-amd64.gz | zcat > ssstash
chmod +x ssstash

Usage

NAME:
   ssstash - A new cli application

USAGE:
   ssstash [global options] command [command options] [arguments...]

VERSION:
   0.0.1

COMMANDS:
     list, ls    List saved credentials
     put         Save the credential in S3
     get         Get the credential from S3
     delete, rm  Delete the entry
     help, h     Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --help, -h     show help
   --version, -v  print the version

Configurations

The following Environment Variables can be used to configure default options.

  • SSSTASH_S3_BUCKET -- S3 bucket where credentials are saved.
  • SSSTASH_S3_PREFIX -- S3 prefix under which credentials are saved.
  • SSSTASH_AWS_PROFILE -- Profile name in your .aws credential file.
  • SSSTASH_KMS_KEY_ARN -- KMS Key ARN to encrypt/decrypt credentials.

AWS CLI environment variables (AWS_ACCESS_KEY_ID, ... etc) are also available. ref. Configuring the AWS CLI » Environment Variables

Example

Create a new credential:

ssstash put passward very-very-secret --key arn:aws:kms:ap-east-1:000000000000:key/xxxx

Fetch the credential:

ssstash get password

List saved credentials:

ssstash ls

Delete the credential:

ssstash rm password

credstash vs. ssstash

credstash uses DynamoDB to store credentials while ssstash uses S3. Each of these has its own advantages.

The advantages to use DynamoDB is described here.

The good points of S3 are:

  • You don't have to care about the capacity.
  • S3 is cheaper than DynamoDB in general.
  • Many AWS SDKs supports S3 client-side encryption (see AWS SDK Support for Amazon S3 Client-Side Encryption). No special libraries are needed to fetch saved credentials.
  • You can control access permissions for each entries using S3 Bucket Policy.
  • S3 supports Versioning.

ssstash's People

Contributors

ojima-h 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.