When configuring JSON Web Token (JWT) Validation policies for specific HTTP methods and URI paths using resource conditions in Anypoint API Manager, requests to unmatched, non-existent, or unconfigured paths are allowed through the gateway instead of being denied by default. Attempting to add a catch-all default-deny policy using the regular expression .* blocks all requests, including legitimate traffic to authorized endpoints.
In Anypoint API Manager, a resource-level policy evaluates only when an incoming request matches its configured HTTP method and URI regular expression. If a request does not match any resource-level policy criteria, it evaluates only against API-wide policies. When a valid token satisfies an API-wide JWT Validation policy, the gateway forwards the request to the runtime.
If a separate default-deny policy is configured with the URI regular expression .*, the gateway enforces this policy on every incoming request. Because all policies matching a request must pass evaluation, the catch-all policy causes valid requests to fail.
To restrict API access by resource while preventing unintended access to unconfigured paths, choose one of the following approaches:
Allow the API specification (RAML or OAS) and APIkit router to serve as the default allowlist:
APIKIT:NOT_FOUND error. Unmatched endpoints not defined in the specification are rejected by APIkit with an HTTP 404 response, and unmapped HTTP methods are rejected with an HTTP 405 response.If resource-level filtering must be enforced strictly at the gateway level:
.* regex across the entire API, as it evaluates against and blocks legitimate matching paths.Verify:
Send a request with a valid JWT to an unmapped path (for example, /test/unmapped/path). The APIkit router returns an HTTP 404 status code (APIKIT:NOT_FOUND), while configured paths evaluate their respective JWT claims and return HTTP 200.
005462354

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.