Skip to content

Collect request invocation headers in RequestCtx #1978

@calavera

Description

@calavera

When I trigger a new request, I would like my application to access the headers that I sent in the request invocation call. Applications that integrate with Tensorlake might want to send information in headers that are common in system integrations. There are two examples that come to my mind where this would be useful, but there might be more:

  1. Integrating with external observability services: A caller sends a Trace-ID header and wants to preserve it across our applications invocations.
  2. Verifying payload integrity: It's very common in integration systems like webhooks clients to verify the integrity of the payload by sharing a token between the server and the receiver as a header. Our own documentation explains this use case: https://docs.tensorlake.ai/webhooks/overview#secure-your-endpoints-with-signature-verification

Security considerations

Because every request invocation requires authentication, we should not propagate the Authentication header, at least by default. We should have a deny list of headers in the server that we don't collect, including the Authentication header. This will prevent us from storing the header in the serialized RequestCtx.

In the future, we could allow applications to explicitly indicate a list of allowed headers that the user wants to collect.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions