hasura / hasura/graphql-engine

Cloud: Collaborator identifier in session

Open
#8,820 0 comments 0 reactions 0 assignees View on GitHub
c/cloud k/enhancement t/control-plane
Dominant language
TypeScript
Stars
32.1k
Forks
3k
PR merge metrics
PR metrics pending

Description

`hasura.user` contains session data as described e.g. in the "Auditing tables" guide: https://hasura.io/docs/latest/guides/auditing-tables/

Furthermore, in Hasura Cloud, it's possible to add ~~console~~ project access for collaborators: https://hasura.io/docs/latest/projects/collaborators/

However, it seems to me the session information does not include information about collaborators. Is this possible already or has this been planned?

In practice, I'd like to achieve something like the following:

```
-- this works already
current_setting('hasura.user', 't')::jsonb->>'x-hasura-role';

-- could we have something like this?
current_setting('hasura.user', 't')::jsonb->>'x-hasura-collaborator-id';
```

Contributor guide

Open the contributing guide

Research direction

Start with the Auditing tables and Collaborators guides linked in the issue, then inspect how `hasura.user` session data is populated and exposed to PostgreSQL. Done means establishing whether collaborator identity can be propagated and documenting or implementing the `x-hasura-collaborator-id` value consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql, postgres
Domain
api, authorization
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.