Jump to content
benjamin74

Password Protect (some) Snippets

Recommended Posts

Hello,

 

I end up storing some data inside Alfred Snippets that would really needs password protection (e.g. API keys that I very often use, etc...)

It would be really nice if we had:

- one place to store some kind of "masterpassword" inside the App preferences for example

- a checkbox when editing snippets "master password protected" yes/no
- of course these snippets would be encrypted inside my Alfredapp configuration files (that are backed up to dropbox)

Cheers,

Share this post


Link to post
Share on other sites
Posted (edited)

FWIW, you can do this with Snippet Triggers and Keychain.

 

That's how I've jury-rigged "password manager" support for apps that don't support Keychain or 1Password.

Edited by deanishe

Share this post


Link to post
Share on other sites
26 minutes ago, deanishe said:

FWIW, you can do this with Snippet Triggers and Keychain.

 

That's how I've jury-rigged "password manager" support for apps that don't support Keychain or 1Password.


Password protecting snippet is, imo, a VERY reasonable feature to have natively in alfredapp without every single user having to hack python code for such a basic functionality 😉

Plus I hate (and never use) Keychain but that's another subject.

Share this post


Link to post
Share on other sites
1 hour ago, benjamin74 said:

a basic functionality

 

Why do you think it's "basic functionality"?

 

1 hour ago, benjamin74 said:

Plus I hate (and never use) Keychain but that's another subject

 

The same can be done with the command-line clients for 1Password/Bitwarden/LastPass etc.

Share this post


Link to post
Share on other sites
Posted (edited)
2 hours ago, deanishe said:

 

Why do you think it's "basic functionality"?

 

 

The same can be done with the command-line clients for 1Password/Bitwarden/LastPass etc.

 

Because with any kind of data storage (and storing snippets belongs to that category), having the capacity to securely store that data is basic functionality or at least should have been in the specs.

Edited by benjamin74
typo

Share this post


Link to post
Share on other sites
21 hours ago, benjamin74 said:

Password protecting snippet is, imo, a VERY reasonable feature to have natively in alfredapp

 

I disagree. In years of daily visits to this forum, I don’t recall this feature request having ever been made. What I’d call a “VERY reasonable feature” is one that is:

  1. Easy to implement.
  2. Widely requested.
  3. Fits naturally into Alfred’s goals.

I’d say this ticks none of those boxes.

 

Do the other text expansion apps support that feature? I don’t remember it being there when I used TextExpander (years ago), and that app only does snippet expansion. If it’s not common to those apps, it’s not unreasonable that Alfred doesn’t support it.

 

21 hours ago, benjamin74 said:

without every single user having to hack python code for such a basic functionality

 

You can do it in one short line of bash, which I wouldn’t even call bash because you’re essentially calling the (pretty decent) Keychain command line interface.

 

Alfred can’t support every feature under the sun, that’s what Workflows are for, and this can be done with a Workflow.

Share this post


Link to post
Share on other sites
On 8/26/2019 at 8:36 PM, deanishe said:

FWIW, you can do this with Snippet Triggers and Keychain.

 

That's how I've jury-rigged "password manager" support for apps that don't support Keychain or 1Password.

 

Could you share a bit more on how you do this please? It will be good to be able to use Alfred to read a Keychain password so that I could copy and paste into a password field. I have to fill up intranet password many times a day. Yes, I can use LastPass to fill it, but that requires a few mouse click, not as fast as keyboard shortcut using Alfred. 

 

Previously, I have a Keyboard Maestro macro that will do a Cmd L to open LastPass quick look search bar, filled it with intranet and auto click the Copy Password button. A new version of LastPass two days ago broke that quick look search bar and my macro. If Alfred could do this, I would appreciate a tips on how to do it. I don’t mind entering my intranet password into Keychain. 

 

Share this post


Link to post
Share on other sites

There's a command-line Keychain client called security.


And you just use security find-generic-password -a <account> -s <service> -w to get the password. You can add a password with security add-generic-password -a <account> -s <service> -w <password>, though I usually use Keyboard Maestro to add new passwords.

 

Then you connect that up however you want. Perhaps a Snippet Trigger, or a List Filter.

 

I tend to prefer entering passwords by typing them (tell application "System Events" to keystroke "<password>") rather than using the clipboard where possible.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...