apidays LIVE Paris - GraphQL: the AppSec perspective by Vladimir de Turckheim
17 Dec 2020•0 j'aime•224 vues
Télécharger pour lire hors ligne
Signaler
Technologie
apidays LIVE Paris - Responding to the New Normal with APIs for Business, People and Society
December 8, 9 & 10, 2020
GraphQL: the AppSec perspective
Vladimir de Turckheim, Lead Node.js Engineer at Sqreen
2. VLADIMIR DE TURCKHEIM
Lead Customer Engineer @ Sqreen
: Node.js Collaborator
: Node.js Security WG member
: Former Cyber-Security consultant
@vdeturckheim
vladimir@sqreen.io
@poledesfetes
3. I AM NOT A GRAPHQL EXPERT
“booooo!”
MY IMPOSTOR SYNDROME
@poledesfetes
18. Identifying use of GraphQL
@poledesfetes
Applications using GraphQL can easily be identified
• Use of GraphQL-related libraries
• POST requests to a /graphql endpoint
• POST requests with GraphQL payloads
35. GraphQL object injection
@poledesfetes
The JSON customs scalar type is very popular.
It can be a vector for object injections.
Object injections can lead to NoSQL injections.
36. A WORD ABOUT USERS
“Authentication, Authorisation, ACL”
ME, JUST DROPPING KEYWORDS
@poledesfetes
38. User management mistakes
@poledesfetes
It is very tempting to make GraphQL resolvers pure in
the sense that they would be not context-aware.
Thinking this way can lead to exposing the whole user
database.
42. User-aware
@poledesfetes
For each query, you must check:
• Endpoint rights - is this user allowed to perform this
operation?
• Data-related rights - is this user allowed to access
the outcome of the operation?
43. A FEW BEST PRACTICES AND GOTCHAS
“Wait, there is a last part?”
SOMEONE WHO EXPECTED THE TALK TO BE SHORTER
@poledesfetes