hasura / hasura/graphql-engine

[Feature Request]: Forward Client Header in Event Triggers

Open
#4,448 5 comments 6 reactions 0 assignees View on GitHub
a/eventing/data-triggers c/server
Dominant language
TypeScript
Stars
32.1k
Forks
3k
PR merge metrics
PR metrics pending

Description

## 🚀 Feature request

### Current Behavior
Events are great if you want to trigger custom logic after a specified table has changed. Therefore you can call a webhook pointing to a serverless function. But if the endpoint of your serverless function is secured, you will need a valid access-token in your header, which is currently not able, because events don't forward the client-header.

If you use for example Auth0, you can extend Hasura with a jwt-secret to validate authenticated user-requests. After processing the database, however, events must be used to forward further processing via an unsecured connection, which is a kind of security risk.

### Desired Behavior

I want to be able to forward the access-token to be able to validate the request on the serverless-function-endpoint, too - therefore the complete track is secured.

### Suggested Solution

Forward client headers in event triggers as it is possible in actions.

### Describe alternatives you've considered

As described, via actions it is possible to forward the client header, so I can use actions instead of events if I need more secure webhook-calls...

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.