Skip to content

7+ regression: acl filters in remap rules #1971

Description

@mlibbey

in ATS <7, multiple acl_filters work in remap rules. For instance, this works

map http://example.com http://origin.example.com \
  @src_ip=192.168.0.0-192.168.255.255 @src_ip=10.0.0.0-10.255.255.255 @action=allow \
  @plugin=header_rewrite.so @pparam=someconfig.txt \
  @action=deny @method=CONNECT @method=POST @method=PUT @method=DELETE

(eg, only allow connections from 192.168.0.0/16 or 10.0.0.0/8, AND do not allow CONNECT/POST, etc methods.) In ATS 7+ that remap fails to have both ACLs.

In ATS7+:

  • these work:
map http://example.com http://origin.example.com \
  @src_ip=192.168.0.0-192.168.255.255 @src_ip=10.0.0.0-10.255.255.255 @action=allow 

(eg, only allow connections from 192.168.0.0/16 or 10.0.0.0/8,)

map http://example.com http://origin.example.com \
  @action=deny @method=CONNECT @method=POST @method=PUT @method=DELETE

(eg, do not allow CONNECT/POST, etc methods)

  • But, When switching the order of the rules, the action part from the IP filter is ignored -- a request from 192.168.0.2 is denied
map http://example.com http://origin.example.com \
  @action=deny @method=CONNECT @method=POST @method=PUT @method=DELETE \
  @src_ip=192.168.0.0-192.168.255.255 @src_ip=10.0.0.0-10.255.255.255 @action=allow 
  • finally, multiple allow actions work (eg inverting the methods:
map http://example.com http://origin.example.com \
  @src_ip=192.168.0.0-192.168.255.255 @src_ip=10.0.0.0-10.255.255.255 @action=allow \
  @plugin=header_rewrite.so @pparam=someconfig.txt \
  @action=allow @method=GET @method=HEAD @method=ICP_QUERY @method=OPTIONS @method=TRACE @method=PUSH

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions