-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement FWaaS for ASR1k #106
Commits on Aug 12, 2024
-
Add FWaaS service provider stub
If specified as a service_provider for FIREWALL_V2 the ASR1KFWaaSDriver will receive all pre/postcommit hooks necessary to implement the OpenStack FWaasV2 service.
Configuration menu - View commit details
-
Copy full SHA for 925084b - Browse repository at this point
Copy the full SHA 925084bView commit details -
Configuration menu - View commit details
-
Copy full SHA for a4d4112 - Browse repository at this point
Copy the full SHA a4d4112View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3fb11c3 - Browse repository at this point
Copy the full SHA 3fb11c3View commit details -
Configuration menu - View commit details
-
Copy full SHA for cd311b3 - Browse repository at this point
Copy the full SHA cd311b3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 65d2b48 - Browse repository at this point
Copy the full SHA 65d2b48View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1992a9a - Browse repository at this point
Copy the full SHA 1992a9aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3b43732 - Browse repository at this point
Copy the full SHA 3b43732View commit details
Commits on Aug 13, 2024
-
Add policy update to router sync
fwg policies are shared objects, they can be used by multiple routers. We map them 1:1 to ACL objects on IOS XE and thus need a method to keep them updated. We could do that by calling a router sync on any single router that has a reference to that policy or we just call it on an arbitrary router on every agent. This is what we implement in this commit.
Configuration menu - View commit details
-
Copy full SHA for a82b77a - Browse repository at this point
Copy the full SHA a82b77aView commit details -
Extend API to return gateway port id on router object
In our FWaaS implementation we will most likely bind policies on external interfaces. In order to tell the customer the external interface we expand the API to convey this information.
Configuration menu - View commit details
-
Copy full SHA for 753edf3 - Browse repository at this point
Copy the full SHA 753edf3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 705b5df - Browse repository at this point
Copy the full SHA 705b5dfView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0709e83 - Browse repository at this point
Copy the full SHA 0709e83View commit details -
Configuration menu - View commit details
-
Copy full SHA for 91fc300 - Browse repository at this point
Copy the full SHA 91fc300View commit details -
Create interface RII and zone-membership if external policy present
In order for the ZBF feature to replicate the state table, interfaces need to be assigned to a redundandancy group and receive a Redundant Interface Identifier (RII) in order to find the same interface on the remote side. In case we find an external policy on the `Router`, we mark all interfaces on the router's interface list with `has_stateful_firewall`. If that is the case, we instantiate the yang model with RII, redundancy group membership and in case of the interface being the gateway interface with an zone membership. As this marking is done post `Interface` instantiation, we make the `_rest_definition` attribute a dynamic property, so later changes in the `Interface` object are represented in its `_rest_definition`.
Configuration menu - View commit details
-
Copy full SHA for b75d7ab - Browse repository at this point
Copy the full SHA b75d7abView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7279d5d - Browse repository at this point
Copy the full SHA 7279d5dView commit details
Commits on Aug 16, 2024
-
As we cannot support hardware stateful firewalling, we mimic stateful behaviour by inserting a set of rules of the beginning of each ACL that help us letting through packets that are usually an answer to a sent out packet.
Configuration menu - View commit details
-
Copy full SHA for 8d36ded - Browse repository at this point
Copy the full SHA 8d36dedView commit details
Commits on Aug 28, 2024
-
Make
is_orphan
in subclasses genericAll netconf_yang classes inherit their `is_orphan` from BulkOperations. Each of these subclasses need different lists to determine if the classes object is orphan or not. Let's simplify adding arguments to this method by using keyword arguments. All subclasses shall send unnecessary arguments to `*args, **kwargs` while only `BulkOperations.is_orphan` should know about the whole argument list.
Configuration menu - View commit details
-
Copy full SHA for 513c985 - Browse repository at this point
Copy the full SHA 513c985View commit details -
Implement deletion of FWaaS router specific objects
Zones and ZonePairs are created per VRF that has an external policy attached. We can remove them straigh away once the external policy was removed on an VRF/external router interface.
Configuration menu - View commit details
-
Copy full SHA for f6baf22 - Browse repository at this point
Copy the full SHA f6baf22View commit details -
Configuration menu - View commit details
-
Copy full SHA for 859c338 - Browse repository at this point
Copy the full SHA 859c338View commit details -
Configuration menu - View commit details
-
Copy full SHA for f4549a7 - Browse repository at this point
Copy the full SHA f4549a7View commit details -
Add API to retrieve router centric view of firewall rules
FWaaS rules are mapped via policies and firewall groups to ports. Yet when we need to troubelshoot, we must compare it to a virtual router's configuration, so we'd need easy access to how the rules would look from a router interface perspective. This commit adds an API endpoint that delivers that view, removing some cluttering attributes from the result.
Configuration menu - View commit details
-
Copy full SHA for b46fd9d - Browse repository at this point
Copy the full SHA b46fd9dView commit details
Commits on Sep 2, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 576f2c7 - Browse repository at this point
Copy the full SHA 576f2c7View commit details -
Be more certain that connections are marked alive before loopingcalls
I noticed that the first iterations of all loopingcalls would always fail. Turns out, `_run_yang_cmd` checks the `alive` condition of the context, which is not set until `device_check_loop` has run the first time. To make matters worse, `device_check_loop` is also the last loopingcall to be triggered, so it's certain that the first iteration off all previous calls will fail. I moved the loopingcall to be the first one triggered and also halt until we see the agents marked alive. I believe that makes sense as no yang action can be run before this happens either way. As I don't want to inhibit agent startup alltogether, I still back out after `nc_timeout`.
Configuration menu - View commit details
-
Copy full SHA for 4be5662 - Browse repository at this point
Copy the full SHA 4be5662View commit details -
Implement cleanup loop for FWAAS objects not tied to a router
Firewall policies can be bound to multiple ports. They are realized by ACLs, a ClassMap and a ServicePolicy (if the policy is bound to an external interface). That means, just because a router or a port is removed from a policy the corresponding objects may still be used from other routers. Hence it is not removed immediatly but by a cleanup loop, that checks if anybody on an agent is using that policy and then it will be removed.
Configuration menu - View commit details
-
Copy full SHA for c5a20f7 - Browse repository at this point
Copy the full SHA c5a20f7View commit details -
Move FWAAS object prefixes into const module
This prevents cyclic imports as the prefix is needed in the orphan check, but also needed when creating the object through one of the higher level l3 classes.
Configuration menu - View commit details
-
Copy full SHA for ba06e5d - Browse repository at this point
Copy the full SHA ba06e5dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 36e953c - Browse repository at this point
Copy the full SHA 36e953cView commit details -
Configuration menu - View commit details
-
Copy full SHA for b44fe23 - Browse repository at this point
Copy the full SHA b44fe23View commit details -
Configuration menu - View commit details
-
Copy full SHA for 65b8b88 - Browse repository at this point
Copy the full SHA 65b8b88View commit details -
Reorganize Access List rule creation
To remove clutter from the AccessList class we move all the code that generates the attributes for the corresponding yang class into `Rule`.
Configuration menu - View commit details
-
Copy full SHA for 4ec01b6 - Browse repository at this point
Copy the full SHA 4ec01b6View commit details
Commits on Sep 3, 2024
-
Resolve diamond shaped inheritance
In the previous implementation `firewall.AccessList` would inherit from `l3.AccessList` which inherited from `base.Base`. `firewall.AccessList` also inherited from `firewall.FirewallPolicyObject`. That lead to a Diamond Shaped inheritance. The fact that `FirewallPolicyObject` and `l3.AccessList` had constructors with different arguments made it difficult to let `super()` call the constructors with different arguments. To resolve that, the diamond Shaped inheritance was resolved making it clearer which `__init__`'s `super()` calls which superclasses constructor. The different signatures of the constructor still pose a problem, hence we send all supplemental arguments of a constructor to `**kwargs`.
Configuration menu - View commit details
-
Copy full SHA for 64f5eba - Browse repository at this point
Copy the full SHA 64f5ebaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 07dc92f - Browse repository at this point
Copy the full SHA 07dc92fView commit details
Commits on Sep 11, 2024
-
Configuration menu - View commit details
-
Copy full SHA for ad8c11d - Browse repository at this point
Copy the full SHA ad8c11dView commit details