Keepassxc: Support multiple urls per entry [$30 awarded]

Created on 15 Mar 2017  路  39Comments  路  Source: keepassxreboot/keepassxc

Hey,

is it possible to add multiple urls to a single entry?
Maybe a cool feature?
(Working with passiFox)

Greetings Kaito

bounty new feature Auto-Type Browser integration

Most helpful comment

Work is in progress: https://github.com/varjolintu/keepassxc/tree/feature/multiple_urls if you want to try it, but it's not ready for an official PR yet.

For now, the URL's can be added/edited/removed via the new Browser Integration page under Entry settings. But it's also fine to add the custom attributes manually. This list reads the KP2A_URL attributes directly.

Screen Shot 2019-09-08 at 12 27 29

All 39 comments

You can only add one URL per entry. But you can add more as custom attributes when needed. 2.2.0 will also support references, so you create multiple entries referencing each other where only specific fields are different (e.g. the URL).

Would there be an option to show the referenced entries as simply being additional attributes in the first, so that the number of entries remains the same and everything is held together? Understand that due to the keepass compatibility that it is not possible to do this in the database, but displaying it otherwise in app would be a good workaround

Hiding entry just because they have reference seems a little confusing to me and it will be complex to implement. We already have a nice way to display Reference-entry.
Does some other KeePass-compatible program do that?

Not as far as I know, my thinking was just that if a user simply wants multiple urls for the exact same entry, we deliver that to the user, while keeping the keepass backend exactly the same.
eg
Entry: Microsoft
username: whatever
password: *
url: microsoft.com
url: live.com
url: office.com

it is the exact same account over all 3 urls, so wouldnt it make more sense to display it as a single entry to be updated and interacted with, and display one entry in keepassxc rather than 3?

We need to remain compatible with other KDBX implementations. You can of course, add multiple URLs as advanced/custom fields.

then we will need to broaden the keehttp protocol to integrate that with the extensions though, would we not?

No, this is already a feature in the http plugin. It searches the attributes for a specific key name. I believe that is in the settings

what is the standard for more than two urls? two seems fine, however you cant have more than one field with the same name, and it doesnt detect when two urls are in the same field

Looks like you create an attribute with the name of "KPH: XXXX" and the value of the URL you want to match against. XXXX can be anything

Many people mentioned that KeeFox has this feature [1][2], so I studied its implementation. Detailed descriptions with a screenshot can be found at KeeFox's wiki page. [3]

Data for additional URLs are stored in an advanced attribute "KPRPC JSON". It stores more than additional URLs.

{
    "version":1,
    "alwaysAutoFill":false,
    "neverAutoFill":false,
    "alwaysAutoSubmit":false,
    "neverAutoSubmit":false,
    "priority":0,
    "altURLs":["https://foo.com"],
    "hide":false,
    "blockedURLs":["https://bar.com"],
    "regExBlockedURLs":["https://bad.com"],
    "regExURLs":["https://good.com"],
    "blockHostnameOnlyMatch":false,
    "blockDomainOnlyMatch":false
}

The implementation can be found in keepassrpc, the backend behind KeeFox. [4]

[1] https://github.com/pfn/passifox/issues/296#issuecomment-54646160
[2] https://sourceforge.net/p/keepass/discussion/329220/thread/cb922dee/#5027
[3] https://github.com/kee-org/KeeFox/wiki/en-%7C-Using-KeeFox-%7C-Alternative-URLs
[4] https://github.com/kee-org/keepassrpc/blob/master/KeePassRPC/KeePassRPCService.cs#L1784

Another implementation submitted to pfn/keepasshttp: https://github.com/pfn/keepasshttp/pull/340

It put configurations in KeePassHttp Settings. The limitation is that it only allows one regular expression.

Since this KeePassHttp thing is dying (#913) and KeePassXC-Browser is here I'd like to ask if this feature has a chance to be implemented?
I'd really like to be able to use a single entry from multiple urls since the websites are using the same
database.

I know I could create multiple entries that use references, but that would generate redundant entries that only vary in the URL which doesn't feel "right" for me.

It would also be totally fine to me if keepassxc-browser could use the additional properties for the lookup so I could add these urls there. By this the entry would still contain only one URL which is opened by keepassxc but the browser plugin could find the same entry for other urls, too.

Also entries can't reference custom fields, so TOTP Seeds needs to be duplicated. I think it would be better to support multiple urls via some additional setting like KPH: urls which could be multiline

I created a proof-of-concept patch at https://github.com/keepassxreboot/keepassxc/pull/1769. I'll be glad to hear some feedback :)

What about just supporting the scheme KeeFox (now Kee) uses? I don't know if I am the only one, but I am extensibly making use of KeeFox' multi URL feature, and having to replicate all of that for KeePassXC would be a bit frustrating. Why can't KeeKassXC re-use what is already there?

Can you link us to this scheme? There is literally nothing in the KDBX scheme that supports this feature. It is a custom job no matter what.

Can you link us to this scheme?

https://github.com/keepassxreboot/keepassxc/issues/398#issuecomment-326755012

Quite near :)

Oh lol

I think we can implement multiple URLs quite easily. Just add new URL fields and add a counter to their name. In other implementations, they will just appear as additional string fields. The KeeFox implementation is extremely ugly, though.

I started a bounty https://www.bountysource.com/issues/43057047-support-multiple-urls-per-entry please join in if you would like to see this feature.

I saw this on BountySource and I am gonna give my best shot at solving this!

@austinprog Great thanks!

@austinprog Just a tip, we want to make sure the eventual solution is fully compatible with the template system. See #863

Thanks! I just got the build up and working on my Debian VM. I am currently exploring the code base and understanding how it all works. I will look at #863 shortly. I also will be hopping on the IRC soon to chat

Alternatively, we could support a flexible "URL" field that defaults to a size of 1 and has a "+" button to add more which are stored as additional attributes. This would apply anywhere a "URL" field is requested and operate the same across templates.

Quick mockup I made:

image

@droidmonkey and everyone else
That seems like a good mockup. I will try to implement it the way you mentioned in your diagram. I am starting to understand the code base a little better and hopefully will start working on a fix in the next few days. :)

I hate to say this but I believe that this issue might be a little out of my skill level at the moment. I am sorry. Therefore, I am relinquishing my request to fix this and someone else and can try. :)

@austinprog Thanks for trying! I plan to offer some other bounties on this add-on so maybe there will be another chance.

The above mockup seems it like it could become cluttered UI wise if there are many URLs.

Is there a way to expand the URL field by adding a dropdown arrow so that when clicked it becomes a Notes like field where each new line can take a URL?

Interesting idea!

https://github.com/keepassxreboot/keepassxc/pull/3444 could be expanded in the future to hold multiple URL's for a single entry, just for browser extension use. Those URL's could be saved to custom data instead of attributes.

3444 could be expanded in the future to hold multiple URL's for a single entry, just for browser extension use. Those URL's could be saved to custom data instead of attributes.

Glad to hear that!

However, I think #3444 will not be compatible with templates mentioned in https://github.com/keepassxreboot/keepassxc/issues/398#issuecomment-489799372? Templates use attributes instead of custom data (https://github.com/keepassxreboot/keepassxc/issues/863#issuecomment-476537687).

I think #3444 is a better approach as in templates the number of fields is fixed, while the number of extra URLs should be flexible.

If #3444 is the way to go, I might check if it's possible to import data from Keepass2Android (https://github.com/keepassxreboot/keepassxc/issues/863#issuecomment-524256307) and KeeFox (https://github.com/keepassxreboot/keepassxc/issues/398#issuecomment-326755012).

Maybe it's the attributes then, so everything would be compatible with the templates.

I think it's really important to be compatible with Keepass2Android because many users will use the same database on PC and Android.

I agree. Supporting KP2A_URL and KP2A_URL_[counter] directly would do the job.

Work is in progress: https://github.com/varjolintu/keepassxc/tree/feature/multiple_urls if you want to try it, but it's not ready for an official PR yet.

For now, the URL's can be added/edited/removed via the new Browser Integration page under Entry settings. But it's also fine to add the custom attributes manually. This list reads the KP2A_URL attributes directly.

Screen Shot 2019-09-08 at 12 27 29

Great thanks @varjolintu . I don't have my own build environment set up so I can't try it yet but as soon as there is a built release I would be very happy to try it.

There is a bounty in your future!

It's very nice many thanks @varjolintu

Was this page helpful?
0 / 5 - 0 ratings