Tusk icon indicating copy to clipboard operation
Tusk copied to clipboard

Multiple URLs

Open ckotte opened this issue 7 years ago • 14 comments
trafficstars

This issue is a

  • [ ] bug
  • [x] feature
  • [x] question

Please describe how you think it should change.

I have some entries that require multiple URLs. For example, same (Active Directory) user account for multiple web sites. Is it possible to read an additional URL from a custom field?

I know that I can also clone the entry and use references for username and password, but I would like to avoid that.

ckotte avatar Jan 27 '18 18:01 ckotte

I'd accept a pull request, but this isn't something I'll probably work on myself.

This is more of a KeePass core function than a Tusk one - ChromeIPass for example wouldn't give you this feature unless it were implemented in KeePassXC.

What I will consider is taking into account information in the "Notes" field when making suggestions. So if you wanted to put "corporate.email.domain" in your notes, in lieu of an exact match, it could take this into consideration.

Thanks for the suggestion. I'll think about how/if this should be supported.

subdavis avatar Jan 28 '18 03:01 subdavis

Looks like there's no such feature in KeePass core / KDBX / KeePassXC yet [1][5]. The only official procedure is to clone the entry and use references [2][3].

The add-on Kee uses a custom JSON object [1]. KeePassHttp/ChromeIPass can at least read custom attributes that start with KPH: [4], but I couldn't find any information if this works with additional URLs.

I think the only way to enable such a feature with Tusk without using references would be to create a custom solution with custom attributes like TUSK_URL1, TUSK_URL2, etc. and search all entries for matching URLs in those fields.

[1] https://github.com/keepassxreboot/keepassxc/issues/398 [2] https://github.com/keepassxreboot/keepassxc/issues/274 [3] https://github.com/keepassxreboot/keepassxc/issues/75 [4] https://github.com/pfn/keepasshttp [5] https://github.com/pfn/keepasshttp/pull/340

ckotte avatar Jan 28 '18 14:01 ckotte

Your research is uncommon and appreciated. The implementation you're suggesting is completely reasonable

I'm in the middle of adding Yubikey HMAC-SHA1 Challenge Response to support the feature from KeePassXC. Once that work is done, I'll take a look at this.

subdavis avatar Jan 28 '18 16:01 subdavis

Welcome.

Looks like it's a bit difficult to introduce enhancements like this to other implementations of KeePass if it's not included in the Windows version that looks like to be the "KeePass standard".

The good thing, however, is that the username and password referencing works with all implementations I'm using (KeePassXC, Tusk, Keepass2Android, and MacPass)...

[KeePassXC] https://github.com/keepassxreboot/keepassxc/issues/863 [Keepass2Android] https://github.com/PhilippC/keepass2android/issues/227

ckotte avatar Jan 28 '18 19:01 ckotte

@ckotte #87 submitted. I'll let you take a quick look to be sure that will satisfy your use case.

Thanks for the suggestion.

subdavis avatar Jan 30 '18 03:01 subdavis

@subdavis

Sorry for the late response.

Looks good. However, I didn't check your code ;-)

I assume it uses the same matching logic,right? A tab with "https://github.com/subdavis/Tusk/issues/85" would match TUSK_URLS "https://github.com/login?return_to=%2Ffniephaus%2Falfred-homebrew, www.amazon.com,www.google.com"?

ckotte avatar Jan 31 '18 20:01 ckotte

On the web store now. Going to close this out.

subdavis avatar Feb 01 '18 04:02 subdavis

Now that we have working reference resolving in the extension is it possible to remove this TUSK_URLs - maybe with a warning to all users still using it in a future version. My reasoning is that we should strive to make the client as cross-compatible as possible and not add extension specific fields if not necessary. Multiple entries with references seems to be more the Original KeePass way.

zmilonas avatar Sep 23 '18 11:09 zmilonas

Sorry, @zmilonas, I'm not totally sure how references help with this problem.

Could you give me an example of >1 entries with references would be helpful here? Is the idea to refer to them in the normal URL field? Wouldn't this break most other implementations, since those aren't expecting comma-separated urls?

I like the idea of full cross compatibility.

subdavis avatar Sep 23 '18 13:09 subdavis

I like the idea of full cross compatibility.

I tried asked the developers of Keepass2Android and KeepassXC about a common solution. No luck. Everyone uses an own implementation. E.g. Keepass2Android uses KP2A_URL" or "KP2A_URL_[counter]"...

ckotte avatar Sep 23 '18 14:09 ckotte

How about using this? https://superuser.com/a/434046

zmilonas avatar Sep 23 '18 14:09 zmilonas

How about using this? https://superuser.com/a/434046

This doesn't work in KeepassXC as far as I remember.

ckotte avatar Sep 23 '18 14:09 ckotte

@zmilonas I didn't realize you meant having a standalone entry for each URL. That would definitely work for tusk under the right conditions, but in most cases I think it would result in duplicates in the URL list unless the new strict mode was on.

I think TUSK_URLS is easier for most folks to grasp, and it's less work for what is ultimately an edge case. I think another approach is to simply support other's standards. It wouldn't be much trouble to use KP2A_URL in addition to or instead of TUSK_URLS. That might be nice.

subdavis avatar Sep 23 '18 14:09 subdavis

How about using this? https://superuser.com/a/434046

This doesn't work in KeepassXC as far as I remember.

Looks like it does https://github.com/keepassxreboot/keepassxc/issues/75

As you yourself @ckotte admitted:

The good thing, however, is that the username and password referencing works with all implementations I'm using (KeePassXC, Tusk, Keepass2Android, and MacPass)...

So my question is again why can't those who want to use multiple URLs for entries duplicate them with references to username na password and only update the url in the duplicate?

As stated in the original issue:

Looks like there's no such feature in KeePass core / KDBX / KeePassXC yet [1][5]. The only official procedure is to clone the entry and use references [2][3].

Which is kind of agains what @subdavis and I believe in:

I like the idea of full cross compatibility.

So creating properiaty fields whould distance us from this.

We can create another issue for supporting custom fields for other implementation/forks, as we already do for some with keeweb. I would oppose adding/keeping custom fields in Tusk

@subdavis should we create an issue for deprecation of TUSK_URL?

zmilonas avatar Sep 24 '18 07:09 zmilonas