Options to secure API #1479
Replies: 7 comments 6 replies
-
Is this something that could be solved with a custom |
Beta Was this translation helpful? Give feedback.
-
Hi @kiendang the instrospection can be solve with that yes, but not the rest. |
Beta Was this translation helpful? Give feedback.
-
I think a few of these, Alias Overloading, Directive Overloading and Field Duplication could be solved by writing a custom The CSRF issues could be solved by configuring Django if I'm not wrong. |
Beta Was this translation helpful? Give feedback.
-
@kiendang but how to limit the number of aliases, directives and field in a custom validation rule ? |
Beta Was this translation helpful? Give feedback.
-
I guess you could traverse the AST and count the number of occurrences? See Implementing a custom Anw I'm converting this to a discussion which I think is more appropriate. |
Beta Was this translation helpful? Give feedback.
-
I created a feature request because I think security should be a first class citizen in graphene and graphene django. GraphQL is full of holes and I'm not sure I'm qualified to plug those holes correctly. For example in JS Apollo server has a set of limits that one can easily configure: https://www.apollographql.com/docs/router/configuration/operation-limits/ |
Beta Was this translation helpful? Give feedback.
-
@lee-pai-long thanks for providing references to graphql-cop and Apollo. Looks like it could be worth it to implement some of these as @sjdemartini you mentioned you are looking into validation for your GraphQL app? This could be of interest to you. Also |
Beta Was this translation helpful? Give feedback.
-
Is your feature request related to a problem? Please describe.
I used graphql-cop to test my graphql API built using Graphene Django and the result is as follows:
I would like to have options for example to disable or limit use of aliases to prevent Alias Overloading but I can't find options to mitigate this or the other attacks.
Describe the solution you'd like
Is it possible to provide options to mitigate those attacks in a futur version of graphene-django ?
Describe alternatives you've considered
...
Additional context
...
Beta Was this translation helpful? Give feedback.
All reactions