neutron/neutron
Aaron Rosen 1faec8354a Prevent cross plugging router ports from other tenants
Previously, a tenant could plug an interface into another tenant's
router if he knew their router_id by creating a port with the correct
device_id and device_owner. This patch prevents this from occuring
by preventing non-admin users from creating ports with device_owner
network:router_interface with a device_id that matches another tenants router.
In addition, it prevents one from updating a ports device_owner and device_id
so that the device_id won't match another tenants router with device_owner
being network:router_interface.

NOTE: with this change it does open up the possiblity for a tenant to discover
router_id's of another tenant's by guessing them and updating a port till
a conflict occurs. That said, randomly guessing the router id would be hard
and in theory should not matter if exposed. We also need to allow a tenant
to update the device_id on network:router_interface ports as this would be
used for by anyone using a vm as a service router. This issue will be fixed in
another patch upstream as a db migration is required but since this needs
to be backported to all stable branches this is not possible.

NOTE: The only plugins affect by this are the ones that use the l3-agent.

NOTE: **One should perform and audit of the ports that are already
        attached to routers after applying this patch and remove ports
        that a tenant may have cross plugged.**

Closes-bug: #1243327

Conflicts:
    neutron/common/exceptions.py
    neutron/db/db_base_plugin_v2.py

Change-Id: I8bc6241f537d937e5729072dcc76871bf407cdb3
2014-03-27 14:32:55 +00:00
..
agent Merge "Add support for managing async processes" into stable/havana 2014-03-06 00:52:26 +00:00
api Send DHCP notifications regardless of agent status 2014-01-09 01:42:07 +00:00
cmd remove binaries under bin 2013-08-16 10:10:30 +08:00
common Prevent cross plugging router ports from other tenants 2014-03-27 14:32:55 +00:00
db Prevent cross plugging router ports from other tenants 2014-03-27 14:32:55 +00:00
debug Add binding:host_id when creating port for probe 2014-01-15 16:34:15 +01:00
extensions Change hard coded numbers to constants in security group tests 2013-09-23 10:21:24 -04:00
locale Imported Translations from Transifex 2013-10-02 06:10:31 +00:00
openstack Don't allow qpid receiving thread to die 2014-02-09 19:02:00 +01:00
plugins NSX: Sync do not pass around model object 2014-03-25 11:01:41 -07:00
scheduler Ensure router exists when auto_schedule_routers 2013-09-26 22:48:46 +08:00
server Disable lazy translation 2013-10-01 23:16:23 +00:00
services Merge "fix --excluded of meter-label-rule-create is not working" into stable/havana 2014-03-12 14:36:59 +00:00
tests Prevent cross plugging router ports from other tenants 2014-03-27 14:32:55 +00:00
__init__.py Rename Quantum to Neutron 2013-07-06 15:02:43 -04:00
auth.py Rename Quantum to Neutron 2013-07-06 15:02:43 -04:00
context.py Allow for skipping admin roles loading on context creation 2013-08-28 14:06:43 +04:00
hooks.py Fixes Windows setup dependency bug 2013-08-15 22:58:14 +03:00
manager.py Add agent scheduling for LBaaS namespace agent 2013-07-19 13:25:04 +04:00
neutron_plugin_base_v2.py Remove openstack.common.exception usage 2013-08-06 10:42:02 +02:00
policy.py Fix message i18n error 2013-09-08 15:58:12 +08:00
quota.py Fallback to Quota Conf Driver if Quotas table is not defined 2013-10-11 19:59:59 -04:00
service.py Creates multiple worker processes for API server 2013-12-04 21:35:39 +00:00
version.py Rename Quantum to Neutron 2013-07-06 15:02:43 -04:00
wsgi.py Creates multiple worker processes for API server 2013-12-04 21:35:39 +00:00