Skip to content

Add config for Webhook Signature #1859

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

Closed
5 tasks done
robotdan opened this issue Sep 1, 2022 · 6 comments
Closed
5 tasks done

Add config for Webhook Signature #1859

robotdan opened this issue Sep 1, 2022 · 6 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@robotdan
Copy link
Member

robotdan commented Sep 1, 2022

Add config for Webhook Signature

Description

The smart folks over at ngrok have put together a bunch of great information on webhooks, best practices, and reviewed a bunch of existing webhook producers to identify common behaviors.

Solution

Things we should consider:

Additional context

Once this is complete, submit a PR to add our name to this list:

Related

Community guidelines

All issues filed in this repository must abide by the FusionAuth community guidelines.

How to vote

Please give us a thumbs up or thumbs down as a reaction to help us prioritize this feature. Feel free to comment if you have a particular need or comment on how this feature should work.

Documentation

  • Document webhook.signatureConfiguration.enabled and webhook.signatureConfiguration.signingKeyId fields on API
  • Document new fields in admin UI
  • Document webhook signatures mechanisms, headers, and provide sample code in new doc page under Events & Webhooks
  • Update screenshots for admin UI (wait for other webhook features to be merged)
  • Add webhook.signatureConfiguration.signingKeyId to Key Rotation page

Release Notes

Add support for signing webhook events with a SHA-256 hash function. This feature will allow consumers of FusionAuth events to verify the message body has not been modified. The signature is contained in a JWT and will be sent using an HTTP request header named X-FusionAuth-Signature-JWT. You may use existing JWT verification strategies including consuming the public key from the JWKS endpoint.
** See the link:/docs/v1/tech/events-webhooks/signing[Signing Webhooks] and link:/docs/v1/tech/apis/webhooks[Webhooks APIs] for signing and verification details.

@andrewpai andrewpai added this to the 1.48.0 milestone Jul 28, 2023
@attilah
Copy link

attilah commented Aug 4, 2023

I was wondering about this specific feature reading through the documentation and did not find it, now happy to see it coming in the next version.

For webhooks it is pretty common to create a HMAC-SHA256 or HMAC-SHA384 or HMAC-SHA512 for the payload and include a timestamp and option to include sensitive headers in the hash as it is summed up at webhooks.fyi.

Configuration options I can think of:

  • Hashing algorithm
  • Shared Secrets - could be rotated while the old ones have to be available for already sent out webhooks to check against validity, these shared secrets should be available through API to sync in other systems, also sending out a webhook when these are mutated in any way would be useful to trigger a sync?
  • HTTP Headers to include in hash
  • HTTP Header name for Signature in webhook request
  • HTTP Header name for Timestamp in webhook request

Have a tenant level global configuration and overrides at webhook level would be a good option, or have "named configurations" that could be assigned with a simple selection per webhook.

Beside this, JWT based security would be a useful and secure feature: https://webhooks.fyi/security/jwt-jwk-oauth2

@bhalsey bhalsey self-assigned this Sep 13, 2023
@mooreds
Copy link
Collaborator

mooreds commented Sep 18, 2023

@attilah FYI, pinged the engineer working on this and it is currently in code review.

@attilah
Copy link

attilah commented Sep 18, 2023

Thanks for the update @mooreds!

@mooreds
Copy link
Collaborator

mooreds commented Sep 18, 2023

Actually, I spoke to soon. It is in design review, not code review. Sorry bout that.

@mooreds
Copy link
Collaborator

mooreds commented Sep 20, 2023

@attilah there's some internal discussion and thought you might weigh in. Can you think of any reason you might want to be able to have webhook messages signed by an RSA/ECC key (instead of HMAC)?

Or will HMAC suit your needs?

@robotdan robotdan added the enhancement New feature or request label Sep 27, 2023
@robotdan
Copy link
Member Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Delivered
Development

No branches or pull requests

5 participants