Skip to content
No description, website, or topics provided.
Go Makefile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src/github.com/nlamirault/enigma
vendor
.gitignore
.projectile
CONTRIBUTING.md
ChangeLog.md
Dockerfile
LICENSE
Makefile
README.md
circle.yml

README.md

Enigma

License Apache 2

Master :

  • Circle CI

Develop :

  • Circle CI

This tool is a personal safe.

Storage backend

Secret provider

Installation

You can download the binaries :

Configuration

Enigma configuration use toml format. File is located into $HOME/.config/enigma/enigma.toml.

KMS

To use the Amazon KMS, :

  • Creates a KMS key via the AWS Console and store its ID (a UUID)

  • Setup the AWS region

  • Setup into the configuration file :

      [kms]
      region = "eu-west-1"
      keyID = "xxxx-xxxx-xxxx"
    

S3

  • Setup into the configuration file :

      [s3]
      region = "eu-west-1"
      bucket = "my-enigma-bucket"
    
  • Initialize your bucket into S3 :

      $ enigma bucket --debug create
      Create bucket
      2016/01/14 23:45:10 [DEBUG] Amazon S3 Create bucket : cdcdscsdcsd
      2016/01/14 23:45:11 [DEBUG] Amazon S3 {
          Location: "http://cdcdscsdcsd.s3.amazonaws.com/"
      }
      Bucket successfully created
    

GPG

Specify the email to use with your public key:

    [gpg]
    email = "foo.bar@gmail.com"

BoltDB

  • Setup into the configuration file :

      [boltdb]
      file = "/tmp/enigma.db"
      bucket = "enigma"
    
  • Create your bucket :

      $ enigma bucket --debug create
      2016/01/14 23:57:11 Create /tmp/enigma
      Create bucket
      Bucket successfully created
    

Example

# enigma.toml

# Encryption provider
backend = "gpg"

# Storage backend
storage = "boltdb"

[gpg]
email = "foo.bar@gmail.com"

[kms]
region = "eu-west-1"
keyID = "xxxx-xxxx-xxxx"

[aes]
key = "abcdefghijklmnop"

[s3]
region = "eu-west-1"
bucket = "mybucket"

[boltdb]
file = "/tmp/enigma.db"
bucket = "enigma"

Usage

KMS / BoltDB

  • List all secrets:

      $ enigma secret list
      List secrets :
    
  • Store a new secret :

      $ enigma secret --key="mysecret" --text="mypassword" put
      Store secret text mypassword with key mysecret
      Successfully uploaded data with key mysecret
    
      $ enigma secret list
      List secrets :
      - mysecret
    
  • Retrieve a secret :

      $ enigma secret --key="mysecret" get
      Retrive secret text for key : mysecret
      Decrypted: mypassword
    

GPG / BoltDB

  • Store a new secret :

      $ enigma secret --debug --key="nicolas" --text="mypassword" put
      2016/01/14 23:08:04 [DEBUG] Init BoltDB storage : /tmp/enigma.db
      Store secret text mypassword with key nicolas
      2016/01/14 23:08:04 [DEBUG] GPG Open public keyring /home/nlamirault/.gnupg/pubring.gpg
      2016/01/14 23:08:04 [DEBUG] GPG Read public keyring
      2016/01/14 23:08:04 [DEBUG] GPG Search key into keyring using nicolas.lamirault@gmail.com
      2016/01/14 23:08:04 [DEBUG] Put : nicolas -----BEGIN PGP MESSAGE-----
      [...]
      4AHkPJd4QQaimnFACYR8pTeEUuEgOODO4Arhwt/gDOKYMAIv4ILjI5qsqqWR+qjg
      zOF8/+Dp5GSbF7vp19ilGb8OubCpgHTiL/fIquGi8AA=
      =9agp
      -----END PGP MESSAGE-----
      Successfully uploaded data with key nicolas
    
  • Retrieve a secret :

      $ bin/enigma secret --debug --key="nicolas" get
      2016/01/14 23:10:06 [DEBUG] Init BoltDB storage : /tmp/enigma.db
      Retrive secret text for key : nicolas
      2016/01/14 23:10:06 [DEBUG] Search entry with key : nicolas
      2016/01/14 23:10:06 [DEBUG] GPG Search key into keyring using nicolas.lamirault@gmail.com
      GPG Passphrase:
      2016/01/14 23:10:11 [DEBUG] GPG Decrypting private key using passphrase
      2016/01/14 23:10:11 [DEBUG] GPG Finished decrypting private key using passphrase
      Decrypted: mypassword
    

Development

  • Initialize environment

      $ make init
    
  • Build tool :

      $ make build
    
  • Launch unit tests :

      $ make test
    

Contributing

See CONTRIBUTING.

License

See LICENSE for the complete license.

Changelog

A changelog is available

Contact

Nicolas Lamirault nicolas.lamirault@gmail.com

You can’t perform that action at this time.