Bug 105566 - Show InfoBar when document has invalid signature
Summary: Show InfoBar when document has invalid signature
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium enhancement
Assignee: Samuel Mehrbrodt (allotropia)
URL:
Whiteboard: target:5.4.0 target:5.5.0 target:5.4.0.1
Keywords:
Depends on:
Blocks: Digital-Signatures Infobar-UX
  Show dependency treegraph
 
Reported: 2017-01-27 08:14 UTC by Samuel Mehrbrodt (allotropia)
Modified: 2018-09-03 13:54 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file: Broken signature (11.75 KB, application/vnd.oasis.opendocument.text)
2017-01-31 13:32 UTC, Samuel Mehrbrodt (allotropia)
Details
Example file: Unverified certificate (11.26 KB, application/vnd.oasis.opendocument.text)
2017-01-31 13:32 UTC, Samuel Mehrbrodt (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Samuel Mehrbrodt (allotropia) 2017-01-27 08:14:48 UTC
Currently the status of the signature is shown as an icon in the status bar: https://help.libreoffice.org/5.3/Common/About_Digital_Signatures#Open_a_signed_document

When the signature is broken, we should display a red infobar instead.
Maybe we could also display an InfoBar for the other two states (valid, partly valid).
Comment 1 Heiko Tietze 2017-01-27 09:17:47 UTC
That's a perfect example for the infobar. The question is only red or yellow to me, and I tend to yellow for all states.
Comment 2 Thorsten Behrens (allotropia) 2017-01-27 09:19:27 UTC
I'd prefer red for the 'broken signature' state (when someone tampered with the document), vs. yellow for less severe situations, like unknown key, untrusted cert chain etc.
Comment 3 Samuel Mehrbrodt (allotropia) 2017-01-27 09:25:45 UTC
Agree with Thorsten.

Just wonder whether we should show an InfoBar in the "All good" state. Maybe that could be too annoying for people who use this feature often.
Comment 4 Commit Notification 2017-01-31 12:22:48 UTC
Samuel Mehrbrodt committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=2dff5e856ab343b1296f63d645c47382493fe2fe

tdf#105566 Show InfoBar when signature is invalid

It will be available in 5.4.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 5 Commit Notification 2017-01-31 12:44:08 UTC
Samuel Mehrbrodt committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=2499ecc4050a308dd52df0ca32e2d97dff9e40df

tdf#105566 Show InfoBar also for signed docs with warnings

It will be available in 5.4.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 6 Samuel Mehrbrodt (allotropia) 2017-01-31 13:32:21 UTC
Created attachment 130792 [details]
Example file: Broken signature
Comment 7 Samuel Mehrbrodt (allotropia) 2017-01-31 13:32:47 UTC
Created attachment 130793 [details]
Example file: Unverified certificate
Comment 8 Commit Notification 2017-01-31 15:42:48 UTC
Samuel Mehrbrodt committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=057990769325b2f3dd2f198a9bf76a0a85447bb7

tdf#105566 Close Infobar after clicking action button

It will be available in 5.4.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 9 Heiko Tietze 2017-02-01 08:47:02 UTC
Two design issues that might be not your fault: the red is unexpected dark; hope you make use of constants (haven't checked this red infobar against other errors). The black font on this dark red has not enough contrast, either it needs to be light grey or the red becomes brighter. 
After checking the other document I'm not so sure about whom to blame as orange is likely not a default. We must not make the infobar a rainbow :-). Please use THE default red and beige.

Workflow: Red infobars are about serious problems and I would not expect to be able to "acknowledge" them. So as long the user don't dismiss explicitly it should be on top. The "Show signatures" function is rather a convenience function than a confirmation. (When I changes something and do not save when asked for the red infobar has disappeared but the signatures dialog won't be shown.) 
My suggestion is to close only with the x (an additional button is too much noise).

Nitpick: Buttons are labeled with title style capitalization, and like "Edit Document" it has to be "Show Signatures".
Would be nice to have the same width for buttons (Show Signature is slightly longer than Edit Document). But I wouldn't put too much effort in it.
Comment 10 Samuel Mehrbrodt (allotropia) 2017-02-01 09:34:38 UTC
(In reply to Heiko Tietze from comment #9)
> Two design issues that might be not your fault: the red is unexpected dark;
> hope you make use of constants (haven't checked this red infobar against
> other errors). The black font on this dark red has not enough contrast,
> either it needs to be light grey or the red becomes brighter. 
> After checking the other document I'm not so sure about whom to blame as
> orange is likely not a default. We must not make the infobar a rainbow :-).
> Please use THE default red and beige.

The foreground color for red and orange is now white.
I don't know what you mean with default red and beige.
There are different levels with different colors. Error is red, warning is orange, info is yellow.

I took the colors from the classification infobars.

> Workflow: Red infobars are about serious problems and I would not expect to
> be able to "acknowledge" them. So as long the user don't dismiss explicitly
> it should be on top.

I don't understand exactly what you mean here.
Btw I changed the behavior so that the infobar hides when you click the "Show signatures" button.

> The "Show signatures" function is rather a convenience
> function than a confirmation. (When I changes something and do not save when
> asked for the red infobar has disappeared but the signatures dialog won't be
> shown.)

I don't understand this either.

> My suggestion is to close only with the x (an additional button is too much
> noise).

The button shows the Signatures dialog where you can "fix" the problem. I don't think that is noise, it helps the user doing the action he is expected to do.

> Nitpick: Buttons are labeled with title style capitalization, and like "Edit
> Document" it has to be "Show Signatures".

Fixed.

> Would be nice to have the same width for buttons (Show Signature is slightly
> longer than Edit Document). But I wouldn't put too much effort in it.

The button width is calculated on demand as different translations need different widths. So this is wontfix.

Thanks for the comments!
Comment 11 Samuel Mehrbrodt (allotropia) 2017-02-01 09:36:31 UTC
Another question: When the document is signed (valid signature) and the user edits it, the signature becomes invalid and it needs to be re-signed.

Should we take any action here? (Show an InfoBar, or something).

Btw the status of the signature is also shown in the status bar. This status should also be visible there.
Comment 12 Cor Nouws 2017-02-06 23:21:11 UTC
(In reply to Samuel Mehrbrodt (CIB) from comment #11)
> Another question: When the document is signed (valid signature) and the user
> edits it, the signature becomes invalid and it needs to be re-signed.
> 
> Should we take any action here? (Show an InfoBar, or something).

Sounds as a good idea.
Along the lines of Singing an existing PDF: when that function is started and the user starts to edit the PDF anyways, a warning message is show.
So something similar looks reasonable.

> Btw the status of the signature is also shown in the status bar. This status
> should also be visible there.

What do you mean with "this status"?
Comment 13 Heiko Tietze 2017-02-07 09:05:31 UTC
(In reply to Cor Nouws from comment #12)
> Along the lines of Singing an existing PDF: when that function is started
> and the user starts to edit the PDF anyways, a warning message is show.
> So something similar looks reasonable.

Like in Calc it should be a confirmation box with the option to never show again.
Comment 14 Commit Notification 2017-02-20 12:23:47 UTC
Samuel Mehrbrodt committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=2009cf1b1c50976abd7714a2fc11046e12da8da7

Revert "tdf#105566 Close Infobar after clicking action button"

It will be available in 5.4.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 15 Commit Notification 2017-04-07 09:08:32 UTC
Samuel Mehrbrodt committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=d8faf3bf9a82e8f49340b5020ec4ee931cc2f3f4

Related tdf#105566 Update Infobar when signature status changes

It will be available in 5.4.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 16 Commit Notification 2017-04-07 12:20:20 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=b805e5705cfaafd8e54283840bec23afc789124a

Revert "Related tdf#105566 Update Infobar when signature status changes"

It will be available in 5.4.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 17 Commit Notification 2017-05-30 13:39:25 UTC
Katarina Behrens committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=e744e9f4492d3013742fcdb6254cd76528870e9d

tdf#105566: Add/remove infobar when the signature status changes

It will be available in 5.5.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 18 Commit Notification 2017-06-01 00:14:38 UTC
Katarina Behrens committed a patch related to this issue.
It has been pushed to "libreoffice-5-4":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=bd8b8ccd3110a9f6fa7fb4f2aec3275f7b650052&h=libreoffice-5-4

tdf#105566: Add/remove infobar when the signature status changes

It will be available in 5.4.0.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 19 Commit Notification 2017-06-08 12:45:02 UTC
Katarina Behrens committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=2e11bbd288ec59d0ff3368cc5c5ef83e2f5133a2

tdf#105566: Account for 'signature used to be ok but isn't anymore'

It will be available in 5.5.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 20 Commit Notification 2017-06-16 14:01:09 UTC
Katarina Behrens committed a patch related to this issue.
It has been pushed to "libreoffice-5-4":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=9c48f130ed3d5ed8e1e76231052df28553d399cd&h=libreoffice-5-4

tdf#105566: Account for 'signature used to be ok but isn't anymore'

It will be available in 5.4.0.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.