peacemakr-cli

command module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 5, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

README



Peacemakr-cli

CLI that may be used to interact with anything protected by Peacemakr's Secure Data Platform (includes builtin Key Lifecycle Management, Forward Cryptoagility, and On-Prem Key Derivation).

How to Install

brew tap peacemakr-io/peacemakr
brew install peacemakr-cli

# seeing it work
export PEACEMAKR_APIKEY=your-api-key
echo "hello world" | peacemakr-cli --action=encrypt | peacemakr-cli --action=decrypt
# expected output: hello world

Quick start with Dockerhub

(1) Register an account with https://peacemakr.io

(2) Login to your admin portal, https://admin.peacemakr.io - grab your ApiKey

(3) Encrypt using peacemakr-cli + ApiKey,

$ ciphertext=`echo "hello world" | docker run -e PEACEMAKR_APIKEY=your-api-key -i peacemakr/peacemakr-cli ./peacemakr-cli -action=encrypt`
$ echo $ciphertext
AQAAAAkAAAAoAAAALAAAADAAAABEAAAAWAAAANcAAADnAAAAMwEAAAAEAAIAAAAAEAAAACEI
eELxb13s32PdZi/4NuUQAAAAUWJ17eT23DpJ63GdnJlq5XsAAAB7ImNyeXB0b0tleUlEIjoi
MGtKdHR6TWt2MnNVa2Q4VndBOXNBckdVaWFZOHI2MHgyV3Y5T29EWGk5QT0iLCJzZW5kZXJL
ZXlJRCI6IjBtaHRscVdMTlM2VUNBWWNRZHk1MG81UTZ5emZSQnltVGZXcHJ3S2JBQ289In0M
AAAAswnudtyjo5K+UOKCSAAAADBGAiEA6b68OXaUWdvyfQrr6jENzjhwn7ewXp9tKNYEmu/W
1rMCIQDJouUC0qlmDhUKpZr1k7gz3zDYuaZsMQs4RH2A2xhadvKfNCD/rk2UG2NVkLQSBHjF
VK2LIDbz40rgi5fdY38C

(4) Decrypt using peacemakr-cli + ApiKey,

echo "$ciphertext" | docker run -e PEACEMAKR_APIKEY=your-api-key -i peacemakr/peacemakr-cli ./peacemakr-cli -action=decrypt 2>/dev/null

hello world

Don't want to use docker? Checkout out our native binary releases for ubuntu.

Examples in action:

Build from source with docker

./build-dep.sh 
./build-bin.sh

What flags does it accept?

$ docker run -i peacemakr/peacemakr-cli ./peacemakr-cli -help
Usage of ./peacemakr-cli:
  -action string
    	action= encrypt|decrypt (default "encrypt")
  -config string
    	custom config file e.g. (peacemakr.yml) (default "peacemakr.yml")
  -inputFileName string
    	inputFile to encrypt/decrypt
  -outputFileName string
    	outputFile to encrypt/decrypt

FAQ

  • failed to register due to unknown error (status 500) - verify correctness of your API key

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL