Giter VIP home page Giter VIP logo

Comments (7)

sbordet avatar sbordet commented on June 1, 2024 2

Does jetty 12 support any way of user-id based rate-limiting? Or jetty users have to roll their own implementation of this.

Jetty 12 will not support user-id based rate limiting, because it is very often too application specific, and may put the server under pressure.

I recommend that you carefully review your current usage, and make sure that any user-id you are using is a valid one (for example, after authentication).

from jetty.project.

msn-tldr avatar msn-tldr commented on June 1, 2024 1

+1 as this broke our dependency on DosFilter that used extractUserId.

  • What is the way forward?
  • How can such breaking changes be avoided in future?

from jetty.project.

joakime avatar joakime commented on June 1, 2024 1

Is there a way to make it work, i.e keeping the behaviour of extractUserId while achieving the goal of the commit?

No, as user/auth based tracking breaks the fundamental contract of Rate Tracking that is used at the server level (to accomplish DosFilter based filtering on userId, it needed to remove arbitrary server level Rate Tracking to do it. Which breaks server level Rate Tracking).
There is also the fact that session, auth, and user_id based entries are also exposed across different requests breaking the Servlet request contract.
And the session and auth entries accumulate improperly and are not cleaned up in a timely manner.

Note that this was removed from all versions of Jetty, from 9.4.x thru to 12.0.x

from jetty.project.

joakime avatar joakime commented on June 1, 2024

Jetty 9.x is now at End of Community Support.

The change in DosFilter was done as Session (and auth/user id) tracking is no longer supported.
The extractUserId in turn is no longer called.

The way forward is to not use an unsupported version of Jetty, you should be using Jetty 12 at this point in time (even if you are using javax.servlet.* classes, you can use the ee8 environment on Jetty 12)

from jetty.project.

msn-tldr avatar msn-tldr commented on June 1, 2024

@joakime thanks for looking into this!

The way forward is to not use an unsupported version of Jetty, you should be using Jetty 12 at this point in time (even if you are using javax.servlet.* classes, you can use the ee8 environment on Jetty 12)

Does jetty 12 support any way of user-id based rate-limiting? Or jetty users have to roll their own implementation of this.

from jetty.project.

trnguyencflt avatar trnguyencflt commented on June 1, 2024

thanks all for the explanation 👍

from jetty.project.

msn-tldr avatar msn-tldr commented on June 1, 2024

Thanks @joakime & @sbordet.

from jetty.project.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.