Encrypt/hide custom headers in watchers

Hey! I have finished a webhook connection for a watcher. This webhook uses alot of custom headers and Bearer token authorization. All this is possible and working great with the headers. One issue that has come up though is the wish to encrypt or hide the Bearer token custom header in some way, to prevent it being unlawfully used in other projects. It would have been nice if it was possible to use basic auth in this case since there is built in functionality for encrypting the password field. But that is not an option here. Feels like I have almost googled myself to the conclusion that this is not possible. Could this be used in some way? elasticsearch-syskeygen | Elasticsearch Reference [7.10] | Elastic

Below is a very stripped version of the webhook configuration. Thanks!

    "my_webhook": {
      "webhook": {
        "scheme": "https",
        "host": "<somehost>",
        "port": 443,
        "method": "post",
        "path": "<somepath>",
        "params": {},
        "headers": {
          "Authorization": "Bearer <some uuid token>",
        },
        "body": "{{#toJson}}ctx.payload.body{{/toJson}}}"
      }
    }

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.