envkey 1.1.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +2 -1
- data/ext/envkey-fetch_1.2.0_darwin_386/LICENSE +21 -0
- data/ext/envkey-fetch_1.2.0_darwin_386/README.md +86 -0
- data/ext/{envkey-fetch_1.1.0_darwin_amd64 → envkey-fetch_1.2.0_darwin_386}/envkey-fetch +0 -0
- data/ext/envkey-fetch_1.2.0_darwin_amd64/LICENSE +21 -0
- data/ext/envkey-fetch_1.2.0_darwin_amd64/README.md +86 -0
- data/ext/envkey-fetch_1.2.0_darwin_amd64/envkey-fetch +0 -0
- data/ext/envkey-fetch_1.2.0_freebsd_386/LICENSE +21 -0
- data/ext/envkey-fetch_1.2.0_freebsd_386/README.md +86 -0
- data/ext/{envkey-fetch_1.1.0_linux_amd64 → envkey-fetch_1.2.0_freebsd_386}/envkey-fetch +0 -0
- data/ext/envkey-fetch_1.2.0_freebsd_amd64/LICENSE +21 -0
- data/ext/envkey-fetch_1.2.0_freebsd_amd64/README.md +86 -0
- data/ext/envkey-fetch_1.2.0_freebsd_amd64/envkey-fetch +0 -0
- data/ext/envkey-fetch_1.2.0_linux_386/LICENSE +21 -0
- data/ext/envkey-fetch_1.2.0_linux_386/README.md +86 -0
- data/ext/{envkey-fetch_1.1.0_windows_amd64/envkey-fetch.exe → envkey-fetch_1.2.0_linux_386/envkey-fetch} +0 -0
- data/ext/envkey-fetch_1.2.0_linux_amd64/LICENSE +21 -0
- data/ext/envkey-fetch_1.2.0_linux_amd64/README.md +86 -0
- data/ext/envkey-fetch_1.2.0_linux_amd64/envkey-fetch +0 -0
- data/ext/envkey-fetch_1.2.0_windows_386/LICENSE +21 -0
- data/ext/envkey-fetch_1.2.0_windows_386/README.md +86 -0
- data/ext/{envkey-fetch_1.1.0_freebsd_amd64/envkey-fetch → envkey-fetch_1.2.0_windows_386/envkey-fetch.exe} +0 -0
- data/ext/envkey-fetch_1.2.0_windows_amd64/LICENSE +21 -0
- data/ext/envkey-fetch_1.2.0_windows_amd64/README.md +86 -0
- data/ext/envkey-fetch_1.2.0_windows_amd64/envkey-fetch.exe +0 -0
- data/lib/envkey/core.rb +3 -0
- data/lib/envkey/fetch.rb +1 -1
- data/lib/envkey/version.rb +2 -2
- metadata +26 -10
- data/ext/envkey-fetch_1.1.0_darwin_386/envkey-fetch +0 -0
- data/ext/envkey-fetch_1.1.0_freebsd_386/envkey-fetch +0 -0
- data/ext/envkey-fetch_1.1.0_linux_386/envkey-fetch +0 -0
- data/ext/envkey-fetch_1.1.0_windows_386/envkey-fetch.exe +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 37d3273c75bbc272c06272f8a846aa33169e8af59b517491eaa61ff242c99cc3
|
|
4
|
+
data.tar.gz: 88dc47e530b90075b292367f664e186cae4792ac883912444f204833eeee02c9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ce41ad70c86b3d583ba198a270a7092a5c91896377457312c39c1b08cb8c5ef83b977f51122946615db92b84f100cbbd20432e4343daffcd32da8398308a35fc
|
|
7
|
+
data.tar.gz: de881f65f3a0f648dafc5fe887a6136cd69d5360efab6550e0a864b811b88ce7466d2cb646c8d0eacfd0d8d36ca28e35c576412103c881a40b5f9e526424a15e
|
data/.gitignore
CHANGED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright © 2017 Envkey Inc. <support@envkey.com>
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# envkey-fetch
|
|
2
|
+
|
|
3
|
+
This library contains [EnvKey](https://www.envkey.com)'s core cross-platform fetching, decryption, verification, web of trust, redundancy, and caching logic. It accepts an `ENVKEY` generated by the [EnvKey App](https://www.github.com/envkey/envkey-app) and returns decrypted configuration for a specific app environment as json.
|
|
4
|
+
|
|
5
|
+
It is used by EnvKey's various Client Libraries, including [envkey-source](https://github.com/envkey/envkey-source) for bash, [envkey-ruby](https://github.com/envkey/envkey-ruby) for Ruby and Rails, [envkey-python](https://github.com/envkey/envkey-python) for Python, [envkey-node](https://github.com/envkey/envkey-node) for Node.js, and [envkeygo](https://github.com/envkey/envkeygo) for Go.
|
|
6
|
+
|
|
7
|
+
If you want to build an EnvKey library in a language that isn't yet officially supported, build some other type of integration, or simply play around with EnvKey on the command line, envkey-fetch is the library for you. If you just want to integrate EnvKey with your project, check out one of the aforementioned higher level libraries.
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
envkey-fetch compiles into a simple static binary with no dependencies, which makes installation a simple matter of fetching the right binary for your platform and putting it in your `PATH`. An `install.sh` script is available to simplify this.
|
|
12
|
+
|
|
13
|
+
**Install via bash:**
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
curl -s https://raw.githubusercontent.com/envkey/envkey-fetch/master/install.sh | bash
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
**Install manually:**
|
|
20
|
+
|
|
21
|
+
Find the [release](https://github.com/envkey/envkey-fetch/releases) for your platform and architecture, and stick the appropriate binary somewhere in your `PATH` (or wherever you like really).
|
|
22
|
+
|
|
23
|
+
**Install from source:**
|
|
24
|
+
|
|
25
|
+
With Go installed, clone the project into your `GOPATH`. `cd` into the directory and run `go get` and `go build`.
|
|
26
|
+
|
|
27
|
+
**Cross-compile from source:**
|
|
28
|
+
|
|
29
|
+
To compile cross-platform binaries, make sure Go is installed, then install [goreleaser](https://goreleaser.com/) - follow instructions in the docs to do so.
|
|
30
|
+
|
|
31
|
+
Then to cross-compile, run:
|
|
32
|
+
|
|
33
|
+
`goreleaser`
|
|
34
|
+
|
|
35
|
+
Binaries for each platform will be output to the `dist` folder.
|
|
36
|
+
|
|
37
|
+
## Usage
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
envkey-fetch YOUR-ENVKEY [flags]
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
This will either write your the app environment's configuration associated with your `ENVKEY` as json to stdout or write an error message beginning with `error:` to stdout.
|
|
44
|
+
|
|
45
|
+
### Example json output
|
|
46
|
+
|
|
47
|
+
```json
|
|
48
|
+
{"TEST":"it","TEST_2":"works!"}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Example error output
|
|
52
|
+
|
|
53
|
+
```text
|
|
54
|
+
error: ENVKEY invalid
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Flags
|
|
58
|
+
|
|
59
|
+
```text
|
|
60
|
+
--cache cache encrypted config as a local backup (default is false)
|
|
61
|
+
--cache-dir string cache directory (default is $HOME/.envkey/cache)
|
|
62
|
+
-h, --help help for envkey-fetch
|
|
63
|
+
-v, --version prints the version
|
|
64
|
+
--verbose print verbose output (default is false)
|
|
65
|
+
--timeout float timeout in seconds for http requests (default 2)
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Further Reading
|
|
69
|
+
|
|
70
|
+
For more on EnvKey in general:
|
|
71
|
+
|
|
72
|
+
Read the [docs](https://docs.envkey.com).
|
|
73
|
+
|
|
74
|
+
Read the [integration quickstart](https://docs.envkey.com/integration-quickstart.html).
|
|
75
|
+
|
|
76
|
+
Read the [security and cryptography overview](https://security.envkey.com).
|
|
77
|
+
|
|
78
|
+
## Need help? Have questions, feedback, or ideas?
|
|
79
|
+
|
|
80
|
+
Post an [issue](https://github.com/envkey/envkey-fetch/issues) or email us: [support@envkey.com](mailto:support@envkey.com).
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
Binary file
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright © 2017 Envkey Inc. <support@envkey.com>
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# envkey-fetch
|
|
2
|
+
|
|
3
|
+
This library contains [EnvKey](https://www.envkey.com)'s core cross-platform fetching, decryption, verification, web of trust, redundancy, and caching logic. It accepts an `ENVKEY` generated by the [EnvKey App](https://www.github.com/envkey/envkey-app) and returns decrypted configuration for a specific app environment as json.
|
|
4
|
+
|
|
5
|
+
It is used by EnvKey's various Client Libraries, including [envkey-source](https://github.com/envkey/envkey-source) for bash, [envkey-ruby](https://github.com/envkey/envkey-ruby) for Ruby and Rails, [envkey-python](https://github.com/envkey/envkey-python) for Python, [envkey-node](https://github.com/envkey/envkey-node) for Node.js, and [envkeygo](https://github.com/envkey/envkeygo) for Go.
|
|
6
|
+
|
|
7
|
+
If you want to build an EnvKey library in a language that isn't yet officially supported, build some other type of integration, or simply play around with EnvKey on the command line, envkey-fetch is the library for you. If you just want to integrate EnvKey with your project, check out one of the aforementioned higher level libraries.
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
envkey-fetch compiles into a simple static binary with no dependencies, which makes installation a simple matter of fetching the right binary for your platform and putting it in your `PATH`. An `install.sh` script is available to simplify this.
|
|
12
|
+
|
|
13
|
+
**Install via bash:**
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
curl -s https://raw.githubusercontent.com/envkey/envkey-fetch/master/install.sh | bash
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
**Install manually:**
|
|
20
|
+
|
|
21
|
+
Find the [release](https://github.com/envkey/envkey-fetch/releases) for your platform and architecture, and stick the appropriate binary somewhere in your `PATH` (or wherever you like really).
|
|
22
|
+
|
|
23
|
+
**Install from source:**
|
|
24
|
+
|
|
25
|
+
With Go installed, clone the project into your `GOPATH`. `cd` into the directory and run `go get` and `go build`.
|
|
26
|
+
|
|
27
|
+
**Cross-compile from source:**
|
|
28
|
+
|
|
29
|
+
To compile cross-platform binaries, make sure Go is installed, then install [goreleaser](https://goreleaser.com/) - follow instructions in the docs to do so.
|
|
30
|
+
|
|
31
|
+
Then to cross-compile, run:
|
|
32
|
+
|
|
33
|
+
`goreleaser`
|
|
34
|
+
|
|
35
|
+
Binaries for each platform will be output to the `dist` folder.
|
|
36
|
+
|
|
37
|
+
## Usage
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
envkey-fetch YOUR-ENVKEY [flags]
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
This will either write your the app environment's configuration associated with your `ENVKEY` as json to stdout or write an error message beginning with `error:` to stdout.
|
|
44
|
+
|
|
45
|
+
### Example json output
|
|
46
|
+
|
|
47
|
+
```json
|
|
48
|
+
{"TEST":"it","TEST_2":"works!"}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Example error output
|
|
52
|
+
|
|
53
|
+
```text
|
|
54
|
+
error: ENVKEY invalid
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Flags
|
|
58
|
+
|
|
59
|
+
```text
|
|
60
|
+
--cache cache encrypted config as a local backup (default is false)
|
|
61
|
+
--cache-dir string cache directory (default is $HOME/.envkey/cache)
|
|
62
|
+
-h, --help help for envkey-fetch
|
|
63
|
+
-v, --version prints the version
|
|
64
|
+
--verbose print verbose output (default is false)
|
|
65
|
+
--timeout float timeout in seconds for http requests (default 2)
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Further Reading
|
|
69
|
+
|
|
70
|
+
For more on EnvKey in general:
|
|
71
|
+
|
|
72
|
+
Read the [docs](https://docs.envkey.com).
|
|
73
|
+
|
|
74
|
+
Read the [integration quickstart](https://docs.envkey.com/integration-quickstart.html).
|
|
75
|
+
|
|
76
|
+
Read the [security and cryptography overview](https://security.envkey.com).
|
|
77
|
+
|
|
78
|
+
## Need help? Have questions, feedback, or ideas?
|
|
79
|
+
|
|
80
|
+
Post an [issue](https://github.com/envkey/envkey-fetch/issues) or email us: [support@envkey.com](mailto:support@envkey.com).
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
Binary file
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright © 2017 Envkey Inc. <support@envkey.com>
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# envkey-fetch
|
|
2
|
+
|
|
3
|
+
This library contains [EnvKey](https://www.envkey.com)'s core cross-platform fetching, decryption, verification, web of trust, redundancy, and caching logic. It accepts an `ENVKEY` generated by the [EnvKey App](https://www.github.com/envkey/envkey-app) and returns decrypted configuration for a specific app environment as json.
|
|
4
|
+
|
|
5
|
+
It is used by EnvKey's various Client Libraries, including [envkey-source](https://github.com/envkey/envkey-source) for bash, [envkey-ruby](https://github.com/envkey/envkey-ruby) for Ruby and Rails, [envkey-python](https://github.com/envkey/envkey-python) for Python, [envkey-node](https://github.com/envkey/envkey-node) for Node.js, and [envkeygo](https://github.com/envkey/envkeygo) for Go.
|
|
6
|
+
|
|
7
|
+
If you want to build an EnvKey library in a language that isn't yet officially supported, build some other type of integration, or simply play around with EnvKey on the command line, envkey-fetch is the library for you. If you just want to integrate EnvKey with your project, check out one of the aforementioned higher level libraries.
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
envkey-fetch compiles into a simple static binary with no dependencies, which makes installation a simple matter of fetching the right binary for your platform and putting it in your `PATH`. An `install.sh` script is available to simplify this.
|
|
12
|
+
|
|
13
|
+
**Install via bash:**
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
curl -s https://raw.githubusercontent.com/envkey/envkey-fetch/master/install.sh | bash
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
**Install manually:**
|
|
20
|
+
|
|
21
|
+
Find the [release](https://github.com/envkey/envkey-fetch/releases) for your platform and architecture, and stick the appropriate binary somewhere in your `PATH` (or wherever you like really).
|
|
22
|
+
|
|
23
|
+
**Install from source:**
|
|
24
|
+
|
|
25
|
+
With Go installed, clone the project into your `GOPATH`. `cd` into the directory and run `go get` and `go build`.
|
|
26
|
+
|
|
27
|
+
**Cross-compile from source:**
|
|
28
|
+
|
|
29
|
+
To compile cross-platform binaries, make sure Go is installed, then install [goreleaser](https://goreleaser.com/) - follow instructions in the docs to do so.
|
|
30
|
+
|
|
31
|
+
Then to cross-compile, run:
|
|
32
|
+
|
|
33
|
+
`goreleaser`
|
|
34
|
+
|
|
35
|
+
Binaries for each platform will be output to the `dist` folder.
|
|
36
|
+
|
|
37
|
+
## Usage
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
envkey-fetch YOUR-ENVKEY [flags]
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
This will either write your the app environment's configuration associated with your `ENVKEY` as json to stdout or write an error message beginning with `error:` to stdout.
|
|
44
|
+
|
|
45
|
+
### Example json output
|
|
46
|
+
|
|
47
|
+
```json
|
|
48
|
+
{"TEST":"it","TEST_2":"works!"}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Example error output
|
|
52
|
+
|
|
53
|
+
```text
|
|
54
|
+
error: ENVKEY invalid
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Flags
|
|
58
|
+
|
|
59
|
+
```text
|
|
60
|
+
--cache cache encrypted config as a local backup (default is false)
|
|
61
|
+
--cache-dir string cache directory (default is $HOME/.envkey/cache)
|
|
62
|
+
-h, --help help for envkey-fetch
|
|
63
|
+
-v, --version prints the version
|
|
64
|
+
--verbose print verbose output (default is false)
|
|
65
|
+
--timeout float timeout in seconds for http requests (default 2)
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Further Reading
|
|
69
|
+
|
|
70
|
+
For more on EnvKey in general:
|
|
71
|
+
|
|
72
|
+
Read the [docs](https://docs.envkey.com).
|
|
73
|
+
|
|
74
|
+
Read the [integration quickstart](https://docs.envkey.com/integration-quickstart.html).
|
|
75
|
+
|
|
76
|
+
Read the [security and cryptography overview](https://security.envkey.com).
|
|
77
|
+
|
|
78
|
+
## Need help? Have questions, feedback, or ideas?
|
|
79
|
+
|
|
80
|
+
Post an [issue](https://github.com/envkey/envkey-fetch/issues) or email us: [support@envkey.com](mailto:support@envkey.com).
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
Binary file
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright © 2017 Envkey Inc. <support@envkey.com>
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# envkey-fetch
|
|
2
|
+
|
|
3
|
+
This library contains [EnvKey](https://www.envkey.com)'s core cross-platform fetching, decryption, verification, web of trust, redundancy, and caching logic. It accepts an `ENVKEY` generated by the [EnvKey App](https://www.github.com/envkey/envkey-app) and returns decrypted configuration for a specific app environment as json.
|
|
4
|
+
|
|
5
|
+
It is used by EnvKey's various Client Libraries, including [envkey-source](https://github.com/envkey/envkey-source) for bash, [envkey-ruby](https://github.com/envkey/envkey-ruby) for Ruby and Rails, [envkey-python](https://github.com/envkey/envkey-python) for Python, [envkey-node](https://github.com/envkey/envkey-node) for Node.js, and [envkeygo](https://github.com/envkey/envkeygo) for Go.
|
|
6
|
+
|
|
7
|
+
If you want to build an EnvKey library in a language that isn't yet officially supported, build some other type of integration, or simply play around with EnvKey on the command line, envkey-fetch is the library for you. If you just want to integrate EnvKey with your project, check out one of the aforementioned higher level libraries.
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
envkey-fetch compiles into a simple static binary with no dependencies, which makes installation a simple matter of fetching the right binary for your platform and putting it in your `PATH`. An `install.sh` script is available to simplify this.
|
|
12
|
+
|
|
13
|
+
**Install via bash:**
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
curl -s https://raw.githubusercontent.com/envkey/envkey-fetch/master/install.sh | bash
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
**Install manually:**
|
|
20
|
+
|
|
21
|
+
Find the [release](https://github.com/envkey/envkey-fetch/releases) for your platform and architecture, and stick the appropriate binary somewhere in your `PATH` (or wherever you like really).
|
|
22
|
+
|
|
23
|
+
**Install from source:**
|
|
24
|
+
|
|
25
|
+
With Go installed, clone the project into your `GOPATH`. `cd` into the directory and run `go get` and `go build`.
|
|
26
|
+
|
|
27
|
+
**Cross-compile from source:**
|
|
28
|
+
|
|
29
|
+
To compile cross-platform binaries, make sure Go is installed, then install [goreleaser](https://goreleaser.com/) - follow instructions in the docs to do so.
|
|
30
|
+
|
|
31
|
+
Then to cross-compile, run:
|
|
32
|
+
|
|
33
|
+
`goreleaser`
|
|
34
|
+
|
|
35
|
+
Binaries for each platform will be output to the `dist` folder.
|
|
36
|
+
|
|
37
|
+
## Usage
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
envkey-fetch YOUR-ENVKEY [flags]
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
This will either write your the app environment's configuration associated with your `ENVKEY` as json to stdout or write an error message beginning with `error:` to stdout.
|
|
44
|
+
|
|
45
|
+
### Example json output
|
|
46
|
+
|
|
47
|
+
```json
|
|
48
|
+
{"TEST":"it","TEST_2":"works!"}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Example error output
|
|
52
|
+
|
|
53
|
+
```text
|
|
54
|
+
error: ENVKEY invalid
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Flags
|
|
58
|
+
|
|
59
|
+
```text
|
|
60
|
+
--cache cache encrypted config as a local backup (default is false)
|
|
61
|
+
--cache-dir string cache directory (default is $HOME/.envkey/cache)
|
|
62
|
+
-h, --help help for envkey-fetch
|
|
63
|
+
-v, --version prints the version
|
|
64
|
+
--verbose print verbose output (default is false)
|
|
65
|
+
--timeout float timeout in seconds for http requests (default 2)
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Further Reading
|
|
69
|
+
|
|
70
|
+
For more on EnvKey in general:
|
|
71
|
+
|
|
72
|
+
Read the [docs](https://docs.envkey.com).
|
|
73
|
+
|
|
74
|
+
Read the [integration quickstart](https://docs.envkey.com/integration-quickstart.html).
|
|
75
|
+
|
|
76
|
+
Read the [security and cryptography overview](https://security.envkey.com).
|
|
77
|
+
|
|
78
|
+
## Need help? Have questions, feedback, or ideas?
|
|
79
|
+
|
|
80
|
+
Post an [issue](https://github.com/envkey/envkey-fetch/issues) or email us: [support@envkey.com](mailto:support@envkey.com).
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
Binary file
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright © 2017 Envkey Inc. <support@envkey.com>
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# envkey-fetch
|
|
2
|
+
|
|
3
|
+
This library contains [EnvKey](https://www.envkey.com)'s core cross-platform fetching, decryption, verification, web of trust, redundancy, and caching logic. It accepts an `ENVKEY` generated by the [EnvKey App](https://www.github.com/envkey/envkey-app) and returns decrypted configuration for a specific app environment as json.
|
|
4
|
+
|
|
5
|
+
It is used by EnvKey's various Client Libraries, including [envkey-source](https://github.com/envkey/envkey-source) for bash, [envkey-ruby](https://github.com/envkey/envkey-ruby) for Ruby and Rails, [envkey-python](https://github.com/envkey/envkey-python) for Python, [envkey-node](https://github.com/envkey/envkey-node) for Node.js, and [envkeygo](https://github.com/envkey/envkeygo) for Go.
|
|
6
|
+
|
|
7
|
+
If you want to build an EnvKey library in a language that isn't yet officially supported, build some other type of integration, or simply play around with EnvKey on the command line, envkey-fetch is the library for you. If you just want to integrate EnvKey with your project, check out one of the aforementioned higher level libraries.
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
envkey-fetch compiles into a simple static binary with no dependencies, which makes installation a simple matter of fetching the right binary for your platform and putting it in your `PATH`. An `install.sh` script is available to simplify this.
|
|
12
|
+
|
|
13
|
+
**Install via bash:**
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
curl -s https://raw.githubusercontent.com/envkey/envkey-fetch/master/install.sh | bash
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
**Install manually:**
|
|
20
|
+
|
|
21
|
+
Find the [release](https://github.com/envkey/envkey-fetch/releases) for your platform and architecture, and stick the appropriate binary somewhere in your `PATH` (or wherever you like really).
|
|
22
|
+
|
|
23
|
+
**Install from source:**
|
|
24
|
+
|
|
25
|
+
With Go installed, clone the project into your `GOPATH`. `cd` into the directory and run `go get` and `go build`.
|
|
26
|
+
|
|
27
|
+
**Cross-compile from source:**
|
|
28
|
+
|
|
29
|
+
To compile cross-platform binaries, make sure Go is installed, then install [goreleaser](https://goreleaser.com/) - follow instructions in the docs to do so.
|
|
30
|
+
|
|
31
|
+
Then to cross-compile, run:
|
|
32
|
+
|
|
33
|
+
`goreleaser`
|
|
34
|
+
|
|
35
|
+
Binaries for each platform will be output to the `dist` folder.
|
|
36
|
+
|
|
37
|
+
## Usage
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
envkey-fetch YOUR-ENVKEY [flags]
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
This will either write your the app environment's configuration associated with your `ENVKEY` as json to stdout or write an error message beginning with `error:` to stdout.
|
|
44
|
+
|
|
45
|
+
### Example json output
|
|
46
|
+
|
|
47
|
+
```json
|
|
48
|
+
{"TEST":"it","TEST_2":"works!"}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Example error output
|
|
52
|
+
|
|
53
|
+
```text
|
|
54
|
+
error: ENVKEY invalid
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Flags
|
|
58
|
+
|
|
59
|
+
```text
|
|
60
|
+
--cache cache encrypted config as a local backup (default is false)
|
|
61
|
+
--cache-dir string cache directory (default is $HOME/.envkey/cache)
|
|
62
|
+
-h, --help help for envkey-fetch
|
|
63
|
+
-v, --version prints the version
|
|
64
|
+
--verbose print verbose output (default is false)
|
|
65
|
+
--timeout float timeout in seconds for http requests (default 2)
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Further Reading
|
|
69
|
+
|
|
70
|
+
For more on EnvKey in general:
|
|
71
|
+
|
|
72
|
+
Read the [docs](https://docs.envkey.com).
|
|
73
|
+
|
|
74
|
+
Read the [integration quickstart](https://docs.envkey.com/integration-quickstart.html).
|
|
75
|
+
|
|
76
|
+
Read the [security and cryptography overview](https://security.envkey.com).
|
|
77
|
+
|
|
78
|
+
## Need help? Have questions, feedback, or ideas?
|
|
79
|
+
|
|
80
|
+
Post an [issue](https://github.com/envkey/envkey-fetch/issues) or email us: [support@envkey.com](mailto:support@envkey.com).
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
Binary file
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright © 2017 Envkey Inc. <support@envkey.com>
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# envkey-fetch
|
|
2
|
+
|
|
3
|
+
This library contains [EnvKey](https://www.envkey.com)'s core cross-platform fetching, decryption, verification, web of trust, redundancy, and caching logic. It accepts an `ENVKEY` generated by the [EnvKey App](https://www.github.com/envkey/envkey-app) and returns decrypted configuration for a specific app environment as json.
|
|
4
|
+
|
|
5
|
+
It is used by EnvKey's various Client Libraries, including [envkey-source](https://github.com/envkey/envkey-source) for bash, [envkey-ruby](https://github.com/envkey/envkey-ruby) for Ruby and Rails, [envkey-python](https://github.com/envkey/envkey-python) for Python, [envkey-node](https://github.com/envkey/envkey-node) for Node.js, and [envkeygo](https://github.com/envkey/envkeygo) for Go.
|
|
6
|
+
|
|
7
|
+
If you want to build an EnvKey library in a language that isn't yet officially supported, build some other type of integration, or simply play around with EnvKey on the command line, envkey-fetch is the library for you. If you just want to integrate EnvKey with your project, check out one of the aforementioned higher level libraries.
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
envkey-fetch compiles into a simple static binary with no dependencies, which makes installation a simple matter of fetching the right binary for your platform and putting it in your `PATH`. An `install.sh` script is available to simplify this.
|
|
12
|
+
|
|
13
|
+
**Install via bash:**
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
curl -s https://raw.githubusercontent.com/envkey/envkey-fetch/master/install.sh | bash
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
**Install manually:**
|
|
20
|
+
|
|
21
|
+
Find the [release](https://github.com/envkey/envkey-fetch/releases) for your platform and architecture, and stick the appropriate binary somewhere in your `PATH` (or wherever you like really).
|
|
22
|
+
|
|
23
|
+
**Install from source:**
|
|
24
|
+
|
|
25
|
+
With Go installed, clone the project into your `GOPATH`. `cd` into the directory and run `go get` and `go build`.
|
|
26
|
+
|
|
27
|
+
**Cross-compile from source:**
|
|
28
|
+
|
|
29
|
+
To compile cross-platform binaries, make sure Go is installed, then install [goreleaser](https://goreleaser.com/) - follow instructions in the docs to do so.
|
|
30
|
+
|
|
31
|
+
Then to cross-compile, run:
|
|
32
|
+
|
|
33
|
+
`goreleaser`
|
|
34
|
+
|
|
35
|
+
Binaries for each platform will be output to the `dist` folder.
|
|
36
|
+
|
|
37
|
+
## Usage
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
envkey-fetch YOUR-ENVKEY [flags]
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
This will either write your the app environment's configuration associated with your `ENVKEY` as json to stdout or write an error message beginning with `error:` to stdout.
|
|
44
|
+
|
|
45
|
+
### Example json output
|
|
46
|
+
|
|
47
|
+
```json
|
|
48
|
+
{"TEST":"it","TEST_2":"works!"}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Example error output
|
|
52
|
+
|
|
53
|
+
```text
|
|
54
|
+
error: ENVKEY invalid
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Flags
|
|
58
|
+
|
|
59
|
+
```text
|
|
60
|
+
--cache cache encrypted config as a local backup (default is false)
|
|
61
|
+
--cache-dir string cache directory (default is $HOME/.envkey/cache)
|
|
62
|
+
-h, --help help for envkey-fetch
|
|
63
|
+
-v, --version prints the version
|
|
64
|
+
--verbose print verbose output (default is false)
|
|
65
|
+
--timeout float timeout in seconds for http requests (default 2)
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Further Reading
|
|
69
|
+
|
|
70
|
+
For more on EnvKey in general:
|
|
71
|
+
|
|
72
|
+
Read the [docs](https://docs.envkey.com).
|
|
73
|
+
|
|
74
|
+
Read the [integration quickstart](https://docs.envkey.com/integration-quickstart.html).
|
|
75
|
+
|
|
76
|
+
Read the [security and cryptography overview](https://security.envkey.com).
|
|
77
|
+
|
|
78
|
+
## Need help? Have questions, feedback, or ideas?
|
|
79
|
+
|
|
80
|
+
Post an [issue](https://github.com/envkey/envkey-fetch/issues) or email us: [support@envkey.com](mailto:support@envkey.com).
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
Binary file
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright © 2017 Envkey Inc. <support@envkey.com>
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# envkey-fetch
|
|
2
|
+
|
|
3
|
+
This library contains [EnvKey](https://www.envkey.com)'s core cross-platform fetching, decryption, verification, web of trust, redundancy, and caching logic. It accepts an `ENVKEY` generated by the [EnvKey App](https://www.github.com/envkey/envkey-app) and returns decrypted configuration for a specific app environment as json.
|
|
4
|
+
|
|
5
|
+
It is used by EnvKey's various Client Libraries, including [envkey-source](https://github.com/envkey/envkey-source) for bash, [envkey-ruby](https://github.com/envkey/envkey-ruby) for Ruby and Rails, [envkey-python](https://github.com/envkey/envkey-python) for Python, [envkey-node](https://github.com/envkey/envkey-node) for Node.js, and [envkeygo](https://github.com/envkey/envkeygo) for Go.
|
|
6
|
+
|
|
7
|
+
If you want to build an EnvKey library in a language that isn't yet officially supported, build some other type of integration, or simply play around with EnvKey on the command line, envkey-fetch is the library for you. If you just want to integrate EnvKey with your project, check out one of the aforementioned higher level libraries.
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
envkey-fetch compiles into a simple static binary with no dependencies, which makes installation a simple matter of fetching the right binary for your platform and putting it in your `PATH`. An `install.sh` script is available to simplify this.
|
|
12
|
+
|
|
13
|
+
**Install via bash:**
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
curl -s https://raw.githubusercontent.com/envkey/envkey-fetch/master/install.sh | bash
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
**Install manually:**
|
|
20
|
+
|
|
21
|
+
Find the [release](https://github.com/envkey/envkey-fetch/releases) for your platform and architecture, and stick the appropriate binary somewhere in your `PATH` (or wherever you like really).
|
|
22
|
+
|
|
23
|
+
**Install from source:**
|
|
24
|
+
|
|
25
|
+
With Go installed, clone the project into your `GOPATH`. `cd` into the directory and run `go get` and `go build`.
|
|
26
|
+
|
|
27
|
+
**Cross-compile from source:**
|
|
28
|
+
|
|
29
|
+
To compile cross-platform binaries, make sure Go is installed, then install [goreleaser](https://goreleaser.com/) - follow instructions in the docs to do so.
|
|
30
|
+
|
|
31
|
+
Then to cross-compile, run:
|
|
32
|
+
|
|
33
|
+
`goreleaser`
|
|
34
|
+
|
|
35
|
+
Binaries for each platform will be output to the `dist` folder.
|
|
36
|
+
|
|
37
|
+
## Usage
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
envkey-fetch YOUR-ENVKEY [flags]
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
This will either write your the app environment's configuration associated with your `ENVKEY` as json to stdout or write an error message beginning with `error:` to stdout.
|
|
44
|
+
|
|
45
|
+
### Example json output
|
|
46
|
+
|
|
47
|
+
```json
|
|
48
|
+
{"TEST":"it","TEST_2":"works!"}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Example error output
|
|
52
|
+
|
|
53
|
+
```text
|
|
54
|
+
error: ENVKEY invalid
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Flags
|
|
58
|
+
|
|
59
|
+
```text
|
|
60
|
+
--cache cache encrypted config as a local backup (default is false)
|
|
61
|
+
--cache-dir string cache directory (default is $HOME/.envkey/cache)
|
|
62
|
+
-h, --help help for envkey-fetch
|
|
63
|
+
-v, --version prints the version
|
|
64
|
+
--verbose print verbose output (default is false)
|
|
65
|
+
--timeout float timeout in seconds for http requests (default 2)
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Further Reading
|
|
69
|
+
|
|
70
|
+
For more on EnvKey in general:
|
|
71
|
+
|
|
72
|
+
Read the [docs](https://docs.envkey.com).
|
|
73
|
+
|
|
74
|
+
Read the [integration quickstart](https://docs.envkey.com/integration-quickstart.html).
|
|
75
|
+
|
|
76
|
+
Read the [security and cryptography overview](https://security.envkey.com).
|
|
77
|
+
|
|
78
|
+
## Need help? Have questions, feedback, or ideas?
|
|
79
|
+
|
|
80
|
+
Post an [issue](https://github.com/envkey/envkey-fetch/issues) or email us: [support@envkey.com](mailto:support@envkey.com).
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
Binary file
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright © 2017 Envkey Inc. <support@envkey.com>
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# envkey-fetch
|
|
2
|
+
|
|
3
|
+
This library contains [EnvKey](https://www.envkey.com)'s core cross-platform fetching, decryption, verification, web of trust, redundancy, and caching logic. It accepts an `ENVKEY` generated by the [EnvKey App](https://www.github.com/envkey/envkey-app) and returns decrypted configuration for a specific app environment as json.
|
|
4
|
+
|
|
5
|
+
It is used by EnvKey's various Client Libraries, including [envkey-source](https://github.com/envkey/envkey-source) for bash, [envkey-ruby](https://github.com/envkey/envkey-ruby) for Ruby and Rails, [envkey-python](https://github.com/envkey/envkey-python) for Python, [envkey-node](https://github.com/envkey/envkey-node) for Node.js, and [envkeygo](https://github.com/envkey/envkeygo) for Go.
|
|
6
|
+
|
|
7
|
+
If you want to build an EnvKey library in a language that isn't yet officially supported, build some other type of integration, or simply play around with EnvKey on the command line, envkey-fetch is the library for you. If you just want to integrate EnvKey with your project, check out one of the aforementioned higher level libraries.
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
envkey-fetch compiles into a simple static binary with no dependencies, which makes installation a simple matter of fetching the right binary for your platform and putting it in your `PATH`. An `install.sh` script is available to simplify this.
|
|
12
|
+
|
|
13
|
+
**Install via bash:**
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
curl -s https://raw.githubusercontent.com/envkey/envkey-fetch/master/install.sh | bash
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
**Install manually:**
|
|
20
|
+
|
|
21
|
+
Find the [release](https://github.com/envkey/envkey-fetch/releases) for your platform and architecture, and stick the appropriate binary somewhere in your `PATH` (or wherever you like really).
|
|
22
|
+
|
|
23
|
+
**Install from source:**
|
|
24
|
+
|
|
25
|
+
With Go installed, clone the project into your `GOPATH`. `cd` into the directory and run `go get` and `go build`.
|
|
26
|
+
|
|
27
|
+
**Cross-compile from source:**
|
|
28
|
+
|
|
29
|
+
To compile cross-platform binaries, make sure Go is installed, then install [goreleaser](https://goreleaser.com/) - follow instructions in the docs to do so.
|
|
30
|
+
|
|
31
|
+
Then to cross-compile, run:
|
|
32
|
+
|
|
33
|
+
`goreleaser`
|
|
34
|
+
|
|
35
|
+
Binaries for each platform will be output to the `dist` folder.
|
|
36
|
+
|
|
37
|
+
## Usage
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
envkey-fetch YOUR-ENVKEY [flags]
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
This will either write your the app environment's configuration associated with your `ENVKEY` as json to stdout or write an error message beginning with `error:` to stdout.
|
|
44
|
+
|
|
45
|
+
### Example json output
|
|
46
|
+
|
|
47
|
+
```json
|
|
48
|
+
{"TEST":"it","TEST_2":"works!"}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Example error output
|
|
52
|
+
|
|
53
|
+
```text
|
|
54
|
+
error: ENVKEY invalid
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Flags
|
|
58
|
+
|
|
59
|
+
```text
|
|
60
|
+
--cache cache encrypted config as a local backup (default is false)
|
|
61
|
+
--cache-dir string cache directory (default is $HOME/.envkey/cache)
|
|
62
|
+
-h, --help help for envkey-fetch
|
|
63
|
+
-v, --version prints the version
|
|
64
|
+
--verbose print verbose output (default is false)
|
|
65
|
+
--timeout float timeout in seconds for http requests (default 2)
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Further Reading
|
|
69
|
+
|
|
70
|
+
For more on EnvKey in general:
|
|
71
|
+
|
|
72
|
+
Read the [docs](https://docs.envkey.com).
|
|
73
|
+
|
|
74
|
+
Read the [integration quickstart](https://docs.envkey.com/integration-quickstart.html).
|
|
75
|
+
|
|
76
|
+
Read the [security and cryptography overview](https://security.envkey.com).
|
|
77
|
+
|
|
78
|
+
## Need help? Have questions, feedback, or ideas?
|
|
79
|
+
|
|
80
|
+
Post an [issue](https://github.com/envkey/envkey-fetch/issues) or email us: [support@envkey.com](mailto:support@envkey.com).
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
Binary file
|
data/lib/envkey/core.rb
CHANGED
|
@@ -31,6 +31,9 @@ module Envkey::Core
|
|
|
31
31
|
end
|
|
32
32
|
|
|
33
33
|
return [Set.new(updated_dotenv_vars), Set.new(updated_envkey_vars)]
|
|
34
|
+
elsif res.start_with?("error:")
|
|
35
|
+
STDERR.puts "envkey-fetch " + res
|
|
36
|
+
raise "ENVKEY invalid. Couldn't load vars."
|
|
34
37
|
else
|
|
35
38
|
raise "ENVKEY invalid. Couldn't load vars."
|
|
36
39
|
end
|
data/lib/envkey/fetch.rb
CHANGED
|
@@ -4,7 +4,7 @@ module Envkey::Fetch
|
|
|
4
4
|
|
|
5
5
|
def self.fetch_env key
|
|
6
6
|
fetch_env_path = Envkey::Platform.fetch_env_path
|
|
7
|
-
`#{fetch_env_path} #{key}#{is_dev ? ' --cache' : ''} --client-name envkey-ruby --client-version #{Envkey::VERSION}`
|
|
7
|
+
`#{fetch_env_path} #{key}#{is_dev ? ' --cache' : ''} --client-name envkey-ruby --client-version #{Envkey::VERSION} 2>&1`
|
|
8
8
|
end
|
|
9
9
|
|
|
10
10
|
def self.is_dev
|
data/lib/envkey/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: envkey
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Dane Schneider
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-
|
|
11
|
+
date: 2018-09-14 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -83,14 +83,30 @@ files:
|
|
|
83
83
|
- bin/console
|
|
84
84
|
- bin/setup
|
|
85
85
|
- envkey.gemspec
|
|
86
|
-
- ext/envkey-fetch_1.
|
|
87
|
-
- ext/envkey-fetch_1.
|
|
88
|
-
- ext/envkey-fetch_1.
|
|
89
|
-
- ext/envkey-fetch_1.
|
|
90
|
-
- ext/envkey-fetch_1.
|
|
91
|
-
- ext/envkey-fetch_1.
|
|
92
|
-
- ext/envkey-fetch_1.
|
|
93
|
-
- ext/envkey-fetch_1.
|
|
86
|
+
- ext/envkey-fetch_1.2.0_darwin_386/LICENSE
|
|
87
|
+
- ext/envkey-fetch_1.2.0_darwin_386/README.md
|
|
88
|
+
- ext/envkey-fetch_1.2.0_darwin_386/envkey-fetch
|
|
89
|
+
- ext/envkey-fetch_1.2.0_darwin_amd64/LICENSE
|
|
90
|
+
- ext/envkey-fetch_1.2.0_darwin_amd64/README.md
|
|
91
|
+
- ext/envkey-fetch_1.2.0_darwin_amd64/envkey-fetch
|
|
92
|
+
- ext/envkey-fetch_1.2.0_freebsd_386/LICENSE
|
|
93
|
+
- ext/envkey-fetch_1.2.0_freebsd_386/README.md
|
|
94
|
+
- ext/envkey-fetch_1.2.0_freebsd_386/envkey-fetch
|
|
95
|
+
- ext/envkey-fetch_1.2.0_freebsd_amd64/LICENSE
|
|
96
|
+
- ext/envkey-fetch_1.2.0_freebsd_amd64/README.md
|
|
97
|
+
- ext/envkey-fetch_1.2.0_freebsd_amd64/envkey-fetch
|
|
98
|
+
- ext/envkey-fetch_1.2.0_linux_386/LICENSE
|
|
99
|
+
- ext/envkey-fetch_1.2.0_linux_386/README.md
|
|
100
|
+
- ext/envkey-fetch_1.2.0_linux_386/envkey-fetch
|
|
101
|
+
- ext/envkey-fetch_1.2.0_linux_amd64/LICENSE
|
|
102
|
+
- ext/envkey-fetch_1.2.0_linux_amd64/README.md
|
|
103
|
+
- ext/envkey-fetch_1.2.0_linux_amd64/envkey-fetch
|
|
104
|
+
- ext/envkey-fetch_1.2.0_windows_386/LICENSE
|
|
105
|
+
- ext/envkey-fetch_1.2.0_windows_386/README.md
|
|
106
|
+
- ext/envkey-fetch_1.2.0_windows_386/envkey-fetch.exe
|
|
107
|
+
- ext/envkey-fetch_1.2.0_windows_amd64/LICENSE
|
|
108
|
+
- ext/envkey-fetch_1.2.0_windows_amd64/README.md
|
|
109
|
+
- ext/envkey-fetch_1.2.0_windows_amd64/envkey-fetch.exe
|
|
94
110
|
- lib/envkey.rb
|
|
95
111
|
- lib/envkey/core.rb
|
|
96
112
|
- lib/envkey/fetch.rb
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|