Webhook Security: HMAC signature

Webhook Security: HMAC signature

Secure your project's, task's, and issue's webhooks with HMAC-SHA 256 (Hash-Based Message Authentication Codes with SHA 256). Zoho Projects has the option to secure webhooks using HMAC-SHA 256, an industry standard hashing mechanism to ensure and maintain the authenticity and integrity of webhooks. 

HMAC helps check:
  1. If the webhook request has been sent from Zoho Projects (The secret key must be known only to Zoho Projects and the receiving application).
  2. If the webhook content has been tampered with along the way.

Why secure Webhooks?

Webhooks are HTTP requests of one application to provide real-time data to another application. In a security attack, the attackers can easily impersonate legitimate providers by sending fraudulent webhooks and extracting sensitive data. Therefore, webhooks need to be secure so that your app only listens to real events from trusted sources and doesn’t get tricked by fake or harmful requests.

Benefits:

  1. Avoid wrong data in reports
  2. Avoid unauthorized updates
  3. Avoid security breaches

Enable Webhook security

Users can enable webhook security setting while adding or editing a webhook.
  1. Go to Settings > Automation/ Issue Tracker > Webhooks.
  2. For new webhooks, fill in the details in the webhook form and toggle Security Settings. For existing webhooks, select the webhook where you want to enable security.
  3. Enter the HMAC key. Users can also generate HMAC key by clicking on Generate.
  4. Click Save.
Notes
HMAC key length should be between 16 to 128 characters long.

How does webhook security work in Zoho Projects?  

When a webhook is sent from Zoho Projects, an HMAC signature is included in the request headers with the name X-ZP-WEBHOOK-SIGNATURE. Upon receiving the webhook request, the receiving application will generate a HMAC signature using the same secret key and compare the results with the value present in the request header. If the value matches, the data is legitimate; otherwise, the data has been tampered with.

Generating a HMAC signature  

Zoho Projects calculates the signature of the webhook payload using the HMAC-SHA256 algorithm, and the result is sent in base64 format in the request header. Here is the explanation with sample data:

 payload
  {{"requests":{"request_name":"Test Name"},"notifications":      {"operation_type":"RequestSigningSuccess"}}
 secret_key
  thisisthesamplekeyfortestingpurposes
 base64encode(HMAC SHA-256(payload+secret_key))
  drbSrM4H816RYKpZiRBLddUa0yHaTrwjtY04sIZFZus=

Here is an image of how webhook request header(HMAC header) look like:

Verifying HMAC signature in the receiving application  

  1. You must read the payload as a string to avoid reordering keys when read in JSON format.
  2. Compute HMAC SHA-256 hash of the payload using the secret key and base64 encode the result.
  3. Compare the value obtained from step 2 and the received HMAC header (X-ZP-WEBHOOK-SIGNATURE) value. If there is a mismatch, reject the webhook request.

A sample of Java code snippet to verify the HMAC signature:


      Create. Review. Publish.

      Write, edit, collaborate on, and publish documents to different content management platforms.

      Get Started Now


        Access your files securely from anywhere

          Zoho CRM Training Programs

          Learn how to use the best tools for sales force automation and better customer engagement from Zoho's implementation specialists.

          Zoho CRM Training
            Redefine the way you work
            with Zoho Workplace

              Zoho DataPrep Personalized Demo

              If you'd like a personalized walk-through of our data preparation tool, please request a demo and we'll be happy to show you how to get the best out of Zoho DataPrep.

              Zoho CRM Training

                Create, share, and deliver

                beautiful slides from anywhere.

                Get Started Now


                  Zoho Sign now offers specialized one-on-one training for both administrators and developers.

                  BOOK A SESSION







                              Quick LinksWorkflow AutomationData Collection
                              Web FormsEnterpriseOnline Data Collection Tool
                              Embeddable FormsBankingBegin Data Collection
                              Interactive FormsWorkplaceData Collection App
                              CRM FormsCustomer ServiceAccessible Forms
                              Digital FormsMarketingForms for Small Business
                              HTML FormsEducationForms for Enterprise
                              Contact FormsE-commerceForms for any business
                              Lead Generation FormsHealthcareForms for Startups
                              Wordpress FormsCustomer onboardingForms for Small Business
                              No Code FormsConstructionRSVP tool for holidays
                              Free FormsTravelFeatures for Order Forms
                              Prefill FormsNon-Profit

                              Intake FormsLegal
                              Mobile App
                              Form DesignerHR
                              Mobile Forms
                              Card FormsFoodOffline Forms
                              Assign FormsPhotographyMobile Forms Features
                              Translate FormsReal EstateKiosk in Mobile Forms
                              Electronic Forms
                              Drag & drop form builder

                              Notification Emails for FormsAlternativesSecurity & Compliance
                              Holiday FormsGoogle Forms alternative GDPR
                              Form to PDFJotform alternativeHIPAA Forms
                              Email FormsFormstack alternativeEncrypted Forms

                              Wufoo alternativeSecure Forms

                              WCAG

                                      Create. Review. Publish.

                                      Write, edit, collaborate on, and publish documents to different content management platforms.

                                      Get Started Now







                                                        You are currently viewing the help pages of Qntrl’s earlier version. Click here to view our latest version—Qntrl 3.0's help articles.




                                                            Manage your brands on social media


                                                              • Desk Community Learning Series


                                                              • Digest


                                                              • Functions


                                                              • Meetups


                                                              • Kbase


                                                              • Resources


                                                              • Glossary


                                                              • Desk Marketplace


                                                              • MVP Corner


                                                              • Word of the Day


                                                              • Ask the Experts


                                                                Zoho Sheet Resources

                                                                 

                                                                    Zoho Forms Resources


                                                                      Secure your business
                                                                      communication with Zoho Mail


                                                                      Mail on the move with
                                                                      Zoho Mail mobile application

                                                                        Stay on top of your schedule
                                                                        at all times


                                                                        Carry your calendar with you
                                                                        Anytime, anywhere




                                                                              Zoho Sign Resources

                                                                                Sign, Paperless!

                                                                                Sign and send business documents on the go!

                                                                                Get Started Now




                                                                                        Zoho TeamInbox Resources





                                                                                                  Zoho DataPrep Demo

                                                                                                  Get a personalized demo or POC

                                                                                                  REGISTER NOW


                                                                                                    Design. Discuss. Deliver.

                                                                                                    Create visually engaging stories with Zoho Show.

                                                                                                    Get Started Now








                                                                                                                        • Related Articles

                                                                                                                        • Zoho Vault for Zoho Projects

                                                                                                                          Zoho Vault is an online password manager for teams. If you are struggling with remembering numerous passwords, Zoho Vault can keep them safe for you. It helps to store, share, and manage your passwords from anywhere. Zoho Vault is the best way to ...
                                                                                                                        • Webhooks for Tasks

                                                                                                                          Webhooks facilitate automated HTTP notifications to third party applications from Zoho Projects. Webhooks allow you to send real-time data from one application to another whenever an event occurs. Using Webhooks, you can configure your own HTTP URLs ...
                                                                                                                        • Github Integration

                                                                                                                          Github integration allows you to host your repositories, see source commits, and make code changes. And so, now you can view all the changes made in your Github repository in Zoho Projects. Feature Availability: Premium and Enterprise plans Copy ...
                                                                                                                        • Bitbucket Integration

                                                                                                                          Having multiple lines of code and changing versions can be difficult to track. Commit codes in Bitbucket and view the changesets inside Zoho Projects. You can integrate Zoho BugTracker with Bitbucket using webhooks. You must be an Admin to integrate ...
                                                                                                                        • Webhooks for Projects

                                                                                                                          Webhooks enable users to send automated HTTP notifications to third-party applications. Webhooks transmit real-time data from one application to another when an event or trigger occurs. You can define your own HTTP URLs and associate them with ...
                                                                                                                          Wherever you are is as good as
                                                                                                                          your workplace

                                                                                                                            Resources

                                                                                                                            Videos

                                                                                                                            Watch comprehensive videos on features and other important topics that will help you master Zoho CRM.



                                                                                                                            eBooks

                                                                                                                            Download free eBooks and access a range of topics to get deeper insight on successfully using Zoho CRM.



                                                                                                                            Webinars

                                                                                                                            Sign up for our webinars and learn the Zoho CRM basics, from customization to sales force automation and more.



                                                                                                                            CRM Tips

                                                                                                                            Make the most of Zoho CRM with these useful tips.



                                                                                                                              Zoho Show Resources