RFC: Command line ideas #511
Replies: 2 comments 4 replies
-
|
Beta Was this translation helpful? Give feedback.
-
Something neat would be if the command line could control locking/unlocking a secret for ones that usually require auth every time. An example workflow is with Homebrew. If you have multiple private taps that you connect to over git+ssh (like I do at work), then Homebrew doesn't work out of the box because it makes all the git+ssh connections in parallel. (See: Homebrew/brew#13469) You can work around this with a series of commands. You can auth the connection with It would be really convenient to wrap that up in a little script like this
|
Beta Was this translation helpful? Give feedback.
-
Hey everyone – it's been a semi-common request for a command line interface for Secretive, so I want to put out a few ideas I've been kicking around. This is still sort of in the ideation phase where I may or may not implement this, but here's some concerns/ideas I've had so far:
Concerns
Malicious applications interfacing with Secretive
Apps shelling out to
secretive
command and creating/deleting secrets, etc. Exfiltration of secrets is still not possible in this model.Accidental creation of large amounts of secrets
A script could trivially have a for loop that creates a massive amount of secrets. I'm not confident how the SEP will deal with this – it might be fine, but it also could break the OS in pretty weird ways.
Just generally confusing
People may think that they're supposed to interact with the command line app instead of the SSH agent to perform signing commands, etc.
Proposed Model
Off by default, only enabled through protected means
The command line would not be enabled by default. Requests to the the
secretive
command line interface would return with an error code if invoked without enabling. The app could be enabled either within the main Secretive app, or possibly through a sudo command invocation to the CLI. The "enabled" state would be stored as a keychain entry (which only Secretive is allowed to write to, by the design of the keychain) so that apps could not indirectly enable this with adefaults write
command or similar.Design intent
This tool would be, at least initially, focused on a sort of "bootstrap a system" model – operations would primarily be focused on allowing this use case, vs being a full peer to the existing Secretive app.
Operations
list
List existing keys. Not sure what the right format here is for output (feedback appreciated here).create
Create keys. To avoid the "accidental creation" concern, I'm inclined to add a limit on the maximum number of keys that can be created when using the command line (possibly overridable with a--ignore-safety-limits
type argument.get-configuration
Output configuration state – basically outputting the path to the agent/similar stuff, so that the caller could use that to configure a shell.Beta Was this translation helpful? Give feedback.
All reactions