hasura / hasura/graphql-engine
Cloud: Collaborator identifier in session
- 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
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