Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Database information / statistics panel [$50 awarded] #2034

Closed
denk-mal opened this issue Jun 7, 2018 · 48 comments · Fixed by #3546
Closed

Database information / statistics panel [$50 awarded] #2034

denk-mal opened this issue Jun 7, 2018 · 48 comments · Fixed by #3546

Comments

@denk-mal
Copy link
Contributor

denk-mal commented Jun 7, 2018

It would be nice to have an info panel/window with some infos about the opened database
like full database path, number of entries, last write access time, outdated passwords, number of non unique passwords, ...

KeePassXC - 2.3.3
Revision: 0a155d8

Libraries:

  • Qt 5.9.5
  • libgcrypt 1.8.1

Operating system: Ubuntu 17.10 (shown by KeePassXC but it is 18.04)
CPU architecture: x86_64
Kernel: linux 4.15.0-22-generic

Enabled extensions:

  • Auto-Type
  • Browser Integration
  • Legacy Browser Integration (KeePassHTTP)
  • SSH Agent
  • YubiKey
@droidmonkey
Copy link
Member

droidmonkey commented Jun 7, 2018

The last two are covered under #551. I'm not sure the value of the first three though.

@denk-mal
Copy link
Contributor Author

denk-mal commented Jun 7, 2018

I saw the issue #551 but my intend was not those special information. My intend is for a more general place to get Infos about the actual loaded database(s) so if I had two versions of a database (at diff. places, of course) I can seen some general infos about them (especially but not only the file path, the number of entries and the last write access/change date)

@torerobo
Copy link

The program is open source. Then someone make a separate branch. It is necessary (just necessary) function the number of records in the database.
Make the function "counter the number of records in the database."
The problem is that I'm working and synchronizing different databases, because of this I am making new entries to the old database.

The android counter implemented in the keepassdroid in keepass2 also has a counter, why is not there? Because of such little things, huge problems

@droidmonkey droidmonkey added this to the v2.4.0 milestone Sep 18, 2018
@droidmonkey droidmonkey self-assigned this Sep 18, 2018
@droidmonkey
Copy link
Member

Show full path of database file in this view (#2114)

@rugk
Copy link

rugk commented Nov 14, 2018

Ah okay, here it is. Searched for "statistics" and could not find it here. So some other ideas:


My initial question was:

  • How many passwords do I even have in the database?

Unfortunately, I could not find an easy way to see this.

So maybe you can show this for all selected items? Or for all of the group.

Maybe in a status bar? But well… this is oldish, I know, so maybe in a extra "Statistics" menu entry?

There, (combined with #2477), you may also show some more stats like:

@droidmonkey droidmonkey changed the title Info Panel or Window about an open database Database information / statistics panel Nov 14, 2018
@droidmonkey droidmonkey modified the milestones: v2.4.0, v2.5.0 Jan 16, 2019
@AboveMyPaygrade
Copy link

Greetings! I didn't want to duplicate a feature request, and this appeared to be in the ballpark. @rugk made a suggestion regarding stats, which seems pretty great. I was hoping for something similar, but maybe less sweeping in scope. Specifically, I was hoping for an extra column in the normal database view which would show the number of the entry.

Currently, the open database has columns for "Title", "Username", "Password", etc. I was hoping to add a column which would assign a numerical value for each entry, so that I could see, at a glance, which number entry I was looking at, in, say, a specific group. The quote below might cover it, but I wasn't sure.

as said, database entry count

If this is out of scope, I would be happy to open a separate issue.

Thank you for your work.

@droidmonkey
Copy link
Member

droidmonkey commented Jun 29, 2019

@AboveMyPaygrade I am not sure I understand your request. What number are you wanting to display? The sequential number of the entry as added to the database? The UUID of the entry?

@AboveMyPaygrade
Copy link

In the image below (shamelessly taken from one of the PRs), there are multiple columns (Title, Username, etc.). I was hoping one could be added that would show a number. For example, in the image, Amazon would be (1), Apple would be (2), Dropbox would be (3), and so on.

59851734-ade9a680-936d-11e9-9c4e-d0b3678aca5d

@droidmonkey
Copy link
Member

But why? What does that number correspond to? You can sort the entries by clicking the column headers.

@AboveMyPaygrade
Copy link

Preference, I guess? The number itself would correspond to the entry inside the folder group. It makes it easier for me to see at a glance how many entries are in a specific group. Essentially, I've been manually moving from Lastpass to keepassxc (it's easier to export from LP and import to XC, but it was probably time for me to manually review my LP entries and edit/prune as needed), and while LP has a count for the number of entries in each folder, XC doesn't. I felt it would be easier to see if I was missing something at a glance using numbers versus having to read and compare the entries in the folders within LP and XC, and maybe count them manually to make sure I didn't miss one.

It's certainly a minor thing; it may not really be worth the trouble to implement if others haven't been clamoring for it. Either way, I very much appreciate the consideration/quick responses.

@droidmonkey
Copy link
Member

It would be better (and easier) to just report the number of entries in the group. This could be shown in the entry/group preview panel and when editing a group.

@AboveMyPaygrade
Copy link

I'm not entirely sure if that request is covered by this issue number, or would require a separate one, but your suggestion sounds great!

@torerobo
Copy link

Received (and receive) requests for "adding statistics function". Why are developers ignoring? Why???

Why none of the users can make a separate branch of an open source project with the function of statistics?

@rugk
Copy link

rugk commented Jun 29, 2019

@torerobo If you are so keen for this feature, why don't you do? 🤔

@torerobo
Copy link

@torerobo If you are so keen for this feature, why don't you do?

Why don't you do my work in the Arctic Circle?

And yes, dozens of people are interested ...

@droidmonkey
Copy link
Member

droidmonkey commented Jun 29, 2019

I am going to add a bounty to this PR so maybe it'll motivate someone to work on it.

https://www.bountysource.com/issues/59353244-database-information-statistics-panel

@rugk
Copy link

rugk commented Jun 29, 2019

Okay, that's also a good idea, so @torerobo you can obviously also add (to that) bounty.

@droidmonkey
Copy link
Member

That's a great idea. Especially if there are any expired passwords that should be highlighted the error color.

@wolframroesler
Copy link
Contributor

Sounds good, two questions:

  1. You say "the error color", is there one particular color to use? Is it guaranteed that it can be used as a foreground or background color?
  2. "Number of expired passwords" gets highlighted if >0, and "unsaved changes" gets highlighted if "yes", ok. "Average password length" could be highlighted if less than 10. But any idea when to highlight "non-unique passwords" or "maximum password reuse"? A small amount of reuse should be tolerated. Maybe set a percentage limit, like highlight if > 10 %? Any better ideas?

@droidmonkey
Copy link
Member

droidmonkey commented Sep 17, 2019

I like those thresholds you mentioned. Instead of an error color (which breaks easily with dark themes) we can use an error or warning icon similar to what I have setup in the edit entry widget when the passwords do not match. See this code:

const QIcon errorIcon = filePath()->icon("status", "dialog-error");
m_errorAction = addAction(errorIcon, QLineEdit::TrailingPosition);
m_errorAction->setVisible(false);
m_errorAction->setToolTip(tr("Passwords do not match"));
const QIcon correctIcon = filePath()->icon("actions", "dialog-ok");
m_correctAction = addAction(correctIcon, QLineEdit::TrailingPosition);
m_correctAction->setVisible(false);
m_correctAction->setToolTip(tr("Passwords match so far"));

void PasswordEdit::updateStylesheet()
{
QString stylesheet("QLineEdit { background: %1; }");
if (m_basePasswordEdit && !passwordsEqual()) {
bool isCorrect = true;
if (m_basePasswordEdit->text().startsWith(text())) {
stylesheet = stylesheet.arg(CorrectSoFarColor.name());
} else {
stylesheet = stylesheet.arg(ErrorColor.name());
isCorrect = false;
}
m_correctAction->setVisible(isCorrect);
m_errorAction->setVisible(!isCorrect);
} else {
m_correctAction->setVisible(false);
m_errorAction->setVisible(false);
}
setStyleSheet(stylesheet);
}

@wolframroesler
Copy link
Contributor

Tried the color and it really didn't look good, don't even want to think about theming issues (or cultures where red isn't associated with "problem"). The icon is a much better idea, look:

Screenshot from 2019-09-20 22 27 34

wolframroesler added a commit to wolframroesler/keepassxc that referenced this issue Sep 27, 2019
@wolframroesler
Copy link
Contributor

Any opinions? Anything else to add?

@droidmonkey
Copy link
Member

The only additional idea I have is to add a tooltip to the warning/error icon that explains WHY it is being shown. These should be translatable as well.

@phoerious
Copy link
Member

If we are really using tables, then they should at least be aligned properly. Right now it has additional margins around the edges.

@rugk
Copy link

rugk commented Sep 28, 2019

From my comment here as far as I can see one information is still missing: How many passwords do I have in my DB?

@wolframroesler
Copy link
Contributor

@rugk as in "number of entries that have a non-empty password"?

@wolframroesler
Copy link
Contributor

@phoerious could you elaborate? Could you mark in the screenshot where exactly the table is not aligned properly?

@droidmonkey
Copy link
Member

@rugk there is a line for "number of unique passwords" and one for "number of entries"

@rugk
Copy link

rugk commented Sep 28, 2019

Ahh, yeah, "number of entries" was what I've missed, sry.

@wolframroesler
Copy link
Contributor

Tooltips added and pushed to #3546.

wolframroesler added a commit to wolframroesler/keepassxc that referenced this issue Oct 6, 2019
wolframroesler added a commit to wolframroesler/keepassxc that referenced this issue Oct 12, 2019
Brace style, member variable style, QHash instead of QMap.
droidmonkey pushed a commit to wolframroesler/keepassxc that referenced this issue Oct 13, 2019
Added new page "Statistics" to the Database Settings dialog that shows information like number of groups and entries, number of unique and re-used passwords, average password length, etc.
Show warnings for problematic values with explainations for the user in tooltips.

Fixes keepassxreboot#2034

Database statistics icon:
Downloaded from: https://www.flaticon.com/authors/freepik
Original source: https://www.flaticon.com/free-icon/bars-chart_265733
droidmonkey pushed a commit that referenced this issue Oct 13, 2019
Added new page "Statistics" to the Database Settings dialog that shows information like number of groups and entries, number of unique and re-used passwords, average password length, etc.
Show warnings for problematic values with explainations for the user in tooltips.

Fixes #2034

Database statistics icon:
Downloaded from: https://www.flaticon.com/authors/freepik
Original source: https://www.flaticon.com/free-icon/bars-chart_265733
phoerious added a commit that referenced this issue Oct 26, 2019
Added

- Add 'Paper Backup' aka 'Export to HTML file' to the 'Database' menu [[#3277](#3277)]
- Add statistics panel with information about the database (number of entries, number of unique passwords, etc.) to the Database Settings dialog [[#2034](#2034)]
- Add offline user manual accessible via the 'Help' menu [[#3274](#3274)]
- Add support for importing 1Password OpVault files [[#2292](#2292)]
- Implement Freedesktop.org secret storage DBus protocol so that KeePassXC can be used as a vault service by libsecret [[#2726](#2726)]
- Add support for OnlyKey as an alternative to YubiKeys (requires yubikey-personalization >= 1.20.0) [[#3352](#3352)]
- Add group sorting feature [[#3282](#3282)]
- Add feature to download favicons for all entries at once [[#3169](#3169)]
- Add word case option to passphrase generator [[#3172](#3172)]
- Add support for RFC6238-compliant TOTP hashes [[#2972](#2972)]
- Add UNIX man page for main program [[#3665](#3665)]
- Add 'Monospaced font' option to the notes field [[#3321](#3321)]
- Add support for key files in auto open [[#3504](#3504)]
- Add search field for filtering entries in Auto-Type dialog [[#2955](#2955)]
- Complete usernames based on known usernames from other entries [[#3300](#3300)]
- Parse hyperlinks in the notes field of the entry preview pane [[#3596](#3596)]
- Allow abbreviation of field names in entry search [[#3440](#3440)]
- Allow setting group icons recursively [[#3273](#3273)]
- Add copy context menu for username and password in Auto-Type dialog [[#3038](#3038)]
- Drop to background after copying a password to the clipboard [[#3253](#3253)]
- Add 'Lock databases' entry to tray icon menu [[#2896](#2896)]
- Add option to minimize window after unlocking [[#3439](#3439)]
- Add option to minimize window after opening a URL [[#3302](#3302)]
- Request accessibility permissions for Auto-Type on macOS [[#3624](#3624)]
- Browser: Add initial support for multiple URLs [[#3558](#3558)]
- Browser: Add entry-specific browser integration settings [[#3444](#3444)]
- CLI: Add offline HIBP checker (requires a downloaded HIBP dump) [[#2707](#2707)]
- CLI: Add 'flatten' option to the 'ls' command [[#3276](#3276)]
- CLI: Add password generation options to `Add` and `Edit` commands [[#3275](#3275)]
- CLI: Add XML import [[#3572](#3572)]
- CLI: Add CSV export to the 'export' command [[#3278](#3278)]
- CLI: Add `-y --yubikey` option for YubiKey [[#3416](#3416)]
- CLI: Add `--dry-run` option for merging databases [[#3254](#3254)]
- CLI: Add group commands (mv, mkdir and rmdir) [[#3313](#3313)].
- CLI: Add interactive shell mode command `open` [[#3224](#3224)]

Changed

- Redesign database unlock dialog [ [#3287](#3287)]
- Rework the entry preview panel [ [#3306](#3306)]
- Move notes to General tab on Group Preview Panel [[#3336](#3336)]
- Enable entry actions when editing an entry and cleanup entry context menu  [[#3641](#3641)]
- Improve detection of external database changes  [[#2389](#2389)]
- Warn if user is trying to use a KDBX file as a key file [[#3625](#3625)]
- Add option to disable KeePassHTTP settings migrations prompt [[#3349](#3349), [#3344](#3344)]
- Re-enabled Wayland support (no Auto-Type yet) [[#3520](#3520), [#3341](#3341)]
- Add icon to 'Toggle Window' action in tray icon menu [[3244](#3244)]
- Merge custom data between databases only when necessary [[#3475](#3475)]
- Improve various file-handling related issues when picking files using the system's file dialog [[#3473](#3473)]
- Add 'New Entry' context menu when no entries are selected [[#3671](#3671)]
- Reduce default Argon2 settings from 128 MiB and one thread per CPU core to 64 MiB and two threads to account for lower-spec mobile hardware [ [#3672](#3672)]
- Browser: Remove unused 'Remember' checkbox for HTTP Basic Auth [[#3371](#3371)]
- Browser: Show database name when pairing with a new browser [[#3638](#3638)]
- Browser: Show URL in allow access dialog [[#3639](#3639)]
- CLI: The password length option `-l` for the CLI commands `Add` and `Edit` is now `-L` [[#3275](#3275)]
- CLI: The `-u` shorthand for the `--upper` password generation option has been renamed to `-U` [[#3275](#3275)]
- CLI: Rename command `extract` to `export`. [[#3277](#3277)]

Fixed

- Improve accessibility for assistive technologies [[#3409](#3409)]
- Correctly unlock all databases if `--pw-stdin` is provided [[#2916](#2916)]
- Fix password generator issues with special characters [[#3303](#3303)]
- Fix KeePassXC interrupting shutdown procedure [[#3666](#3666)]
- Fix password visibility toggle button state on unlock dialog [[#3312](#3312)]
- Fix potential data loss if database is reloaded while user is editing an entry [[#3656](#3656)]
- Fix hard-coded background color in search help popup [[#3001](#3001)]
- Fix font choice for password preview [[#3425](#3425)]
- Fix handling of read-only files when autosave is enabled [[#3408](#3408)]
- Handle symlinks correctly when atomic saves are disabled [[#3463](#3463)]
- Enable HighDPI icon scaling on Linux [[#3332](#3332)]
- Make Auto-Type on macOS more robust and remove old Carbon API calls [[#3634](#3634), [[#3347](#3347))]
- Hide Share tab if KeePassXC is compiled without KeeShare support and other minor KeeShare improvements [[#3654](#3654), [[#3291](#3291), [#3029](#3029), [#3031](#3031), [#3236](#3236)]
- Correctly bring window to the front when clicking tray icon on macOS [[#3576](#3576)]
- Correct application shortcut created by MSI Installer on Windows [[#3296](#3296)]
- Fix crash when removing custom data [[#3508](#3508)]
- Fix placeholder resolution in URLs [[#3281](#3281)]
- Fix various inconsistencies and platform-dependent compilation bugs [[#3664](#3664), [#3662](#3662), [#3660](#3660), [#3655](#3655), [#3649](#3649), [#3417](#3417), [#3357](#3357), [#3319](#3319), [#3318](#3318), [#3304](#3304)]
- Browser: Fix potential leaking of entries through the browser integration API if multiple databases are opened [[#3480](#3480)]
- Browser: Fix password entropy calculation [[#3107](#3107)]
- Browser: Fix Windows registry settings for portable installation [[#3603](#3603)]
scoroi pushed a commit to scoroi/keepassxc that referenced this issue Nov 10, 2019
Added new page "Statistics" to the Database Settings dialog that shows information like number of groups and entries, number of unique and re-used passwords, average password length, etc.
Show warnings for problematic values with explainations for the user in tooltips.

Fixes keepassxreboot#2034

Database statistics icon:
Downloaded from: https://www.flaticon.com/authors/freepik
Original source: https://www.flaticon.com/free-icon/bars-chart_265733
@droidmonkey droidmonkey changed the title Database information / statistics panel Database information / statistics panel [$50 awarded] Dec 24, 2019
@OLLI-S
Copy link

OLLI-S commented Jan 6, 2020

@droidmonkey Sorry if this question is stupid:
I have KeePassXC 2.5.2 Portable in Windows but I have no idea how to get the database-settings dialog.
I don't see this in the "Database" menu and also not when I right-click the root entry in the tree...

@wolframroesler
Copy link
Contributor

@OLLI-S Please open a new issue and submit a screen shot with the contents of the Database menu.

This is the development issue, and it's closed, so the people who can help you won't see what you've written here. (I only see it because I contributed to the issue, but I can't help you because I'm not on Windows.)

@OLLI-S
Copy link

OLLI-S commented Jan 6, 2020

Sorry, @wolframroesler I simply have overseen the entry in the Database menu.
Embarrassing for me, really very embarrassing

@perdittmann
Copy link

I like the statistics feature a lot.
What I would like even more would be the possibility to actually do something about the issues of which I am alerted.

"Number of short passwords: 6"
To change those six, I'll have to go though all 324 entries and check the password length?

Or is there an easier way ("Show me all entries with a short/weak/duplicate password") that I am missing?

@wolframroesler
Copy link
Contributor

@perdittmann the next release will have the "Health Check" report that shows you in detail which entries have issues. You can double-click lines in the report to jump directly into the entry editor. Here's a preview:

Screenshot from 2020-04-25 11 48 24

@perdittmann
Copy link

Wow, that's great news! Exactly what I was looking for – now I am looking forward to the next release.
Thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.