-
Notifications
You must be signed in to change notification settings - Fork 62
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 running shell commands for getting passwords #315
Conversation
@osa1 What is the status on this PR? I would really like to run tiny without storing my password directly in the config 😄 |
@kmaasrud I'm a bit low on bandwidth but I have time this week to make some progress. Maybe we can finish this. Before implementing, there are some design questions to answer though.
We have two options:
I feel like (1) should be good enough, and it will certainly make the implementation simpler. I think the syntax ( |
+1 on this---it sounds like a very good solution to the problem! Better to keep it simple where possible. |
I think this is done, just need to update README, CHANGELOG, and commit message. However I'm having trouble using this feature. If I use
But when I run Once I run the Does anyone know why this happens? |
@osa1 Some environment variable that the binary cannot access? Have you tested with different password commands (e.g., a simple echo?) |
Yeah, simple commands like We should figure out how to make this work with |
I just tried and it works for me with the The keyring unlock pops up and I type my unlock password and then it starts |
Using |
I just tried this on my Linux system and it also works there. I will merge this today, we can debug any platform-specific issues later. |
README.md
Outdated
@@ -108,23 +108,21 @@ join require identification. To use this method enter your nick password to the | |||
|
|||
### Using external commands for passwords | |||
|
|||
When a password field in the config file starts with `$`, tiny uses rest of the | |||
field as the shell command to run to get the password. | |||
When a password field in the config file is a map with a `cmd` key, the value |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we update the sample config.yml
too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We show an example in the README so I'm not sure if it's necessary.
Awesome work, @osa1! Thanks for fixing this so quickly 😄 |
Password fields can now be a map with a
command
key and a string value. Thevalue is used the shell command to run to get the password.
To keep things simple, all external commands are run on startup.
Fixes #246