keepassxc-browser
keepassxc-browser copied to clipboard
"Search in all opened databases for matching credentials" with multiple databases and multiple browsers not happening
Expected Behavior
I use KeepassXC for private and work credentials but in different databases. I also use two different browsers, Firefox privately and Chrome for work. I have KeepassXC installed in both of them, in Firefox connected to my private database, in Chrome connected to my work databases (there are two actually, a personal one and a shared one).
Basically, both browsers' connections work but I expect them to work independent of which database is currently focussed in KeepassXC.
Also, I don't want Firefox to suggest credentials belonging to my job and Chrome not suggesting private credentials.
Current Behavior
Instead of searching in all the databases connected to the browser I need to focus on one database connected to the browser to have KeepassXC Browser suggest credentials.
Possible Solution
Without knowing the code, I guess the add-on checks if the currently selected database has been connected and denies any access if not connected. I'd suggest checking first if any database is connected and then limit the search to those connected independent of current focus.
Steps to Reproduce (for bugs)
I think my setup is mostly clear at this point.
- Install two browsers supported by KeepassXC Browser
- Create to different databases
- Connect each of the database with only one browser
- Try to have the add-on access credentials in the unfocussed database by using it in the browser not connected to the focussed database
Debug info
KeePassXC - 2.6.4 KeePassXC-Browser - 1.7.6 Operating system: Mac Browser: Chrome/Firefox
Enable the setting in keepassxc under the browser integration page to search all open databases.
Setting is enabled. I even disabled it, saved the settings, then re-enabled it. You know, sometimes a setting needs a friendly reminder ;-).
I can add that the described behaviour occurs at page loading time. When I load a page and the database containing the credentials is not focussed then switching the database does not help. Reloading the page has the add-on finding the credentials. Maybe recognizing the login fields might help, too, but reloading the page is reliable.
@MasinAD Is your second database originally a copy from the first one? You can try to set a new Root Group ID for the second database from KeePassXC's Database Settings. See if it helps.
@varjolintu It took some searching. Of course, I wanted to look first if they are the same but KeepassXC seems to hide this information. Only later I discovered that KeepassXC Browser showed those Root Group IDs. So I regenerated them on my work related databases. No change besides some trouble getting them to connect to Chrome which I could solve by restarting KeepassXC.
After restarting KeepassXC and before switching to a work related database, I tried accessing some credentials in Chrome. But Chrome justs wants to connect my private database instead of using the already connected work-related databases. The button for detecting login fields isn't there, only the connect button. Switching to my personal work database the add-on then shows the button. Switching back to my not-connected private database the button changes back to connect.
So, it doesn't help. But I could add some details which isn't too bad. As long as there are unconnected databases the add-on wants first to connect to them before it searches credentials. Maybe the add-on could show a list of available databases including their respective connections status and a way to connect each database. As soon as one database is connected show the button for detecting login fields and search the databases accessible.
@MasinAD I've already started working on a branch that improves the database handling in a way that it doesn't matter what database is active, but all connected ones are handled normally. Sadly it's a big refactor and takes time. The current implementation is not very good at handling a situation like yours. So for now the only workaround is to use them both at the same time, both being connected. You could possibly distinquish the credentials by putting them to a group and enabling the Display the group name in autocomplete setting from the extension.
That's both good to hear as well as sad.
I got along with this for some time now, I will get along with it in the future. I just thought I report this one. Thanks for listening. I will gladly wait for your rewrite. I'd like to help but WebExtensions are sadly beyond my scope.
@MasinAD This needs changes both KeePassXC and the extension side, so it needs a bigger update.
If it's of any value to post, I have the exact same issue between vivaldi and edge on win10 with keepassxc 2.6.4.
I also have this issue, I configured KeepassXC Application Settings > Browser Integration > General > Search in all opened databases for matching credentials [checkbox on].
My second database was initially a file copy of the first, so I have verified they share the same root group UUID with this procedure:
- Select the second database tab to make it active
- Choose the Root/topmost parent group, right click for a context menu, Edit Group...
- Choose the Properties menu on the left side
- Observe the UUID is the same for your other database(s) root/topmost parent group
What I did not understand is that because the Root group ID is a read-only property in the GUI, so you must do the following to remediate:
- Select your second database tab to make it active
- Choose Database > Database Settings...
- Choose the Browser Integration menu on the left side
- Press the "Refresh database root group ID" button
- Click OK button
- Close your database to insure everything was saved. :)
Just a little update for this because I've been recently working with the feature fix.
It looks like for backwards compatibility it's best to create a totally new API request get-database-statuses (or something similar) which will return the database hash, locked/unlocked and associated status, all in one response. Still lot to do, but it's progressing.