Skip to content
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

Add KeeAgent (SSH keys) support #8

Open
mfrischknecht opened this issue May 2, 2018 · 2 comments
Open

Add KeeAgent (SSH keys) support #8

mfrischknecht opened this issue May 2, 2018 · 2 comments

Comments

@mfrischknecht
Copy link

Hi @firecat53,

first off: I found this little gem while looking for Keepass-based autotyping solutions that work on wayland, and I was blown away. Keepmenu is amazing! Thank you very much for sharing it! :)

There is only one feature I found missing for me so far: I still have to open KeepassXC in the background in order for my SSH-Keys to be added to my ssh-agent session. It'd be great if keepmenu could do this part, too.

In order to avoid appearing like a total freeloader, I've had a look into how the SSH Agent protocol and the KeeAgent settings work and come up with my own little prototype to deal with them. I've checked them in over at: https://github.com/mfrischknecht/python-keeagent

There are some caveats with this prototype so far, but on the whole, it seems to work. Since I had problems with pycryptodome (and pycrypto itself is hopelessly out of date), pyca/cryptography to me seemed like the best library option to deal with the key files. It can't deal with ed25519 keys (yet), but I have my hopes up that this will change soon. However, the dependency on pyca/cryptography would mean that python 3.2 and 3.3 wouldn't be supported anymore. Also, I've only tested the KeeAgent code on Keepass databases of version 4.x (created by KeepassXC) so far, but for those, it seems to work nicely. Also, so far, my prototype is read-only for those entries.

I've also found this site which details the option to store binaries in the 'inner header' of Keepass databases, but I haven't been able to figure out how to access that one so far.

Would you consider integrating KeeAgent-functionality into keepmenu anyway? If so, should I attempt to prepare a pull request for that?

Cheers,
Manuel

@firecat53
Copy link
Owner

Thanks so much for the kind words!

This actually seems to me like functionality that would be better placed as part of the pykeepass project. I prefer my dmenu wrappers to be relatively focused on wrapping existing tools into the dmenu interface rather than including the tools in the wrapper.

It's a great idea, and I definitely think you should open a discussion with the pykeepass folks. If you can get it merged there, l'll definitely work on adding that interface to keepmenu.

@mfrischknecht
Copy link
Author

mfrischknecht commented May 24, 2018

Sorry for my late answer; I haven't gotten much time for private projects lately.

Regarding inclusion into pykeepass: I'm not sure if the SSH stuff would actually qualify for that library's scope -- but reading and manipulating binaries in Keepass files seems like it would belong in there. I'll see if I can come up with some less hackish way and if the autors would like to merge that. I'll have to look into some differences between the formats though, so it will still take a while given my time budget :)

For the SSH part, I'm wondering if it would be worth maintaining it in a separate little library (one that basically only implements the part of ssh-add).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants