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

DoS Detection followed #7

Open
ShubhamPalriwala opened this issue Dec 22, 2021 · 1 comment
Open

DoS Detection followed #7

ShubhamPalriwala opened this issue Dec 22, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@ShubhamPalriwala
Copy link
Owner

  • Create a PostgreSQL Table as IP | Timestamp
  • Every time a request comes, add a row with the details
  • Now to detect DoS, in the last 2 seconds, if more than 5 requests are hit from this IP, consider it a DoS attack. (for testing purposes taking small units)
  • Make the above values as params customizable by the user
  • All the following requests for the next 10 minutes from this user will then be given the is-suspicious true as it's a potential DoS.
@ShubhamPalriwala ShubhamPalriwala added the enhancement New feature or request label Dec 22, 2021
@ShubhamPalriwala
Copy link
Owner Author

ShubhamPalriwala commented Dec 22, 2021

We can use Kong's DAO to store custom data instead of an external Postgres Server!
Define our own schema and insert accordingly as mentioned below:
Refer to this: https://docs.konghq.com/gateway/2.7.x/plugin-development/custom-entities/

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

1 participant