Lighting Talks - Day 1 - GraphQL Galaxy 2020

Rate this content
Bookmark

FAQ

Tyke is a gateway that includes built-in features for securing GraphQL endpoints, such as authorization mechanisms, query depth limiting, and field-based permissions. It allows users to proxy to existing GraphQL services and add security features directly through its dashboard.

Tyke provides several security features for GraphQL APIs including built-in authorization, schema security through field-based permissions, and protection against denial of service attacks by adding query depth limiting.

Query depth limiting is a security measure used to prevent denial of service attacks by restricting the complexity of queries that can be executed against a GraphQL API. It limits the depth of queries to prevent excessively deep and resource-intensive queries.

Authorization in GraphQL via Tyke is enforced by proxying an existing GraphQL API through Tyke and configuring authorization settings in the Tyke dashboard. This setup requires an authentication token to access the proxied API, ensuring that only authorized users can execute queries.

Field-based permissions in GraphQL security involve specifying access controls at the field level within a GraphQL schema. This ensures that only designated users or roles have the access rights to specific fields, enhancing data privacy and compliance.

Yes, Tyke can manage multiple GraphQL services and has mechanisms to resolve naming conflicts that may arise when integrating multiple APIs. This includes manual workarounds and upcoming features intended to streamline conflict resolution.

Query depth refers to how deep a GraphQL query can go. Tyke controls this by allowing administrators to set maximum query depths, which can vary by user group, thereby preventing excessively deep queries that could impact performance or security.

Ryan Severns
Ryan Severns
Matt Tanner
Matt Tanner
Brecht De Rooms
Brecht De Rooms
29 min
02 Jul, 2021

Comments

Sign in or register to post your comment.
Video Summary and Transcription
The video discusses how to secure GraphQL endpoints in five minutes using Tyke. The talk highlights key problems like authorization, schema security, and denial of service attacks. Tyke offers built-in features such as query depth limiting, field-based permissions, and various authentication modes including OAuth 2.0 and mutual TLS. The video explains how to use Tyke's dashboard to proxy existing GraphQL APIs and enforce security measures like authentication tokens. Additionally, it covers the advantages of using native GraphQL as a database query language and the benefits of StackHawk for application security testing. StackHawk's tool simplifies finding and fixing security bugs in GraphQL endpoints, ensuring every pull request is tested for vulnerabilities before production. The talk also mentions common vulnerabilities in GraphQL applications like SQL injection and information disclosure.

1. Securing GraphQL Endpoints with Tyke

Short description:

Hello everyone and welcome to this lightning talk about how to secure your GraphQL endpoints in five minutes. We're gonna be doing that using Tyke. So let's look at a few problems that we're gonna solve within securing GraphQL. First one is adding authorization. Securing the schema, making sure that only specific users have access to specific fields. And then protecting against denial of service attacks. We have batteries included security, which means everything within our gateway is included. We'll add field-based permissions to secure the schema and query depth limiting for denial of service attacks. Let's get right to it. I'm in the Tyke dashboard. I'm gonna show you what I wanna secure. There's this TrevorBlades countries API, GraphQL API, that right now is completely open. I'm gonna proxy to that through Tyke and then secure it using Tyke.

How to Secure GraphQL Endpoints in 5 Minutes

Hello everyone and welcome to this lightning talk about how to secure your GraphQL endpoints in five minutes. And we're gonna be doing that using Tyke. So my name is Matt Tanner. I am a product evangelist here at Tyke. I'm gonna be walking you through this.

So getting right down to it, since we have a limited amount of time, let's look at a few problems that we're gonna solve within securing GraphQL. First one is adding authorization. So authorization, authentication, adding in those mechanisms quickly. Securing the schema, so making sure that only specific users have access to specific fields. And then also looking at protecting us against denial of service attacks.

How do we do that? Well, we have batteries included security, which is a phrase that we like to use at Tyke to say everything that's within our gateway is included. There's no plugins or anything like that that you need to add. And for that, we're gonna add that right in. Then we're going to, as part of that, put in some field-based permissions to secure the schema. And then we're gonna add some query depth limiting to it as well for those denial of service attacks.

So let's see how it works. Let's just get right to it. I'm gonna jump out of this. And here I am in the Tyke dashboard. What I'm gonna do is, first I'm gonna show you what I wanna secure. There's this TrevorBlades countries API, GraphQL API, that right now is completely open and I can hit it. There's no security, no type of security at all. What I'm gonna do is proxy to that through Tyke and then secure it using Tyke. So I'm gonna grab this. This is as if it was your API. You come over into Tyke and we come over to APIs, add new API. I'm gonna call it countries. It is a GraphQL API. We're going to proxy to an existing GraphQL service. And you'll see that I have the TrevorBlades countries URL in there.

2. Authorization and Authentication Modes

Short description:

At this point, we already have some authorization built in. We're enforcing an authentication token, specified in our setup. We support various authentication modes like authentication tokens, mutual TLS, OAuth 2.0, and JOTS.

Now, at this point, believe it or not, we already have some authorization built in. We've now proxied to it. If I come over to the playground, which is built into Tyke, and I run, if I just hide this here, hide meeting controls. If I come over here and grab this query, and I come over back to here and run this query, you'll see that it says authorization field is missing. That's great. That means we're already enforcing an authentication token. Where is that specified? Well, in our setup right down here, we support quite a few different things, but today we're gonna use authentication tokens just for brevity. We also support mutual TLS, OAuth 2.0, JOTS, all of those good type of authentication modes.

QnA

Check out more articles and videos

We constantly think of articles and videos that might spark Git people interest / skill us up or help building a stellar career

From GraphQL Zero to GraphQL Hero with RedwoodJS
GraphQL Galaxy 2021GraphQL Galaxy 2021
32 min
From GraphQL Zero to GraphQL Hero with RedwoodJS
Top Content
Tom Pressenwurter introduces Redwood.js, a full stack app framework for building GraphQL APIs easily and maintainably. He demonstrates a Redwood.js application with a React-based front end and a Node.js API. Redwood.js offers a simplified folder structure and schema for organizing the application. It provides easy data manipulation and CRUD operations through GraphQL functions. Redwood.js allows for easy implementation of new queries and directives, including authentication and limiting access to data. It is a stable and production-ready framework that integrates well with other front-end technologies.
Local State and Server Cache: Finding a Balance
Vue.js London Live 2021Vue.js London Live 2021
24 min
Local State and Server Cache: Finding a Balance
Top Content
This Talk discusses handling local state in software development, particularly when dealing with asynchronous behavior and API requests. It explores the challenges of managing global state and the need for actions when handling server data. The Talk also highlights the issue of fetching data not in Vuex and the challenges of keeping data up-to-date in Vuex. It mentions alternative tools like Apollo Client and React Query for handling local state. The Talk concludes with a discussion on GitLab going public and the celebration that followed.
Batteries Included Reimagined - The Revival of GraphQL Yoga
GraphQL Galaxy 2021GraphQL Galaxy 2021
33 min
Batteries Included Reimagined - The Revival of GraphQL Yoga
Envelope is a powerful GraphQL plugin system that simplifies server development and allows for powerful plugin integration. It provides conformity for large corporations with multiple GraphQL servers and can be used with various frameworks. Envelope acts as the Babel of GraphQL, allowing the use of non-spec features. The Guild offers GraphQL Hive, a service similar to Apollo Studio, and encourages collaboration with other frameworks and languages.
Rock Solid React and GraphQL Apps for People in a Hurry
GraphQL Galaxy 2022GraphQL Galaxy 2022
29 min
Rock Solid React and GraphQL Apps for People in a Hurry
The Talk discusses the challenges and advancements in using GraphQL and React together. It introduces RedwoodJS, a framework that simplifies frontend-backend integration and provides features like code generation, scaffolding, and authentication. The Talk demonstrates how to set up a Redwood project, generate layouts and models, and perform CRUD operations. Redwood automates many GraphQL parts and provides an easy way for developers to get started with GraphQL. It also highlights the benefits of Redwood and suggests checking out RedwoodJS.com for more information.
Adopting GraphQL in an Enterprise
GraphQL Galaxy 2021GraphQL Galaxy 2021
32 min
Adopting GraphQL in an Enterprise
Today's Talk is about adopting GraphQL in an enterprise. It discusses the challenges of using REST APIs and the benefits of GraphQL. The Talk explores different approaches to adopting GraphQL, including coexistence with REST APIs. It emphasizes the power of GraphQL and provides tips for successful adoption. Overall, the Talk highlights the advantages of GraphQL in terms of efficiency, collaboration, and control over APIs.
Step aside resolvers: a new approach to GraphQL execution
GraphQL Galaxy 2022GraphQL Galaxy 2022
16 min
Step aside resolvers: a new approach to GraphQL execution
GraphQL has made a huge impact in the way we build client applications, websites, and mobile apps. Despite the dominance of resolvers, the GraphQL specification does not mandate their use. Introducing Graphast, a new project that compiles GraphQL operations into execution and output plans, providing advanced optimizations. In GraphFast, instead of resolvers, we have plan resolvers that deal with future data. Graphfast plan resolvers are short and efficient, supporting all features of modern GraphQL.

Workshops on related topic

Hands-On Workshop: Introduction to Pentesting for Web Apps / Web APIs
JSNation US 2024JSNation US 2024
148 min
Hands-On Workshop: Introduction to Pentesting for Web Apps / Web APIs
Featured Workshop
Gregor Biswanger
Gregor Biswanger
In this hands-on workshop, you will be equipped with the tools to effectively test the security of web applications. This course is designed for beginners as well as those already familiar with web application security testing who wish to expand their knowledge. In a world where websites play an increasingly central role, ensuring the security of these technologies is crucial. Understanding the attacker's perspective and knowing the appropriate defense mechanisms have become essential skills for IT professionals.This workshop, led by the renowned trainer Gregor Biswanger, will guide you through the use of industry-standard pentesting tools such as Burp Suite, OWASP ZAP, and the professional pentesting framework Metasploit. You will learn how to identify and exploit common vulnerabilities in web applications. Through practical exercises and challenges, you will be able to put your theoretical knowledge into practice and expand it. In this course, you will acquire the fundamental skills necessary to protect your websites from attacks and enhance the security of your systems.
Build a Headless WordPress App with Next.js and WPGraphQL
React Summit 2022React Summit 2022
173 min
Build a Headless WordPress App with Next.js and WPGraphQL
Top Content
WorkshopFree
Kellen Mace
Kellen Mace
In this workshop, you’ll learn how to build a Next.js app that uses Apollo Client to fetch data from a headless WordPress backend and use it to render the pages of your app. You’ll learn when you should consider a headless WordPress architecture, how to turn a WordPress backend into a GraphQL server, how to compose queries using the GraphiQL IDE, how to colocate GraphQL fragments with your components, and more.
API Testing with Postman Workshop
TestJS Summit 2023TestJS Summit 2023
48 min
API Testing with Postman Workshop
Top Content
WorkshopFree
Pooja Mistry
Pooja Mistry
In the ever-evolving landscape of software development, ensuring the reliability and functionality of APIs has become paramount. "API Testing with Postman" is a comprehensive workshop designed to equip participants with the knowledge and skills needed to excel in API testing using Postman, a powerful tool widely adopted by professionals in the field. This workshop delves into the fundamentals of API testing, progresses to advanced testing techniques, and explores automation, performance testing, and multi-protocol support, providing attendees with a holistic understanding of API testing with Postman.
1. Welcome to Postman- Explaining the Postman User Interface (UI)2. Workspace and Collections Collaboration- Understanding Workspaces and their role in collaboration- Exploring the concept of Collections for organizing and executing API requests3. Introduction to API Testing- Covering the basics of API testing and its significance4. Variable Management- Managing environment, global, and collection variables- Utilizing scripting snippets for dynamic data5. Building Testing Workflows- Creating effective testing workflows for comprehensive testing- Utilizing the Collection Runner for test execution- Introduction to Postbot for automated testing6. Advanced Testing- Contract Testing for ensuring API contracts- Using Mock Servers for effective testing- Maximizing productivity with Collection/Workspace templates- Integration Testing and Regression Testing strategies7. Automation with Postman- Leveraging the Postman CLI for automation- Scheduled Runs for regular testing- Integrating Postman into CI/CD pipelines8. Performance Testing- Demonstrating performance testing capabilities (showing the desktop client)- Synchronizing tests with VS Code for streamlined development9. Exploring Advanced Features - Working with Multiple Protocols: GraphQL, gRPC, and more
Join us for this workshop to unlock the full potential of Postman for API testing, streamline your testing processes, and enhance the quality and reliability of your software. Whether you're a beginner or an experienced tester, this workshop will equip you with the skills needed to excel in API testing with Postman.
Build with SvelteKit and GraphQL
GraphQL Galaxy 2021GraphQL Galaxy 2021
140 min
Build with SvelteKit and GraphQL
Top Content
WorkshopFree
Scott Spence
Scott Spence
Have you ever thought about building something that doesn't require a lot of boilerplate with a tiny bundle size? In this workshop, Scott Spence will go from hello world to covering routing and using endpoints in SvelteKit. You'll set up a backend GraphQL API then use GraphQL queries with SvelteKit to display the GraphQL API data. You'll build a fast secure project that uses SvelteKit's features, then deploy it as a fully static site. This course is for the Svelte curious who haven't had extensive experience with SvelteKit and want a deeper understanding of how to use it in practical applications.

Table of contents:
- Kick-off and Svelte introduction
- Initialise frontend project
- Tour of the SvelteKit skeleton project
- Configure backend project
- Query Data with GraphQL
- Fetching data to the frontend with GraphQL
- Styling
- Svelte directives
- Routing in SvelteKit
- Endpoints in SvelteKit
- Deploying to Netlify
- Navigation
- Mutations in GraphCMS
- Sending GraphQL Mutations via SvelteKit
- Q&A
Relational Database Modeling for GraphQL
GraphQL Galaxy 2020GraphQL Galaxy 2020
106 min
Relational Database Modeling for GraphQL
Top Content
Workshop
Adron Hall
Adron Hall
In this workshop we'll dig deeper into data modeling. We'll start with a discussion about various database types and how they map to GraphQL. Once that groundwork is laid out, the focus will shift to specific types of databases and how to build data models that work best for GraphQL within various scenarios.
Table of contentsPart 1 - Hour 1      a. Relational Database Data Modeling      b. Comparing Relational and NoSQL Databases      c. GraphQL with the Database in mindPart 2 - Hour 2      a. Designing Relational Data Models      b. Relationship, Building MultijoinsTables      c. GraphQL & Relational Data Modeling Query Complexities
Prerequisites      a. Data modeling tool. The trainer will be using dbdiagram      b. Postgres, albeit no need to install this locally, as I'll be using a Postgres Dicker image, from Docker Hub for all examples      c. Hasura
Build and Deploy a Backend With Fastify & Platformatic
JSNation 2023JSNation 2023
104 min
Build and Deploy a Backend With Fastify & Platformatic
WorkshopFree
Matteo Collina
Matteo Collina
Platformatic allows you to rapidly develop GraphQL and REST APIs with minimal effort. The best part is that it also allows you to unleash the full potential of Node.js and Fastify whenever you need to. You can fully customise a Platformatic application by writing your own additional features and plugins. In the workshop, we’ll cover both our Open Source modules and our Cloud offering:- Platformatic OSS (open-source software) — Tools and libraries for rapidly building robust applications with Node.js (https://oss.platformatic.dev/).- Platformatic Cloud (currently in beta) — Our hosting platform that includes features such as preview apps, built-in metrics and integration with your Git flow (https://platformatic.dev/). 
In this workshop you'll learn how to develop APIs with Fastify and deploy them to the Platformatic Cloud.