Maker API: let me put the webhook secret somewhere other than the URL

Hi all,

I've got Maker API posting device events to a little home-automation daemon I run, through "URL to send device events to by POST".
Works great, thanks for that.

The one wart: the only way I can tell my receiver "yes, this really came from my hub" is to stick a secret in the URL, like
https://myhost/hubitat/event?key=s3cret. And everything between the hub and my app loves to log URLs. My Apache box writes the full
request line, query string and all, to its access log on every single event. So my "secret" now lives in a log file and every backup
of it. I'd rather it didn't.

Headers and POST bodies don't get logged by default. Maker API already lets me authenticate to it with either a Bearer header or a query param; I'd love the same choice for the POSTs it sends out. Any of these would make me happy:

  • Easiest: a box where I can add a header or two to the event POSTs, e.g. Authorization: Bearer s3cret or X-Webhook-Key: s3cret.
  • Also fine: an optional "shared secret" setting that drops a field into the JSON body.
  • Gold star: sign the body with HMAC-SHA256 and send the signature in a header, the way GitHub and Stripe webhooks do. Then the secret
    never goes over the wire at all.

Off by default, so nobody's existing setup breaks.

Happy to test a beta. Thanks!

This should work with a Bearer token, too. The Maker API app has a POST example using curl (in the UI itself) that shows this with a header instead of URL parameter:

Send device command (replace [Device ID] with actual subscribed device id and [Command] with a supported command. Supports optional [Secondary value])
[ ... ]
curl -X POST -H "Authorization: Bearer XXXXXXX" "http://x.x.x.x/apps/api/xxxx/devices/[Device ID]/[Command]/[Secondary value]"

Okay, sorry, didn't see that, I was really concerned with the POST Events having some similar capabilities. I'll edit this out of my question so people don't get confused with something already there.