-
Notifications
You must be signed in to change notification settings - Fork 4
Description
Specification
As part of the #32 issue refactoring, we need to implement secrets write command. This command is the most basic method of writing secrets.
secrets read
secrets readThis command needs to read the contents of a secret in a vault. The contents will be outputted to stdout. Pretty much just the existing secrets get command. I don't think any changes need to be made to it.
The command takes the form of (see #242 (comment))pk secrets read [secretPath]. The output can be redirected with pk secrets read [secretPath] > some file and piping into it shouldn't do anything.
secrets write
This command needs to update or create the contents of a file. There will be two ways to provide the secret contents here. Coompared to current implementation, this pretty much is just secrets create but allows you to update a secret as well.
- Interactively via
stdin. so if you callsecrets write secretPathyou can type in you contents to the terminal and sendEOF(ctrl+d) to finish writing. - Piping data in.
In both cases the behaviour should match cat > file.
Additional context
Tasks
Implementsecrets readcommand.- Implement
secret writecommand. create tests demonstrating behaviour for read.- create tests demonstrating behaviour for write.