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

ZCS-13176 : Add mail recall message verification header #1468

Open
wants to merge 1 commit into
base: feature/mailRecall_ZCS-12409
Choose a base branch
from

Conversation

shubhamCS03
Copy link
Contributor

@shubhamCS03 shubhamCS03 commented Mar 23, 2023

Requirement of ticket [ZCS-13176]

Requirements:

  • To make sure we don't recall a message accidentally or spoofed, we should add a header to outgoing email.
  • We need to a header field, Message-Verification , and verify the message-Id while recalling a mail.
  • Need to Hash data by using algorithm SHA256 and further encrypt the data by using base64.

Solution:

  • A new header field is added while sending mail, Message-Verification which contains hash(algorithm name) and guid(base64 of the guid's hash).
  • The Message-Verification header field contains the following required tags, separated by semicolons (with no white space within):
    hash=[string] --the algorithm used to produce the hash value in the "guid" tag. Current valid values are "SHA1" and "SHA256" [[SHA]].
    guid=[base64] --the base64 encoding [[Base64]] of the hash of a globally unique ID (GUID) for the message, using the hash algorithm specified in the "hash" tag. The actual GUID (the pre-image of the hash) is kept secret by the sending side.
  • We have created one LDAP attribute secretKeyForMailRecall at global level to store secretKey.
  • We have created one SOAP API to generate secretKey.
  • We have generate the secretKey using this SHA1PRNG and saved in LDAP attribute secretKeyForMailRecall .
  • GUID(globally unique ID) = Message-Id + Date + From + secretKey.

Testing:

  • Changes are tested by sending an email and by checking its show original in the header field we are able to see Message-Verification .
  • Also tested by decrypting the hash by using base64 we get the same value.

@CLAassistant
Copy link

CLAassistant commented Mar 23, 2023

CLA assistant check
All committers have signed the CLA.

@shubhamCS03 shubhamCS03 force-pushed the ZCS-13176 branch 3 times, most recently from d156509 to 01c1c45 Compare March 23, 2023 11:34
@shubhamCS03 shubhamCS03 marked this pull request as ready for review March 23, 2023 11:50
store/src/java/com/zimbra/cs/mailbox/MailSender.java Outdated Show resolved Hide resolved
store/src/java/com/zimbra/cs/mailbox/MailSender.java Outdated Show resolved Hide resolved
store/src/java/com/zimbra/cs/mailbox/MailSender.java Outdated Show resolved Hide resolved
store/src/java/com/zimbra/cs/mailbox/MailSender.java Outdated Show resolved Hide resolved
store/src/java/com/zimbra/cs/mailbox/MailSender.java Outdated Show resolved Hide resolved

package com.zimbra.soap.mail.message;


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove extra space

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@shrutig0510 shrutig0510 self-requested a review December 27, 2024 18:40
@shubhamCS03 shubhamCS03 changed the base branch from develop to ZCS-12409 December 31, 2024 11:51
@shubhamCS03 shubhamCS03 changed the base branch from ZCS-12409 to feature/mailRecall_ZCS-12409 January 2, 2025 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.