Files
floci/src/main/java/io
galsuchetzky-act 6d71c3599d fix(iam): authorize a REST request on the path the router matched (#7199)
IAM enforcement matched a REST request's action rules and built its
resource from the request URI as UriInfo gives it, where an encoded dot
segment such as %2E%2E is still encoded and consecutive slashes are
already collapsed. The router matches on the request's normalized path,
which decodes the dots and removes the dot segments, or, after a filter
rewrites the request URI, on the new path. A path written with %2E%2E
therefore reached one operation and resource while IAM checked another:

- GET /2015-03-31/functions/x/%2E%2E/fn reached GetFunction on fn, but
  matched no Lambda rule and passed as an unknown action, so a deny on
  lambda:GetFunction did not apply.
- GET /restapis/<id>//%2E%2E/stages reached the stages of <id>, but was
  checked against ::/restapis/stages.

IamActionRegistry.rawPath and routedPath now read the path the router
matched from the RESTEasy Reactive request context, and the
ResourceArnBuilder branches that read the decoded path take it decoded
from the same place. A synthetic context without that request context
keeps the UriInfo reading. S3 keeps matching the path as sent, where
/bucket//key names the key /key.

Closes #7189
2026-11-01 09:23:40 -04:00
..