Quantum-l3-firewalls-and-dhcps


 * Git Branch: https://github.com/locaweb/quantum

= Handling layer 3 =

Abstract
The idea behind this blueprint is to extend quantum to provide firewalls and dhcps control.

Summary
Agents are running on dhcps and firewalls to execute the proper work dictated by quantum via amqp: dhcp plugin works with any *nix os that uses isc-dhcp-server. firewall plugin is currently working with linux, but the data model should be usable with any firewall appliance

DHCP
DHCP servers run on the hypervisor server where the VM is running, providing better fail-over architecture. It follows the logic: get data from the amqp server, write the template file ( witch uses cheetah templates ) and send a request to quantum committing the action. The agent knows how to keep the dhcp server running in case of wrong data format sent to it.

^l

Firewall
Firewall agent run o top of linux firewall server, each ip has its own firewall policy for input and output traffic and you can also enforce a range or network policy to each one which will prevail over the bottom level policy, according to the follow hierarchy: network > range > ip. This agent works retrieving data from amqp, running the iptables rule and sending a request to commit the action.



= Proposed Quantum API Operations =

Policies
Create Policy

Creating a Policy should be done directly associated with the network entity. Quantum should handle which firewalls would process the policy, based on the provided dst address (or send to all firewall in the network if no dst address is provided - network policy), validating if the dst is configured in the network (IP or Range). The default firewall policy we are working with is DROP, so the policies you should add are to ALLOW the packages.

Request:

POST /tenants/XYZ/networks/158233b0-ca9a-40b4-8614-54a4a99d47d1/policies.xml

Response:

List Policies

Request:

GET /tenants/XYZ/networks/158233b0-ca9a-40b4-8614-54a4a99d47d1/policies.xml

Response:

Delete Policy

Request:

DELETE /tenants/XYZ/networks/158233b0-ca9a-40b4-8614-54a4a99d47d1/policies/98017ddc-efc8-4c25-a915-774b2a633855.xml

DHCPs
A network ability to provide DHCP would be based only on it having an DHCP server associated with it. Association between network and DHCP are made through Ranges. DHCP server will provide IPs based on the association Port-IP.

Create DHCP

POST /tenants/XYZ/dhcps.xml

Associate DHCP with a range within a network

PUT /tenants/XYZ/dhcps/158233b0-ca9a-40b4-8614-54a4a99d47d1/ranges.xml

Ranges
Describes IP ranges associated with a network. Quantum should validade if the range isn't conflicting with any range associated with the network.

Create Range/Associate with a network

POST /tenants/XYZ/networks/158233b0-ca9a-40b4-8614-54a4a99d47d1/ranges.xml

IPs
Describes which IPs are allowed in a network's port. Quantum should validade if the network is compatible with a range that may contain the IP.

Create IP

POST /tenants/XYZ/networks/158233b0-ca9a-40b4-8614-54a4a99d47d1/ports/98017ddc-efc8-4c25-a915-774b2a633855/ips.xml

(Contact: Willian Molinari (PotHix), Thiago Morello, Juliano Martinez)