Skip to content

Commit e16d56e

Browse files
committed
Update README with database changes
1 parent af7af99 commit e16d56e

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

README.md

+10-6
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,24 @@ Piggy Bank is a secrets storage tool for applications that works with NATS. Secr
44

55
A decryption key is returned from the initialization phase. If this key is lost, all of the data is unrecoverable.
66

7+
## Add KV bucket
8+
9+
Be sure to add the KV bucket to NATS: `nats kv add piggybank`
10+
711
## Example Usage
812

913
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"}'`
1216
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 ""`
1620

1721
## Permissions
1822
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.
1923

2024
## Config
2125
Piggy Bank requires a config file. It uses Cue to read the configs, but the configs can also be in json or yaml format.
2226

23-
The Cue schema is in `cmd/schema.cue`.
27+
The Cue schema is in `cmd/schema.cue`.

0 commit comments

Comments
 (0)