File: README.md

package info (click to toggle)
golang-github-xordataexchange-crypt 0.0.2%2Bgit20150523.17.749e360-4
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 152 kB
  • ctags: 93
  • sloc: makefile: 2
file content (70 lines) | stat: -rw-r--r-- 1,388 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# crypt

## Install

### Binary release

```
wget https://github.com/xordataexchange/crypt/releases/download/v0.0.1/crypt-0.0.1-linux-amd64
mv crypt-0.0.1-linux-amd64 /usr/local/bin/crypt
chmod +x /usr/local/bin/crypt
```

### go install

```
go install github.com/xordataexchange/crypt/bin/crypt
```

## Backends

crypt supports etcd and consul as backends via the `-backend` flag.

## Usage

```
usage: crypt COMMAND [arg...]

commands:
   get  retrieve the value of a key
   set  set the value of a key
```

### Encrypted and set a value

```
usage: crypt set [args...] key file
  -backend="etcd": backend provider
  -endpoint="": backend url
  -keyring=".pubring.gpg": path to armored public keyring
```

Example:

```
crypt set -keyring pubring.gpg /app/config config.json 
```

### Retrieve and decrypted a value

```
usage: crypt get [args...] key
  -backend="etcd": backend provider
  -endpoint="": backend url
  -secret-keyring=".secring.gpg": path to armored secret keyring
```

Example:

```
crypt get -secret-keyring secring.gpg /app/config
```

### Support for unencrypted values
```
crypt set -plaintext ...
crypt get -plaintext ...
```
Crypt now has support for getting and setting plain unencrypted values, as
a convenience.  This was added to the backend libraries so it could be exposed
in spf13/viper. Use the -plaintext flag to get or set a value without encryption.