Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Public endpoint for graphql server needs protection #530

Open
mnaamani opened this issue Sep 21, 2023 · 0 comments
Open

Public endpoint for graphql server needs protection #530

mnaamani opened this issue Sep 21, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@mnaamani
Copy link
Contributor

mnaamani commented Sep 21, 2023

Earlier this month we experienced very poor performance and very slow queries on our public endpoint. It became clear the setup we had didn't have sufficient horsepower to handle large number of concurrent requests (especially expensive queries).

We beefed up our servers and enabled horizonal scaling (on the same machine with pm2 cluster) in additional to have network load balancer to horizontally scale to multiple nodes. This helped tremendously.

However it is not enough. We can certainly write good efficient graphql queries in our applications, but ultimately for a public endpoint we must assume there will always be some bad actors that want to abuse/disrupt operations.

There are many guides and best practices that we can and should follow. Here are some particularly good ones:

One particular tool that stood out.
https://graphql.wtf/episodes/55-graphql-armor

Incidentally graphql-armor developer also provide a free public service https://graphql.security/ to scan graphql endpoints for vulnerabilities. This is how I originally came to realize the default configuration for our graphql-server is not very secure.

There is a wealth of guides and tools available at the-guild-dev to look at and learn from.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants