Page MenuHome GnuPG

Kleopatra: Additional Expiry handling
Closed, ResolvedPublic

Description

Kleopatra should have a configurable time when it informs you that your own key is about to expire and if keys you are using to encrypt to are about to expire. KMail does this already.

I would probably implement this in Libkleo so that the newkeyresolver in libkleo can also make use of this, as this should also work if you never open Kleopatra and only use GpgOL. Also with respect to T6198 this would be required for a feature equivalent KMail replacement of the resolver.

My suggestion would be that if we have a secret for a key that we would warn 3 Month before expiry by default and if we do not have a secret we would warn 10 Days before it.

The warning for a key with secret should offer to extend the expiry by two years with just a dialog that should offer "export" and "upload" functionality with a bit of information that this new public key needs to be given to communication partnerts.

The warning for expired public keys should just generally be "Please ask your communication partner to provide you an updated key". I think we do not need to offer the "Update" functionality for OpenPGP keys there as we will have T1235 implemented in the next feature release..

Revisions and Commits

rLIBKLEO Libkleo
rKLEOPATRA Kleopatra

Event Timeline

aheinecke created this task.
ikloecker moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.
ikloecker moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.
ikloecker added a subscriber: ikloecker.
ikloecker moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.

A few remarks:

  • For now the users are just informed about the upcoming expiration of certificates used in the Sign/Encrypt dialog. There is no button to act or get further information what to do about it.
  • Expiration of issuer certificates are ignored. If a leaf certificate gets invalid as soon as any certificate in the issuer chain expires, then it may make more sense to treat this as expiration of the leaf certificate since that's effectively what happens. On the other hand, if the expiration of certificates in the issuer chain have no effect on the validity of the leaf certificate (because at the time the leaf certificate was certified the chain was valid), then, in my opinion, it makes little sense to bother the users with the expiration of chain certificates.
  • I took over the default values that are also used by KMail and that seem to be the recommended default by SPHINX (according to the comments for the settings in KMail).
  • I decided to save/load the thresholds from a shared configuration file (kleo-expirycheckerrc), but to keep the setting whether to show expiry notifications as per-application setting.
ikloecker changed the task status from Open to Testing.Apr 24 2023, 12:31 PM
ikloecker removed ikloecker as the assignee of this task.
ikloecker moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.

Ready for testing.

Works. The only drawback is: for the message to be displayed in the "for others" part of the encryption dialog you have to click in the next line before it is displayed.
If you click on sign/encrypt directly, you won't see the warning. At least if you select the recipient by starting to type and the selecting from the dropdown.

The corresponding issue for it to disappear: if I delete the recipient again the warning goes away only after clicking in the next line.

In contrast: if you use the button on the right side for selection, the warning for the chosen recipient is shown immediately.

And I cannot find the kleo-expirycheckerrc you mentioned, it's probably optional and to be located in %APPDATA% kleopatra?
Instead there ist a configuration option in the appearance tab of Kleos configuration menu, which works, too.

ikloecker changed the task status from Testing to Open.May 9 2023, 3:00 PM
ikloecker claimed this task.
ikloecker moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.

Yes, kleo-expirycheckerrc is optional. I'm not sure where the config files live on Windows. It's used by libkleo, so it could also be %APPDATA%/libkleo. The setting in the appearance tab is stored in kleopatrarc. (I thought it makes sense to have the warning configured per application, but the thresholds should be shared by all applications.)

I may have to look into the "for others" issue you found. I've moved it back to WIP.

Mmh, why did this go into its own rc file. I guess its because its in libkleo and not in Kleo itself. I have to check how this works with my registry code. I doubt that this will work out of the box but its important for us that our settings can be set through the windows registry.

@aheinecke As I wrote "the thresholds should be shared by all applications". Therefore (and because the code is in libkleo), using kleopatrarc wasn't an option. Or is the question why I didn't use libkleopatrarc? One advantage of using a separate file is that watching for relevant changes by other applications is much easier resp. that one doesn't get change notifications for unrelated settings.

In T6330#170382, @ebo wrote:

[...] The only drawback is: for the message to be displayed in the "for others" part of the encryption dialog you have to click in the next line before it is displayed.
If you click on sign/encrypt directly, you won't see the warning. At least if you select the recipient by starting to type and the selecting from the dropdown.

The warning is shown either when the users accept their input with Return or when the navigate to another UI element (e.g. with Tab). This is done to avoid distraction by too much jumping of the UI while the user is interacting with the input field.

ikloecker changed the task status from Open to Testing.May 16 2023, 12:03 PM
ikloecker removed ikloecker as the assignee of this task.
ikloecker moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.

The warning is now removed immediately, when the input field becomes empty.

Moreover, selecting one of the completion entries with the mouse or the keyboard (Return) now behaves identical.

It's still possible to click Sign/Encrypt without getting the warning by entering some text matching exactly one key and then clicking on the button.

ebo claimed this task.
ebo moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.

works