linagora / tmail-flutter

A multi-platform (Flutter) application for reading your emails, with your favorite devices, using the JMAP protocol!
GNU Affero General Public License v3.0
300 stars 66 forks source link

[MU] SMime signature validation #3023

Closed chibenwa closed 1 week ago

chibenwa commented 1 month ago

Description

Have a pas/fail visualization regarding smime signature.

Requested for customer.

SMIME signature is to be validated on the backend side, and accessible to the frontend through the following headers:

X-SMIME-Status: Good signature
X-SMIME-Status: Bad signature
X-SMIME-Status: Not signed

Screenshot from 2024-07-22 10-19-52

Screenshot from 2024-07-22 10-22-51

chibenwa commented 1 month ago

@hoangdat please plan work on this next sprint

chibenwa commented 1 month ago

CF https://ci.linagora.com/linagora/lgs/twp/mail-gov-mauritius/-/issues/30

hoangdat commented 1 month ago

@Bobpodvalnyi please help us on the icon for this function. Thanks

hoangdat commented 1 month ago

@Bobpodvalnyi please help us

chibenwa commented 1 month ago

After today discussion with @guimard without this feature LNG cannot be paied for the customer projet: it is mandated!

Bobpodvalnyi commented 1 month ago

https://www.figma.com/design/XqLqMINlZw09BdEHI8yLb9/Teammail---1.1?node-id=2956-1011&t=rrvBVF6LhV32w9QH-0 @hoangdat @chibenwa

chibenwa commented 1 month ago

Simple and efficient. Thanks!

hoangdat commented 1 month ago

@Arsnael @chibenwa One question: any problem if man-in-the-middle can change this header?

Arsnael commented 1 month ago

This header is set by the backend when it receives the email and treats it. If man in the middle sets it up it would be overriden when treated by the back anyways, and probably would fail because it has been tempered in the first place

chibenwa commented 1 month ago

Please document that the header shall be removed as part of the delivery chain.

@Arsnael we can create a tmail backend ticket to remove this header in all default confs, deployments. Can you take care of it? Thanks!

Arsnael commented 1 month ago

Please document that the header shall be removed as part of the delivery chain.

Well except if you use the smime verify signature mailet in the chain like for MU, correct? Or you want to delete it at the entry of the chain and do a verification behind?

chibenwa commented 1 month ago

No we should always unset it now when using tmail front so pkease remove everywhere

Arsnael commented 1 month ago

=> https://github.com/linagora/james-project/issues/5239

Arsnael commented 2 weeks ago

FYI work has been done for this on the backend and the smime check signature mailet has been deployed on tmail.linagora.com with the CA cert from MU.

@hoangdat I guess your team can start working on this now, and that you could test this with on-commit env? Or do you need it deployed somewhere else?

Arsnael commented 2 weeks ago

I see your team worked on that but it's not been merged into master branch, thus I can't check with the mail I tested with from MU on the oncommit env

Arsnael commented 1 week ago

@hoangdat @chibenwa I tried to do a little recording with tmail front (canary) and smime check signature configured with MU CA on our prod

https://github.com/user-attachments/assets/545a44ed-c775-421c-af5a-22088c593e4a

Would that be enough?

chibenwa commented 1 week ago

Yes indeed it is!