Replies: 1 comment 4 replies
-
Thanks. The
and redefine |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi! Thank you so much for the awesome GraphQL package, we love it.
Currently, we can prevent the user from selecting particular fields in the response of a query using
@canRoot(ability: 'viewEmail')
, etc. This is great for granular authorization.However, even if the user cannot select a field due to this authorization, they may infer what it contains, by querying that field they do not have access to. For example, they can check if a user has a particular email address or not, by querying the
email
field with your package and seeing if there are results or not. This could be classed as a security vulnerability in the GraphQL API itself, especially if the user can query sensitive information they do not have access to.It would be awesome if we could apply a
@canRoot
or a similar directive to a query field, which would prevent the user from being able to use that field in the query. For example:Please let me know if this request is confusing and you need clarification, or if I can help in any way. I have tried creating custom Lighthouse directives, but they don't seem to apply to fields in the query, I think there is some post-processing going on in your package.
Many thanks!
Dan
Beta Was this translation helpful? Give feedback.
All reactions