Skip to content

Bug/skale 5059 limit number of filters per ip#1062

Draft
dimalit wants to merge 10 commits into
developfrom
bug/SKALE-5059-limit-number-of-filters-pe-ip
Draft

Bug/skale 5059 limit number of filters per ip#1062
dimalit wants to merge 10 commits into
developfrom
bug/SKALE-5059-limit-number-of-filters-pe-ip

Conversation

@dimalit

@dimalit dimalit commented Apr 6, 2022

Copy link
Copy Markdown
Contributor

No description provided.

@dimalit dimalit requested a review from a team as a code owner April 6, 2022 14:49
@codecov

codecov Bot commented Apr 6, 2022

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 55.14403% with 109 lines in your changes missing coverage. Please review.
✅ Project coverage is 50.36%. Comparing base (dc82869) to head (40cba16).
⚠️ Report is 4654 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1062      +/-   ##
===========================================
+ Coverage    50.07%   50.36%   +0.28%     
===========================================
  Files          295      295              
  Lines        35533    35700     +167     
===========================================
+ Hits         17793    17979     +186     
+ Misses       17740    17721      -19     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

github-actions Bot commented Apr 6, 2022

Copy link
Copy Markdown

@dimalit dimalit left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see 2 drawbacks of such approach:

  1. UnDoS protection is coupled with the implementation (of logs/filter functionality). Architecturally more correct is to separate these two.
  2. It unnecessarily introduces ("manual") parsing of filter/logs requests through rapidjson (and not through plain libjsonrpccpp as before. This can can introduce new possible bugs (in this new code).
    2a) As a side note I should mention that currently rapidjson-related part in SkaleServerOverride is implemented in a very "workaround" way and needs re-architecture. Growing it further with more calls would complicate things.

As a solution, I'd propose to implement this protection as an added layer in SkaleServerOverride class. It already has unddos protection - so this addition looks consistent. It can be implemented through something similar to mod_rewrite of Apache - i.e. scan request with simple regexp or plain c++ code and do appropriate filtering.

@DmytroNazarenko DmytroNazarenko linked an issue Apr 3, 2023 that may be closed by this pull request
@DmytroNazarenko DmytroNazarenko marked this pull request as draft October 14, 2024 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Limit number of filters pe IP address

2 participants