ACL Deny Rules
Currently only ACL allow rules are supported as part of Network ACLs. Default is to block all incoming and all outgoing traffic between tiers and between tiers and various gateways (including Public). ACL deny rules will be supported through this feature. New fields "number" and "action"will be added to rules to resolve conflicting rules.
NetworkACLContainer will be introduced to manage NetworkACLs.
NetworkACLContainer
NetworkACLContainer is a numbered list of NetworkACLs that are evaluated in order, starting with the lowest numbered rule, to determine whether traffic is allowed in or out of any tier associated with the network ACL.
Instead of adding NetworkACLs directly to the tier, NetworkACLs will be added to the NetworkACLContainer. NetworkACLContainer can be assigned to multiple vpc tiers. Each tier can be associated with only one NetworkACLContainer.
Tier will associated with a NetworkACLContainer at all times (NetworkACLContainer will be used when no ACL container is associated).
Add/Remove networkACL to container
NetworkACLs can be added to or removed from the container using APIs createNetworkACL and removeNetworkACL APIs.
Sample workflow
Creating Tier with default acl container and assigning a custom acl container later
- Create VPC
- Create Tier A - tier is associated with default network ACL container
- Create custom network ACL Container
- Add ACLs to the container
- Assign ACL container created in step # 3 to tier A using replaceNetworkACLContainer API
Create Tier with custom acl container in 1 step
- Create VPC
- Create custom network ACL Container
- Add ACLs to the container
- Create Tier A with ACL container created in step # 2
API changes
Existing API
createNetworkAcl
New parameters
- action (required) - allow/deny
- number (required) - rule number. ACL rules are ordered by this number
- container_id (optional) - id of the network ACL container
network_id parameter is not required when container_id is specified.
createNetwork
New parameters
- container_id (optional) - id of the network ACL container. Default NetworkACLContainer will be used when not specified.
new API
updateNetworkACL
Parameters:
- id (required) - Id of the network ACL
- trafficType (optional) - can be ingress/egress (defaulted to ingress if not specified)
- cidrlist (optional) - List of the coma separated CIDRs for the rule. If not specified, defaulted to 0.0.0.0/0
- startPort (optional)
- endPort (optional)
- protocol (optional). TCP/UDP/ICMP protocol types are supported
- icmpType (optional) - type of the icmp message being sent
- icmpCode (optional) - error code for this icmp message
- action (optional) - allow/deny
- number (optional) - rule number
createNetworkAclContainer
Parameters:
- name - Name of the Network Acl Container (required)
- description - Description of the Network ACL Container (required)
Response:
- name - Name of the Network Acl Container
- id - uuid of the Network Acl Container
deleteNetworkAclContainer
Parameters:
- id - uuid of the Network Acl Container (required)
Response:
- success - True if Network ACL container is successfully removed, false otherwise
listNetworkAclContainers
Parameters:
- id - uuid of the Network Acl Container (optional)
- network_id - list by network_id (Tier) (optional)
Response:
- success - True if Network ACL container is successfully removed, false otherwise
replaceNetworkACLContainer
Parameters:
- network_id - Id of the network (Tier) (required)
- container_id: Id of the network ACL container to be associated with the network (required)
Response:
- success - True when container is successfully assigned to network, false otherwise
DB
New Tables
1. network_acl_container
- New Columns
- id (long): auto-generated id
- uuid (string): auto-generated uuid
- name: name of the network acl container
- description: network acl container description
Changes to existing tables
1. firewall_rules
- New Columns
- action (String) - Action allow/deny
- number (long) - Rule priority
- container_id (long) - Id of the container, this ACL is part of
action, number, container_id are mandatory for rule with purpose NetworkACL.
2. networks
- New Columns
- container_id (long) - network acl container associated with this Tier
Upgrade
For each tier, a new network acl container is created during the upgrade, All ACLs that were assigned to this tier, will be part of the newly created network acl container. If there are no ACLs for any tier, it'll be associated with the default container.
All existing rules in firewall_rules table of type NetworkACL will have action "allow". Rule number will be sequentially assigned for all rules in each tier.