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
+10-6
Original file line number
Diff line number
Diff line change
@@ -4,20 +4,24 @@ Piggy Bank is a secrets storage tool for applications that works with NATS. Secr
4
4
5
5
A decryption key is returned from the initialization phase. If this key is lost, all of the data is unrecoverable.
6
6
7
+
## Add KV bucket
8
+
9
+
Be sure to add the KV bucket to NATS: `nats kv add piggybank`
10
+
7
11
## Example Usage
8
12
9
13
1. Start piggybank `piggybank start`
10
-
2. Initialize the database `nats req piggybank.database.initialize ""`
11
-
3. Unlock the database with key sent from step 1 `nats req piggybank.database.unlock '{"database_key": "foobar"}'`
14
+
2. Initialize the database `nats req piggybankdb.initialize ""`
15
+
3. Unlock the database with key sent from step 1 `nats req piggybankdb.unlock '{"database_key": "foobar"}'`
12
16
4. Add a secret for an application `nats req -H method:post piggybank.myapplication.registrySecret "somesecrettext"`
13
-
5. Retrieve a secret `nats req -H method:get piggybank.myapplication.registrySecret`
14
-
6. Lock the database `nats req piggybank.database.lock ""`
15
-
7. Try to retrieve the secret again `nats req -H method:get piggybank.myapplication.registrySecret`
17
+
5. Retrieve a secret `nats req -H method:get piggybank.myapplication.registrySecret ""`
18
+
6. Lock the database `nats req piggybankdb.lock ""`
19
+
7. Try to retrieve the secret again `nats req -H method:get piggybank.myapplication.registrySecret ""`
16
20
17
21
## Permissions
18
22
Permissions are defined as normal NATS subject permissions. If you have access to a subject, then you can retrieve the secrets. This means the permissions can be as granular as desired.
19
23
20
24
## Config
21
25
Piggy Bank requires a config file. It uses Cue to read the configs, but the configs can also be in json or yaml format.
0 commit comments