command to retreive token#124
Conversation
|
It would be nice to have an option to specify hostname or URL in the key command, and use the same command for all forges. Some password databases come organized like that. |
Can you give an example of what you want ? For the moment : |
|
eg. in here You can see subprocess.check_output(['secret-tool', 'lookup', 'service', host, 'username', self.user]) That is same command used for every forge, and looked up by the 'service' tag. The 'host' argument is the host name of the forge. This is a database that is arbitrarily created like this by another tool, the secret-tool is generic tagged storage that does not itself interpret the tags in any way. |
|
Your solution still makes it possible (hopefully) to manually configure for each forge something like token = !secret-tool lookup service github.com type token or somesuch but does not provide the option to configure such command globally replacing the 'github.com' with the hostname of the forge. |
|
the command has now the environment so your example can be written as: token = !secret-tool lookup service $FORGE_DOMAIN type token |
closes #67
Instead of storing a token in plain text, a config entry can now reference a shell command prefixed with !. The command is executed at runtime and its stdout is used as the token, enabling integration with password managers such as
rbworpass.forge auth logingains a Ctrl+E shortcut at the token prompt to enter a command interactively.forge auth statusdisplays the command.