Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add auth GraphQL directive to control field visibility according to auth roles #478

Open
ujibang opened this issue Aug 8, 2023 · 0 comments
Assignees
Milestone

Comments

@ujibang
Copy link
Contributor

ujibang commented Aug 8, 2023

Brief overview

Enhance GraphQL authorization providing a field directive to enforce visibility on the basis of client role.

Rationale

Currently RH allows to provide different views to different roles with the so called multi-schema solution: see https://restheart.org/docs/security/security-hardening#define-role-specific-graphql-applications

A more flexible approach is providing a directive to control field visibility:

type Query {
  hidden: String! @visible(roles:["foo", "bar"])
  person(id: ID!): Person
}

See also https://www.graphql-java.com/documentation/field-visibility/

Detailed documentation

TBD

@ujibang ujibang added this to the 8.0 milestone Aug 8, 2023
@ujibang ujibang self-assigned this Aug 8, 2023
@ujibang ujibang changed the title Add auth GraphQL directive to control field visibility to roles Add auth GraphQL directive to control field visibility according to auth roles Aug 9, 2023
@ujibang ujibang modified the milestones: 8.0, 8.1 Apr 17, 2024
@ujibang ujibang modified the milestones: 8.1, 8.2 Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant