dlech / KeeAgent

ssh agent plugin for KeePass 2.x
http://lechnology.com/software/keeagent
Other
522 stars 35 forks source link

Uses the Title of the entry as key Comment if key Comment is not available. #355

Open KuttKatrea opened 1 year ago

KuttKatrea commented 1 year ago

Uses the Title of the entry as key Comment if key Comment is not available

dlech commented 1 year ago

What do you think about the suggestion at https://github.com/dlech/KeeAgent/issues/348#issuecomment-1225254088?

It could make sense to go with the KeePass entry title as the default but if we do that, we should add an option so that people can go back to the previous behavior if they want.

KuttKatrea commented 1 year ago

As a person that always forget to set the right comment on key creation, I like the idea of using the Keepass entry title as the comment by default, as I feel it to be more "natural" for a Keepass workflow perspective (when using auto-type with the entry selection prompt, you also see the title of the entry).

Having it optional does make even more sense, as there should be people that is more careful when creating their keys.

mplattner commented 1 year ago

I'd like to see this being merged and yes, I think an option to not using the title field probably makes sense.

dlech commented 6 months ago

Since it has been a while, can we get a recap of what problem this is solving (what are the places the user would want to see this)?

Would it be even better if we could show both the KeePass entry title and the SSH key comment instead of one or the other?

KuttKatrea commented 6 months ago

The main place the comment is important to identify the key when requesting permission to use it and when the notification when a it is used.

The main use case of this PR is to prefer to manage the "comment" of the key directly using Keepass, because it's more natural for a KeePass user to just edit the Title instead of having to download the keys, running ssh-keygen commands to rename the key, and uploading it again. This also makes easier to identify the actual KeePass entry the used key belongs to.

Im my case, and I would like to hear others opinion on this, I always forgot to set a meaningful name on the key when creating it, so it always ends up being name@hostname. So most of my keys has probably the same comment, so I don't really care to see it. But YMMV.

Having said that, the PR as it is allows to switch between using Title of entry or comment in key, but I don't see any problem in including a third option to "use both".

dlech commented 6 months ago

In my case, and I would like to hear others opinion on this,

here is one related opinion: https://github.com/dlech/KeeAgent/issues/397

dlech commented 6 months ago

In the KeeAgent window and the Select Key dialog, we already have a Source column already that shows the full "path" of the key. This includes the database name, the group and the entry title. It seems like it would be useful to reuse this pattern in case some users use the same title for all of their keys and need the group or database to differentiate.

image

KuttKatrea commented 6 months ago

I agree that it makes sense to use the same pattern used in other parts of KeeAgent, of showing both Comment and Source