You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently when applying ACLs, Incus will first apply all drop/reject, then apply the allow rules and finally the policy which defaults to reject.
That's a good order for this particular case as it allows having wide allow rules with narrow reject/drop rules to block a subset of what's allowed, then the policy rejects the rest.
But this apply order isn't a good fit when the default policy is allow as in that situation one would likely have pretty broad reject/drop rules and so want the allow rules applied first to allow a subset of what would otherwise be denied by broader reject/drop rules.
So we should change our default apply order to match, basically reversing the order if the default action is allow.
The text was updated successfully, but these errors were encountered:
You should then be able to reproduce the current (wrong) behavior by:
Creating an ACL that:
Allows connecting to 1.1.1.1
Blocks connecting to 1.1.1.0/24
Apply the ACL to an instance
Set the default action for the ACL to allow
Normally you'd expect this setup to allow talking to 1.1.1.1, but because we currently apply the drop/reject ahead of the allow rules, you'll find that 1.1.1.1 won't be allowed due to the 1.1.1.0/24 reject rule.
Once the issue is fixed, the same setup should allow pinging 1.1.1.1 but reject pinging 1.1.1.2.
Currently when applying ACLs, Incus will first apply all drop/reject, then apply the allow rules and finally the policy which defaults to reject.
That's a good order for this particular case as it allows having wide allow rules with narrow reject/drop rules to block a subset of what's allowed, then the policy rejects the rest.
But this apply order isn't a good fit when the default policy is allow as in that situation one would likely have pretty broad reject/drop rules and so want the allow rules applied first to allow a subset of what would otherwise be denied by broader reject/drop rules.
So we should change our default apply order to match, basically reversing the order if the default action is allow.
The text was updated successfully, but these errors were encountered: