Giter Site home page Giter Site logo

Comments (3)

stuartwdouglas avatar stuartwdouglas commented on August 9, 2024

I think this does need to be clarified, but I think the tutorial is actually correct. My logic is:

https://jakarta.ee/specifications/servlet/5.0/jakarta-servlet-spec-5.0.html#processing-requests

This section says:

When a servlet container receives a request, it shall use the algorithm described in Section 12.1, “Use of URL Paths” to select the constraints (if any) defined on the url-pattern that is the best match to the request URI.

Now this section talks about mapping requests to servlets, but in this case we are talking about mapping requests to auth constraints. Logically this would then mean that if you had an auth-constraint with / then this would become the default auth constraint that would be applied if no other auth constraints match.

@gregw @markt-asf what do you guys think?

from servlet.

gregw avatar gregw commented on August 9, 2024

@stuartwdouglas I agree that a security constraint mapped to "/" will match any URI not matched by other constraints. Modulo methods and the complexity of uncovered methods.

from servlet.

fl4via avatar fl4via commented on August 9, 2024

As this issue is explained by the comments above, I'm closing it. Thank you @gregw and @stuartwdouglas for clarification!

from servlet.

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.