Closed alberthdev closed 7 months ago
@alberthdev , I think the match path and method applies to the https://docs.authcrunch.com/docs/authorize/path-acl
what you want to do is have a Caddy matcher (not acl match), that matches a specific method and path, and then create various policies for them.
Describe the issue
When creating an ACL rule in the
Caddyfile
that includes a variation ofmatch method
ormatch path
, the ACL rule does not trigger at all and various misses occur in the debug log.By way of example... this works and logs:
...but if I add either of
match method get
ormatch path /somepath
, it fails and does not log any ACL hits at all:Configuration
Paste full
Caddyfile
below:Version Information
Provide output of
caddy list-modules -versions | grep git
below:No output when filtering for git. A shortened list of non-standard modules:
Can post the full list if desired.
Expected behavior
When the requisite lines are uncommented, an authenticated user with
some-special-role
should be able to doGET /somepath
only, while any other requests to@app-example-com
are blocked.Additional context
Some Caddy debug logs when trying to access
/somepath
when logged in with a user that hassome-special-role
, andmatch path /somepath
is enabled:With that line removed (e.g. ACL only constraining on
match role some-role
), andcaddy reload
ran, the rule now hits: