SlideShare a Scribd company logo
GraphQL with Security
ideas and thinkings
@shiufunpoon
What is GraphQL
 Query language
 User drives the query
 Like a database query to the database, this is query to the rest endpoint
 E.g. Given me the book title of all the books from the libraries in San Francisco with zip code
94403
 Allow user to specify the data the is needed (nothing more, nor less)
 One single endpoint for the request
 Data is in a graph structure (if you can build the relationship to the data, you can
get the data)
 REST is well-structured with schema (like swagger) and , GraphQL not so
 Will it replace REST ? ¯_(ツ)_/¯
The Basic
 Transport protection
 Over TLS, are you using TLS 1.3 ? No ? How about TLS 1.2 with secure ciphers ?
 Mutual TLS is best, but with HUGE overhead
 Rate Limit
 With one endpoint, all queries is using the same endpoint, what is your strategy to
protect this endpoint ?
 Rate limit by client_ip ?
 Throttling ?
 Time limit
 How long does the query take ? Make sure timeout is set appropriately – so no single
query will take up all the resources
 Data Leakage
 Use of `AllowList` or `BlockList` to fine tuned what can be returned, even with user asking
for the data
GraphQL consideration
 Query complexity
 Complexity
 Difficult to calculate the complexity
 Need SME to provide weight on query
 Protect against cycling reference
 Depth of the query
 Payload size Limit
 How large is the response payload
 Validation of request
 Label (known label)
 Query search string size limit
Authentication
 Authentication
 Client credential with mutual TLS
 this is on protocol level
 HTTP based Authentication, e.g. HTTP Basic, HTML FormBased
 Token based authentication
 JWT
 OIDC (OAuth)
 Cookie
 Spengo/Kerberos
 SAML HTTP Post Binding
Authorization
 Authorization
 OAuth
 OAuth uses scope
 map the scope concept to the open-ended query/action
 Use as the initial permission decision (coarse grained decision)
 If token is JWT format, utilize JWT claim to provide a context for authorization decision
 Delegate to the business layer on the finer grained access
 Be on watch out for
 GDPR (exposing information required by caller, but not authorize by user)
 PCI compliance data
 Confidential data
 Chaining authorization layer for layering permission approach

More Related Content

PPT
Pentest Application With GraphQL | Null Bangalore Meetup
PDF
Hacking and Defending APIs - Red and Blue make Purple.pdf
PPTX
Getting Started with API Security Testing
PPT
Intrusion detection system ppt
PPTX
Command injection
PPTX
Nmap101 Eğitim Sunumu - Nmap Kullanım Kılavuzu
PPT
Scanning web vulnerabilities
PPTX
Rest API Security - A quick understanding of Rest API Security
Pentest Application With GraphQL | Null Bangalore Meetup
Hacking and Defending APIs - Red and Blue make Purple.pdf
Getting Started with API Security Testing
Intrusion detection system ppt
Command injection
Nmap101 Eğitim Sunumu - Nmap Kullanım Kılavuzu
Scanning web vulnerabilities
Rest API Security - A quick understanding of Rest API Security

What's hot (20)

PDF
APISecurity_OWASP_MitigationGuide
PPTX
Going Beyond Microsoft IIS Short File Name Disclosure - NahamCon 2023 Edition
PPTX
Secure Code Warrior - CRLF injection
PDF
Attacking and defending GraphQL applications: a hands-on approach
PPT
What is NAC
PPTX
Firmware analysis 101
PPTX
Zen map
PDF
TCP/IP Ağlarda İleri Seviye Paket Analizi – Tshark
PDF
AAA & RADIUS Protocols
PPT
Cross Site Request Forgery
PDF
Hping Kullanarak Ağ Keşif Çalışmaları
PDF
Sızma Testlerinde Armitage Kullanımı
PDF
Pentesting GraphQL Applications
PDF
Admission controllers - PSP, OPA, Kyverno and more!
PPTX
Cisco ASA Firewall Presentation - ZABTech center Hyderabad
PPTX
COMPUTER SECURITY AND OPERATING SYSTEM
PPTX
Firewalls and packet filters
PPTX
API Security Fundamentals
PDF
SAML Protocol Overview
APISecurity_OWASP_MitigationGuide
Going Beyond Microsoft IIS Short File Name Disclosure - NahamCon 2023 Edition
Secure Code Warrior - CRLF injection
Attacking and defending GraphQL applications: a hands-on approach
What is NAC
Firmware analysis 101
Zen map
TCP/IP Ağlarda İleri Seviye Paket Analizi – Tshark
AAA & RADIUS Protocols
Cross Site Request Forgery
Hping Kullanarak Ağ Keşif Çalışmaları
Sızma Testlerinde Armitage Kullanımı
Pentesting GraphQL Applications
Admission controllers - PSP, OPA, Kyverno and more!
Cisco ASA Firewall Presentation - ZABTech center Hyderabad
COMPUTER SECURITY AND OPERATING SYSTEM
Firewalls and packet filters
API Security Fundamentals
SAML Protocol Overview
Ad

Similar to GraphQL Security (20)

PPT
Nss Labs Dpi Intro V3
PPTX
"Fast / Resilient / .NET – What to Choose?" Serhiy Kalinets
PDF
Organizational compliance and security in Microsoft SQL 2012-2016
PPT
Woa. Reloaded
PDF
HTTPs Strict Transport Security
PPT
Cloud computing @ slideshare
PPTX
SOAP vs REST
PPTX
Introducing SOA and Oracle SOA Suite 11g for Database Professionals
PDF
(Speaker Notes Version) Architecting An Enterprise Storage Platform Using Obj...
PPT
Scalable Reliable Secure REST
PPT
Web Services
PPT
Web Services
PPTX
Software performance testing_overview
PPT
Real Time Java DDS
PDF
Efficient Similarity Search over Encrypted Data
PPT
Signed metadata : method and application
DOCX
Privacy-Preserving Multi-keyword Top-k Similarity Search Over Encrypted Data
PDF
IRJET - Confidential Image De-Duplication in Cloud Storage
PPT
W-JAX Performance Workshop - Web and AJAX
PDF
Introduction to gRPC: A general RPC framework that puts mobile and HTTP/2 fir...
Nss Labs Dpi Intro V3
"Fast / Resilient / .NET – What to Choose?" Serhiy Kalinets
Organizational compliance and security in Microsoft SQL 2012-2016
Woa. Reloaded
HTTPs Strict Transport Security
Cloud computing @ slideshare
SOAP vs REST
Introducing SOA and Oracle SOA Suite 11g for Database Professionals
(Speaker Notes Version) Architecting An Enterprise Storage Platform Using Obj...
Scalable Reliable Secure REST
Web Services
Web Services
Software performance testing_overview
Real Time Java DDS
Efficient Similarity Search over Encrypted Data
Signed metadata : method and application
Privacy-Preserving Multi-keyword Top-k Similarity Search Over Encrypted Data
IRJET - Confidential Image De-Duplication in Cloud Storage
W-JAX Performance Workshop - Web and AJAX
Introduction to gRPC: A general RPC framework that puts mobile and HTTP/2 fir...
Ad

More from Shiu-Fun Poon (19)

PDF
APIConnect Security Best Practice
PPTX
IBM APIc API security protection mechanism
PDF
How to create a User Defined Policy with IBM APIc (v10)
PPTX
Cheatsheet to run DP docker
PDF
How to migrate an application in IBM APIc, and preserve its client credential
PDF
DataPower as PCI
PPTX
How to integration with 3rd Party OAuth Provider with IBM APIc
PDF
How to integration DataPower with Zos
PDF
DataPower Security Hardening
PDF
IBM Apic toolkit cheatsheet
PPTX
DataPower DoS/DDoS
PDF
Social Login (Nested OAuth/OIDC)
PDF
White vs Black list
PDF
APIC/DataPower security
PPTX
Open Banking via APIc 2018
PPTX
Gateway/APIC security
PDF
Gateway deepdive
PDF
Token, token... From SAML to OIDC
PDF
OAuth 2.0 with IBM WebSphere DataPower
APIConnect Security Best Practice
IBM APIc API security protection mechanism
How to create a User Defined Policy with IBM APIc (v10)
Cheatsheet to run DP docker
How to migrate an application in IBM APIc, and preserve its client credential
DataPower as PCI
How to integration with 3rd Party OAuth Provider with IBM APIc
How to integration DataPower with Zos
DataPower Security Hardening
IBM Apic toolkit cheatsheet
DataPower DoS/DDoS
Social Login (Nested OAuth/OIDC)
White vs Black list
APIC/DataPower security
Open Banking via APIc 2018
Gateway/APIC security
Gateway deepdive
Token, token... From SAML to OIDC
OAuth 2.0 with IBM WebSphere DataPower

Recently uploaded (20)

PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PPTX
Oracle Fusion HCM Cloud Demo for Beginners
PDF
iTop VPN Free 5.6.0.5262 Crack latest version 2025
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PPTX
Transform Your Business with a Software ERP System
PPTX
Advanced SystemCare Ultimate Crack + Portable (2025)
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PDF
iTop VPN 6.5.0 Crack + License Key 2025 (Premium Version)
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PDF
17 Powerful Integrations Your Next-Gen MLM Software Needs
PDF
Designing Intelligence for the Shop Floor.pdf
PDF
Salesforce Agentforce AI Implementation.pdf
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PPTX
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
PPTX
Why Generative AI is the Future of Content, Code & Creativity?
PDF
Download FL Studio Crack Latest version 2025 ?
PDF
Tally Prime Crack Download New Version 5.1 [2025] (License Key Free
PPTX
Computer Software and OS of computer science of grade 11.pptx
PPTX
Patient Appointment Booking in Odoo with online payment
PPTX
Monitoring Stack: Grafana, Loki & Promtail
Wondershare Filmora 15 Crack With Activation Key [2025
Oracle Fusion HCM Cloud Demo for Beginners
iTop VPN Free 5.6.0.5262 Crack latest version 2025
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
Transform Your Business with a Software ERP System
Advanced SystemCare Ultimate Crack + Portable (2025)
Navsoft: AI-Powered Business Solutions & Custom Software Development
iTop VPN 6.5.0 Crack + License Key 2025 (Premium Version)
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
17 Powerful Integrations Your Next-Gen MLM Software Needs
Designing Intelligence for the Shop Floor.pdf
Salesforce Agentforce AI Implementation.pdf
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
Why Generative AI is the Future of Content, Code & Creativity?
Download FL Studio Crack Latest version 2025 ?
Tally Prime Crack Download New Version 5.1 [2025] (License Key Free
Computer Software and OS of computer science of grade 11.pptx
Patient Appointment Booking in Odoo with online payment
Monitoring Stack: Grafana, Loki & Promtail

GraphQL Security

  • 1. GraphQL with Security ideas and thinkings @shiufunpoon
  • 2. What is GraphQL  Query language  User drives the query  Like a database query to the database, this is query to the rest endpoint  E.g. Given me the book title of all the books from the libraries in San Francisco with zip code 94403  Allow user to specify the data the is needed (nothing more, nor less)  One single endpoint for the request  Data is in a graph structure (if you can build the relationship to the data, you can get the data)  REST is well-structured with schema (like swagger) and , GraphQL not so  Will it replace REST ? ¯_(ツ)_/¯
  • 3. The Basic  Transport protection  Over TLS, are you using TLS 1.3 ? No ? How about TLS 1.2 with secure ciphers ?  Mutual TLS is best, but with HUGE overhead  Rate Limit  With one endpoint, all queries is using the same endpoint, what is your strategy to protect this endpoint ?  Rate limit by client_ip ?  Throttling ?  Time limit  How long does the query take ? Make sure timeout is set appropriately – so no single query will take up all the resources  Data Leakage  Use of `AllowList` or `BlockList` to fine tuned what can be returned, even with user asking for the data
  • 4. GraphQL consideration  Query complexity  Complexity  Difficult to calculate the complexity  Need SME to provide weight on query  Protect against cycling reference  Depth of the query  Payload size Limit  How large is the response payload  Validation of request  Label (known label)  Query search string size limit
  • 5. Authentication  Authentication  Client credential with mutual TLS  this is on protocol level  HTTP based Authentication, e.g. HTTP Basic, HTML FormBased  Token based authentication  JWT  OIDC (OAuth)  Cookie  Spengo/Kerberos  SAML HTTP Post Binding
  • 6. Authorization  Authorization  OAuth  OAuth uses scope  map the scope concept to the open-ended query/action  Use as the initial permission decision (coarse grained decision)  If token is JWT format, utilize JWT claim to provide a context for authorization decision  Delegate to the business layer on the finer grained access  Be on watch out for  GDPR (exposing information required by caller, but not authorize by user)  PCI compliance data  Confidential data  Chaining authorization layer for layering permission approach