Enable Revocation, extending expiration, and secret key backup in OpenPGP prefs
Categories
(MailNews Core :: Security: OpenPGP, enhancement, P1)
Tracking
(thunderbird_esr78 fixed, thunderbird79 fixed)
People
(Reporter: KaiE, Assigned: aleca)
References
Details
(Keywords: ux-efficiency)
Attachments
(3 files, 8 obsolete files)
3.78 KB,
image/png
|
Details | |
41.49 KB,
patch
|
KaiE
:
review+
wsmwk
:
approval-comm-beta+
wsmwk
:
approval-comm-esr78+
|
Details | Diff | Splinter Review |
1.18 KB,
patch
|
KaiE
:
review+
wsmwk
:
approval-comm-beta+
wsmwk
:
approval-comm-esr78+
|
Details | Diff | Splinter Review |
Alessandro, I attempted to add the code to enable the actions for revocation, extending expiration and backup of secret keys to am-e2e.js
I already did some refactoring in the base code, to allow you to share the common implementation. I'll attach a patch with my attempted changes to am-e2e.js. One of them uses a callback function to open a sub dialog, as I saw it needs to be done differently from within account prefs.
However, it doesn't work yet. After returning from the backup password dialog, I get some strange errors, about autocompletion and incorrect URIs. Maybe it's simply an async issue, but it could also be something different.
I'll attach my preparation as a starting point for you.
Please base your work on the dependent patch from bug 1651707, and there are additional base patches which you might pull in locally, and work on top of them.
Reporter | ||
Comment 1•4 years ago
|
||
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 2•4 years ago
|
||
I've almost completed this implementation.
I'm not sure why, but all the EnigmailDialog
helper methods don't work correctly when triggered from within a subdialog.
I converted the methods that were causing failures intro regular alert
and confirmEx
.
There are also some UI issues here and there, which I'm fixing (eg. buttons getting pushed outside the view, missing styles, etc.)
Assignee | ||
Comment 3•4 years ago
|
||
Implemented all the methods, polished the UI of the used dialogs, and integrated successful notifications inline the account settings.
As you may notice, I didn't end up using the shared methods you created since those use the window.openDialog()
method, which doesn't work in the context of the Account Settings tab.
Assignee | ||
Comment 4•4 years ago
|
||
Forgot to add a newly generated file.
Comment 5•4 years ago
|
||
Comment 6•4 years ago
|
||
The info icon isn't centred.
Assignee | ||
Comment 7•4 years ago
|
||
Thanks, I forgot to center align that.
Are you planning to convert all dialogs that now open as normal dialogs to sub-dialogs?
I wish but we can't for now. Those dialogs are shared between the account settings and the key manager, which opens as a regular dialog from other locations like the app menu.
I'd like to keep that as a low level objective, so if we can convert all those to subdialog and get rid of the repetitions and duplciate embedded styles. That would mean that when the key manager is called from other locations, we would open the account settings tab for the current identity and trigger the key manager subdialog.
I'll explore that option on bug 1652537.
Assignee | ||
Comment 8•4 years ago
|
||
Reporter | ||
Comment 9•4 years ago
|
||
Key backup from within the account doesn't work, console says:
Uncaught (in promise) TypeError: window.browsingContext is undefined
openPgpExportSecretKey chrome://messenger/content/am-e2e.js:1281
window.browsingContext.topChromeWindow.openDialog(
"chrome://openpgp/content/ui/backupKeyPassword.xhtml",
"",
"dialog,modal,centerscreen,resizable",
args
);
Reporter | ||
Comment 10•4 years ago
|
||
You allow revoking the currently selected key.
If that is done, the revoked key will be removed from the list of keys that is shown (expected).
However, you don't update the config, the header line still has a green checkmark and says it's using the key ID that has just been revoked.
Assignee | ||
Comment 11•4 years ago
|
||
Ah, good point. I'll prevent it the same way I did if trying to delete the selected key.
Assignee | ||
Comment 12•4 years ago
|
||
This is only for trunk and 79.
The user can't revoke the currently used key and gets prompted with an alert.
Assignee | ||
Comment 13•4 years ago
|
||
Same patch, but compatible with 78
m-c changed the way it handles parent windows from the settings tab for 79+
Reporter | ||
Comment 14•4 years ago
|
||
So the menus offer an action, but when pressed, you refuse the action.
Maybe that's not ideal.
If you really want to prevent the action, then I think the error message should explain what the user has to do to fix it, like "select a different key, or select none, then come back and try again". I'm OK with that, but but that's complicated, right?
However, it seems be fine to allow the user to delete the currently selected key. You could show an additional warning (first) "warning, you are deleting the key that you are currently using for OpenPGP, are you sure?" If the user confirms, then you could change the selection to None.
A stronger argument applies for revoke. The user's motivation might be more urgent. When "deleting" the user mightly try to clean up. But when "revoking", the user might be potentially in an emergency situation. Blocking the action that the user really wants to do quickly might frustrate the user.
Again, you could potentially show an initial extra warning "warning, you are revoking the key that you are actively using for this account are you sure?"
But showing a sequence of two warning dialogs isn't ideal either, right?
Please let me know which one you prefer
(a) keep current patch as is
(b) keep current patch, but add explanation that user must select "None", then try the action again
(c) show an additional warning "confirm action on selected key", on confirmation, show the existing warning "confirm action", and on confirmation, automatically switch selection to "None".
Reporter | ||
Comment 15•4 years ago
|
||
(d) No additional warning. Show only the usual warning to confirm the delete/revoke action, and automatically switch selection to "None"
Reporter | ||
Comment 16•4 years ago
|
||
FYI, I'm OK to keep (a) for now. Just wanted to bring up these thoughts.
Assignee | ||
Comment 17•4 years ago
|
||
I'd prefer preventing those actions through the alert, and extending the error message by suggesting to change key if the user wants to proceed.
Everything else adds an extra layer of complexity I'd like to avoid right now.
Assignee | ||
Comment 18•4 years ago
|
||
Assignee | ||
Comment 19•4 years ago
|
||
Let me know about this, and if approved I'll upload the 78 variation
Reporter | ||
Updated•4 years ago
|
Assignee | ||
Comment 20•4 years ago
|
||
Patch updated based on our chat on matrix.
Using the same callback for both backup export, and using a boolean variable to confirm the password was properly defined.
Reporter | ||
Comment 21•4 years ago
|
||
Reporter | ||
Comment 22•4 years ago
|
||
And thanks for fixing the "change expiration date" button.
Reporter | ||
Updated•4 years ago
|
Reporter | ||
Comment 23•4 years ago
|
||
I've applied the small changes, and tested that they work on both nightly and 78 builds.
Reporter | ||
Updated•4 years ago
|
Comment 24•4 years ago
|
||
Pushed by kaie@kuix.de:
https://hg.mozilla.org/comm-central/rev/9c81e7406889
Enable Revocation, extending expiration, and secret key backup in OpenPGP prefs. r=kaie
Reporter | ||
Comment 25•4 years ago
|
||
Comment 26•4 years ago
|
||
Reporter | ||
Comment 27•4 years ago
|
||
https://hg.mozilla.org/releases/comm-esr78/rev/3fa45718c2ecaea0d1a309e4a899e9843f45955b
https://hg.mozilla.org/releases/comm-beta/rev/0b91b40fc326560b2b4d77b8dc97d239fe1fa0ce
Updated•4 years ago
|
Comment 28•4 years ago
|
||
Reporter | ||
Comment 29•4 years ago
|
||
lint fix
Comment 30•4 years ago
|
||
Reporter | ||
Comment 31•4 years ago
|
||
Assignee | ||
Comment 32•4 years ago
|
||
Thanks for updating and landing this.
Description
•