aries-cloudagent-python icon indicating copy to clipboard operation
aries-cloudagent-python copied to clipboard

Additional security controls for webhooks for multi-tenancy

Open tbloomfi opened this issue 2 years ago • 5 comments
trafficstars

We have a security requirement for tenants to rotate keys for all inbound API calls including webhooks. For webhooks, this would be challenging to manage centrally and is better managed by the tenant. Posting here for feedback on the planned approach before submitting a PR.

The approach is as follows:

  1. Add an ACA-Py API endpoint to enable the tenant to create and manage a webhook secret. Note: Inbound API calls will be secured via OIDC via an external API gateway as part of our deployment.
  2. Create a hash signature (SHA-256?) for the webhook messages using the webhook secret
  3. Include the hash in the HTTP header for the message
  4. The tenant would then be responsible for validating webhook messages as authentic using the secret managed by their controller. The controller would update the secret based on the tenant's security policy.

This is a pattern used by Github and others to secure webhooks - https://docs.github.com/en/developers/webhooks-and-events/webhooks/securing-your-webhooks

tbloomfi avatar Nov 25 '22 16:11 tbloomfi

@andrewwhitehead @ianco @TimoGlastra ^^^ Thoughts on this approach?

swcurran avatar Nov 25 '22 21:11 swcurran

Makes sense to me, if it's a common pattern. For backward compatibility, this should be optional, with a default to the existing "static" api key.

Note that the mines team has developed some self-serve functionality for tenants as well, which they've implemented as a plug-in. tagging @usingtechnology

ianco avatar Nov 25 '22 23:11 ianco

we can do a prototype of this when we add some enhancements for our tenants in the innkeeper plugin.

usingtechnology avatar Nov 25 '22 23:11 usingtechnology

@esune -- is this issue addressed with #2860?

swcurran avatar Aug 14 '24 22:08 swcurran

@esune -- is this issue addressed with #2860?

No, this is a different thing. I wonder, however, if this issue and #2542 should be consolidated into one.

esune avatar Aug 15 '24 16:08 esune