Skip to content

Allow whitelisted session variables to be passed through HTTP headers #1601

@lanthaler

Description

@lanthaler

Currently all X-Hasura-* HTTP headers are filtered and not available to to be used in column presets or permission checks. This means that switching between organizations in the example use case in the docs requires to either use webhook based auth or to get a new the JWT each time the user switches to a different organization.

I discussed this briefly with @coco98 on Discord and he mentioned this is for security reasons. I do understand the reasoning but don't think it should apply to all headers. Enforcing that the user only acts on behalf of allowed organization is still possible. Similarly, there are probably plenty of use cases where it the information passed via a HTTP header has nothing to do with auth (I'm thinking of things such as passing the client version, A/B experiment logging etc.).

Would it be possible to whitelist certain headers to be used as session variables?

Metadata

Metadata

Assignees

Labels

a/authnIssues related to "authentication" and capturing session claims from an API callc/serverRelated to serverc/v3-engineV3 Metadata and Engineiterationk/enhancementNew feature or improve an existing features/triagedThis has been reviewed by Hasurat/gql-servicesv3

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions