You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+36-36Lines changed: 36 additions & 36 deletions
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ brew cask install confcrypt
15
15
2. At the root of this repo, run `stack install`. (Takes 10-15 minutes.)
16
16
17
17
## Using confcrypt
18
-
- create a config
18
+
-**create a config**
19
19
`confcrypt create <filename>` creates a new empty confcrypt config named `<filename>.econf`. Internally, it looks like this:
20
20
```
21
21
# confcrypt schema
@@ -36,52 +36,52 @@ brew cask install confcrypt
36
36
# TIMEOUT_MS : Int
37
37
# TIMEOUT_MS = 300
38
38
```
39
-
- read a config
40
-
`confcrypt rsa read --key <filename> <filename>`
39
+
- **read a config**
40
+
`confcrypt rsa read --key <filename> <filename>`
41
41
This command reads in the provided file, decrypts the configuration variables using the provided key, then prints them to stdout. This allows you to pipe the results to other utilities. Returns 0 on success.
Modifies an existing configuration parameter in place, leaving all other lines unchanged.
55
55
While this isn't how it's actually implemented, this operation is equivalent to piping `confcrypt read` to a new file, editing the parameter, then reencrypting it.
56
56
`--in-place` toggles whether to overwrite the provided file or emit the results to stdout.
Checks that each config parameter matches the type of its schema. All errors are accumulated and returned at the end, with a response code equal to the number of failures.
60
60
61
-
- Using Amazon KMS instead of a local key
61
+
- **Using Amazon KMS instead of a local key**
62
62
The `rsa` command tree exists under `aws`, which changes the behavior of the `--key` parameter to represent a KMS key id rather than an on-disk rsa key file. The otherwise the semantics of the commands are identical between `rsa` and `kms` branches.
63
63
64
64
## The confcrypt file format
65
-
```
66
-
# confcrypt schema
67
-
# Configuration parameters may be either a String, Int, or Boolean
68
-
# Parameter schema take the following shape:
69
-
# schema := [term | value | comment]
70
-
# term := confname : type
71
-
# confname := [a-z,A-Z,_,0-9]
72
-
# type := String | Int | Boolean
73
-
# value := confname = String
74
-
# comment := # String
75
-
#
76
-
# For example:
77
-
# DB_CONN_STR : String
78
-
# DB_CONN_STR = Connection String
79
-
# USE_SSL : Boolean
80
-
# USE_SSL = True
81
-
# TIMEOUT_MS : Int
82
-
# TIMEOUT_MS = 300
83
-
```
65
+
```
66
+
# confcrypt schema
67
+
# Configuration parameters may be either a String, Int, or Boolean
68
+
# Parameter schema take the following shape:
69
+
# schema := [term | value | comment]
70
+
# term := confname : type
71
+
# confname := [a-z,A-Z,_,0-9]
72
+
# type := String | Int | Boolean
73
+
# value := confname = String
74
+
# comment := # String
75
+
#
76
+
# For example:
77
+
# DB_CONN_STR : String
78
+
# DB_CONN_STR = Connection String
79
+
# USE_SSL : Boolean
80
+
# USE_SSL = True
81
+
# TIMEOUT_MS : Int
82
+
# TIMEOUT_MS = 300
83
+
```
84
84
85
-
*Note* confcrypt files must end with a trailing newline.
85
+
*Note:* confcrypt files must end with a trailing newline.
86
86
87
-
While the default config created via `confcrypt new ...` places the schema on line `n` and parameters on `n+1`, there's no required ordering for the file. In fact, you can choose to entirely omit the schema and only store configuration paraemters in an `econf` file, but this will cause `confcrypt validate` to fail.
87
+
While the default config created via `confcrypt new ...` places the schema on line `n` and parameters on `n+1`, there's no required ordering for the file. In fact, you can choose to entirely omit the schema and only store configuration paraemters in an `econf` file, but this will cause `confcrypt validate` to fail.
0 commit comments