hasura / hasura/graphql-engine

Allow 403 response from Auth Webhook to client

Open
#10,029 1 comment 2 reactions 0 assignees View on GitHub
k/enhancement t/gql-services v2
Dominant language
TypeScript
Stars
32.1k
Forks
3k
PR merge metrics
PR metrics pending

Description

It would be valuable to be able to send a 403 Forbidden response to Hasura and have Hasura pass that code through to the client so that we can determine the difference between unauthenticated and unauthorized requests.

For example:

1. Someone with an expired or invalid token would get a 401 and need to log back in.
2. Someone who was sent a link to a resource they should not be allowed to access would get a 403 and a nice message telling them they need permission to access the resource.

Contributor guide

Open the contributing guide

Research direction

Start by locating Auth Webhook response handling and its existing tests in the repository. Trace how 401 responses reach Hasura clients, then determine where a 403 response should be preserved. Done means clients can distinguish unauthenticated 401 responses from unauthorized 403 responses.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql, typescript
Domain
api, authentication, authorization
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.