-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement secrets write
command
#242
Comments
Why not just go straight to Unix commands?
|
I'm following the spec you wrote out where |
The I would like |
While technically using some shell shenanigans you can use |
As discussed, the We also wouldn't need to create a new handler for this. The |
secrets read
and secrets write
commandssecrets write
command
Technically, this issue is completed, as the linked PRs have correctly implemented the spec. However, we need to convert the Do I make another issue which continues this spec, converting to I need some clarification on this. |
Using raw handlers is something we need to solve for everything at once. So we need to come up with a standard approach and apply it universally. Make a new issue for converting all the secret unix commands to using raw streaming for secret contents. Have it track everything that needs to be converted so a checklist for each command that needs to be updated. And also discuss the constraints involved for each one. For example some might just need to stream a single file such as this write command. Others needs the tar format streaming to handle a file tree or multiple files. Maybe we keep it standard across all and use the tar format for all of them? Its something that needs to be solved still. |
That makes sense. I will make that issue and use it to track the discussion for converting all the commands to start using |
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
This command needs to read the contents of a secret in a vault. The contents will be outputted tostdout
. Pretty much just the existingsecrets 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 withpk 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.stdin
. so if you callsecrets write secretPath
you can type in you contents to the terminal and sendEOF
(ctrl+d) to finish writing.In both cases the behaviour should match
cat > file
.Additional context
pk secrets *
#32Tasks
Implementsecrets read
command.secret write
command.create tests demonstrating behaviour for read.The text was updated successfully, but these errors were encountered: