keepassxreboot / keepassxc

KeePassXC is a cross-platform community-driven port of the Windows application “Keepass Password Safe”.
https://keepassxc.org/
Other
20.07k stars 1.42k forks source link

Implement KeePass' Global URL Overrides feature #10887

Open taurus227 opened 3 weeks ago

taurus227 commented 3 weeks ago

Summary

Implement the Global URL Overrides feature of KeePass 2.x, that allows the user to define a command line template (with placeholders) for each URL Scheme. This would enable the user to double-click URLs with schemes like ssh://, vpn:// , ftp:// etc. and have them open in the appropriate app with the username, password, IP address, port etc. properly transferred on the command line.

Examples

If the following is defined on Windows:

URL Overrides Scheme Template
ssh: sh cmd://"C:\Program Files (x86)\Mobatek\MobaXterm\MobaXterm.exe" -newtab "sshpass -p '{PASSWORD}' ssh {USERNAME}@{URL:HOST} -p {T-REPLACE-RX:/{URL:PORT}/-1/22/}"

the KeePass entry can simply store the following:

Double-clicking the URL will open a MobaXTerm window and connect to the host at the given port (if given, otherwise port 22), logging in with the stored username and password.

Context

Implementing the Global URL Overrides feature inside KeePassXC would make this feature platform-independent, the same URL would work on Linux, Windows and MacOS, as long as the URL Overrides are defined properly on each platform. This would allow the same KeePass database to be shared between all three platforms!

There is a workaround on Windows 11, and also on Linux, but these are platform-dependent. For Windows 11 the KeePass entry should contain:

Reference

The documentation for the Global URL Overrides feature is here: