Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • 3
    It would be ideal to perform access control at a policy enforcement point in your infrastructure even before reaching your API. A basic static set of validation (Ex: OpenAPI ) would be first, followed by deeper business validation. Even some static validation could potentially have impact on the availability of your app- ex ReDOS attacks. Commented May 4, 2018 at 15:34
  • @felickz: Yes, DOS attacks are a valid reason to defer validation until after authorization. It's a balance-act. Anyway, I split my first point to properly take that into account. Commented May 4, 2018 at 15:54
  • Doing expensive validation before access control also risks leaking information due to timing attacks. If your system takes shorter or longer depending on the resource, then the attacker can infer aspects of the resource being requested. Commented May 5, 2018 at 3:50
  • @LieRyan: Which is the reason all the validation which is potentially before access-control does not depend on protected application data at all. Commented May 5, 2018 at 8:37