-
Notifications
You must be signed in to change notification settings - Fork 8
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
Security Requirements for WebHook Consumer #222
Comments
In the call of 01.02.2022, there was a mention that the Consumer would have the security of the Thing. I don't think this is realistic given that a Consumer can be a cloud service and the Thing is something in the local network. They can use the same one but making it mandatory that they are the same seems a bit off to me. Do we have any examples? |
Will discuss in next Security TF call. |
We put a lot of comments related to webhooks under #224 but want to move that discussion here. To summarize:
|
I agree that using Bearer tokens in an Authorization header in event requests sent from a Thing to a Consumer is a reasonable solution. Some observations:
|
One solution to this problem might be for a Consumer to provide security credentials in the payload of a Example payload:
As I mentioned above, there's also the issue of what to do if and when a token expires. |
Another source of inspiration could be the W3C WebSub specification. That specification is a little different because in WebSub all Webhooks are managed by a "hub" which acts as an intermediary between publishers and subscribers. Such hubs may have more resources than some Things and therefore may be able to process more complex cryptography. Anyway, the approach they use for "authenticated content distribution" is for a subscriber to supply a "secret" in their subscription request which is used by the hub to create an HMAC signature of each event payload, which is then included in a request header of each event notification. Subscribers can verify event notifications by using the shared secret to recompute the signature for a given payload and check that it matches. As @mmccool notes above, the signing of individual payloads would provide an additional layer of protection when compared with the simple Bearer authentication token approach (by guarding against man-in-the-middle and replay attacks), but would also be more computationally expensive. Perhaps signing of payloads could be explored as an optional layer of security at the same time as signing Thing Descriptions. |
Given that a WebHook consumer also acts as a server, what are its security scheme requirements? If there is any flexibility on this, the Consumer needs to communicate these with a certain format, maybe a TD with no affordance but only security information?
The text was updated successfully, but these errors were encountered: