summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSean Pryor <spryor@redhat.com>2017-09-22 15:59:59 -0400
committerSean Pryor <spryor@redhat.com>2017-09-22 15:59:59 -0400
commit1597127b3f5e497b10078434af8529e87e65b4ec (patch)
tree1d85bbfd8799b68890cf29be98491caa4b626f3c
parentfa619cb89d44893324eca5db219828e7362379b9 (diff)
downloadopenstack-access-policy-1597127b3f5e497b10078434af8529e87e65b4ec.zip
openstack-access-policy-1597127b3f5e497b10078434af8529e87e65b4ec.tar.gz
openstack-access-policy-1597127b3f5e497b10078434af8529e87e65b4ec.tar.xz
Updated Neutron policy
Change-Id: I0361f49e54e9c11e4e6034fded5060c622cbe315
-rw-r--r--etc/neutron/policy.json386
1 files changed, 196 insertions, 190 deletions
diff --git a/etc/neutron/policy.json b/etc/neutron/policy.json
index cd6662b..7e6913f 100644
--- a/etc/neutron/policy.json
+++ b/etc/neutron/policy.json
@@ -1,214 +1,220 @@
{
- "context_is_admin": "role:admin",
- "owner": "tenant_id:%(tenant_id)s",
- "admin_or_owner": "rule:context_is_admin or rule:owner",
+ "readonly": "(project_id:%(project_id)s and role:readonly)",
+ "domain_readonly": "(domain_id:%(domain_id)s and role:readonly)",
+ "global_readonly": "(role:readonly)",
+ "_member_role": "(role:member or role:_member_)",
+ "member": "(project_id:%(project_id)s and rule:_member_role)",
+ "domain_member": "(domain_id:%(domain_id)s and rule:_member_role)",
+ "admin": "(is_admin:True or role:admin)",
+ "owner": "(user_id:%(user_id)s and rule:_member_role)",
+
"context_is_advsvc": "role:advsvc",
- "admin_or_network_owner": "rule:context_is_admin or tenant_id:%(network:tenant_id)s or role:network_admin",
- "admin_owner_or_network_owner": "rule:owner or rule:admin_or_network_owner",
- "admin_only": "rule:context_is_admin",
- "regular_user": "",
- "shared": "field:networks:shared=True",
- "shared_subnetpools": "field:subnetpools:shared=True",
- "shared_address_scopes": "field:address_scopes:shared=True",
- "external": "field:networks:router:external=True",
- "default": "rule:admin_or_owner",
+
+ "admin_or_network_owner": "(rule:admin or rule:member or role:network_admin)",
+ "admin_owner_or_network_owner": "(rule:owner or rule:admin_or_network_owner)",
+ "shared": "(field:networks:shared=True)",
+ "shared_subnetpools": "(field:subnetpools:shared=True)",
+ "shared_address_scopes": "(field:address_scopes:shared=True)",
+ "external": "(field:networks:router:external=True)",
+
+ "default": "rule:admin or rule:member",
"create_subnet": "rule:admin_or_network_owner",
- "create_subnet:segment_id": "rule:admin_only",
- "create_subnet:service_types": "rule:admin_only",
- "get_subnet": "rule:admin_or_owner or rule:shared",
- "get_subnet:segment_id": "rule:admin_only",
+ "create_subnet:segment_id": "rule:admin",
+ "create_subnet:service_types": "rule:admin",
+ "get_subnet": "rule:admin or rule:member or rule:shared or rule:readonly or rule:readonly",
+ "get_subnet:segment_id": "rule:admin",
"update_subnet": "rule:admin_or_network_owner",
- "update_subnet:service_types": "rule:admin_only",
+ "update_subnet:service_types": "rule:admin",
"delete_subnet": "rule:admin_or_network_owner",
- "create_subnetpool": "",
- "create_subnetpool:shared": "rule:admin_only",
- "create_subnetpool:is_default": "rule:admin_only",
- "get_subnetpool": "rule:admin_or_owner or rule:shared_subnetpools",
- "update_subnetpool": "rule:admin_or_owner",
- "update_subnetpool:is_default": "rule:admin_only",
- "delete_subnetpool": "rule:admin_or_owner",
-
- "create_address_scope": "",
- "create_address_scope:shared": "rule:admin_only",
- "get_address_scope": "rule:admin_or_owner or rule:shared_address_scopes",
- "update_address_scope": "rule:admin_or_owner",
- "update_address_scope:shared": "rule:admin_only",
- "delete_address_scope": "rule:admin_or_owner",
-
- "create_network": "",
- "get_network": "rule:admin_or_owner or rule:shared or rule:external or rule:context_is_advsvc",
- "get_network:router:external": "rule:regular_user",
- "get_network:segments": "rule:admin_only",
- "get_network:provider:network_type": "rule:admin_only",
- "get_network:provider:physical_network": "rule:admin_only",
- "get_network:provider:segmentation_id": "rule:admin_only",
- "get_network:queue_id": "rule:admin_only",
- "get_network_ip_availabilities": "rule:admin_only",
- "get_network_ip_availability": "rule:admin_only",
- "create_network:shared": "rule:admin_only",
- "create_network:router:external": "rule:admin_only",
- "create_network:is_default": "rule:admin_only",
- "create_network:segments": "rule:admin_only",
- "create_network:provider:network_type": "rule:admin_only",
- "create_network:provider:physical_network": "rule:admin_only",
- "create_network:provider:segmentation_id": "rule:admin_only",
- "update_network": "rule:admin_or_owner",
- "update_network:segments": "rule:admin_only",
- "update_network:shared": "rule:admin_only",
- "update_network:provider:network_type": "rule:admin_only",
- "update_network:provider:physical_network": "rule:admin_only",
- "update_network:provider:segmentation_id": "rule:admin_only",
- "update_network:router:external": "rule:admin_only",
- "delete_network": "rule:admin_or_owner",
-
- "create_segment": "rule:admin_only",
- "get_segment": "rule:admin_only",
- "update_segment": "rule:admin_only",
- "delete_segment": "rule:admin_only",
+ "create_subnetpool": "rule:admin or rule:member",
+ "create_subnetpool:shared": "rule:admin",
+ "create_subnetpool:is_default": "rule:admin",
+ "get_subnetpool": "rule:admin or rule:member or rule:shared_subnetpools or rule:readonly",
+ "update_subnetpool": "rule:admin or rule:member",
+ "update_subnetpool:is_default": "rule:admin",
+ "delete_subnetpool": "rule:admin or rule:member",
+
+ "create_address_scope": "rule:admin or rule:member",
+ "create_address_scope:shared": "rule:admin",
+ "get_address_scope": "rule:admin or rule:member or rule:shared_address_scopes",
+ "update_address_scope": "rule:admin or rule:member",
+ "update_address_scope:shared": "rule:admin",
+ "delete_address_scope": "rule:admin or rule:member",
+
+ "create_network": "rule:admin or rule:member",
+ "get_network": "rule:admin or rule:member or rule:readonly or rule:shared or rule:external or rule:context_is_advsvc",
+ "get_network:router:external": "rule:admin or rule:member or rule:readonly",
+ "get_network:segments": "rule:admin or rule:readonly",
+ "get_network:provider:network_type": "rule:admin or rule:readonly",
+ "get_network:provider:physical_network": "rule:admin or rule:readonly",
+ "get_network:provider:segmentation_id": "rule:admin or rule:readonly",
+ "get_network:queue_id": "rule:admin",
+ "get_network_ip_availabilities": "rule:admin",
+ "get_network_ip_availability": "rule:admin",
+ "create_network:shared": "rule:admin",
+ "create_network:router:external": "rule:admin",
+ "create_network:is_default": "rule:admin",
+ "create_network:segments": "rule:admin",
+ "create_network:provider:network_type": "rule:admin",
+ "create_network:provider:physical_network": "rule:admin",
+ "create_network:provider:segmentation_id": "rule:admin",
+ "update_network": "rule:admin or rule:member",
+ "update_network:segments": "rule:admin",
+ "update_network:shared": "rule:admin",
+ "update_network:provider:network_type": "rule:admin",
+ "update_network:provider:physical_network": "rule:admin",
+ "update_network:provider:segmentation_id": "rule:admin",
+ "update_network:router:external": "rule:admin",
+ "delete_network": "rule:admin or rule:member",
+
+ "create_segment": "rule:admin",
+ "get_segment": "rule:admin",
+ "update_segment": "rule:admin",
+ "delete_segment": "rule:admin",
"network_device": "field:port:device_owner=~^network:",
- "create_port": "",
+ "create_port": "rule:admin or rule:member",
"create_port:device_owner": "not rule:network_device or rule:context_is_advsvc or rule:admin_or_network_owner",
"create_port:mac_address": "rule:context_is_advsvc or rule:admin_or_network_owner",
"create_port:fixed_ips": "rule:context_is_advsvc or rule:admin_or_network_owner",
"create_port:port_security_enabled": "rule:context_is_advsvc or rule:admin_or_network_owner",
- "create_port:binding:host_id": "rule:admin_only",
- "create_port:binding:profile": "rule:admin_only",
+ "create_port:binding:host_id": "rule:admin",
+ "create_port:binding:profile": "rule:admin",
"create_port:mac_learning_enabled": "rule:context_is_advsvc or rule:admin_or_network_owner",
"create_port:allowed_address_pairs": "rule:admin_or_network_owner",
- "get_port": "rule:context_is_advsvc or rule:admin_owner_or_network_owner",
- "get_port:queue_id": "rule:admin_only",
- "get_port:binding:vif_type": "rule:admin_only",
- "get_port:binding:vif_details": "rule:admin_only",
- "get_port:binding:host_id": "rule:admin_only",
- "get_port:binding:profile": "rule:admin_only",
- "update_port": "rule:admin_or_owner or rule:context_is_advsvc",
+ "get_port": "rule:context_is_advsvc or rule:admin_owner_or_network_owner or rule:readonly",
+ "get_port:queue_id": "rule:admin",
+ "get_port:binding:vif_type": "rule:admin or rule:readonly",
+ "get_port:binding:vif_details": "rule:admin or rule:readonly",
+ "get_port:binding:host_id": "rule:admin or rule:readonly",
+ "get_port:binding:profile": "rule:admin or rule:readonly",
+ "update_port": "rule:admin or rule:member or rule:context_is_advsvc",
"update_port:device_owner": "not rule:network_device or rule:context_is_advsvc or rule:admin_or_network_owner",
- "update_port:mac_address": "rule:admin_only or rule:context_is_advsvc",
+ "update_port:mac_address": "rule:admin or rule:context_is_advsvc",
"update_port:fixed_ips": "rule:context_is_advsvc or rule:admin_or_network_owner",
"update_port:port_security_enabled": "rule:context_is_advsvc or rule:admin_or_network_owner",
- "update_port:binding:host_id": "rule:admin_only",
- "update_port:binding:profile": "rule:admin_only",
+ "update_port:binding:host_id": "rule:admin",
+ "update_port:binding:profile": "rule:admin",
"update_port:mac_learning_enabled": "rule:context_is_advsvc or rule:admin_or_network_owner",
"update_port:allowed_address_pairs": "rule:admin_or_network_owner",
"delete_port": "rule:context_is_advsvc or rule:admin_owner_or_network_owner",
- "get_router:ha": "rule:admin_only",
- "create_router": "rule:regular_user",
- "create_router:external_gateway_info:enable_snat": "rule:admin_only",
- "create_router:distributed": "rule:admin_only",
- "create_router:ha": "rule:admin_only",
- "get_router": "rule:admin_or_owner",
- "get_router:distributed": "rule:admin_only",
- "update_router:external_gateway_info:enable_snat": "rule:admin_only",
- "update_router:distributed": "rule:admin_only",
- "update_router:ha": "rule:admin_only",
- "delete_router": "rule:admin_or_owner",
-
- "add_router_interface": "rule:admin_or_owner",
- "remove_router_interface": "rule:admin_or_owner",
-
- "create_router:external_gateway_info:external_fixed_ips": "rule:admin_only",
- "update_router:external_gateway_info:external_fixed_ips": "rule:admin_only",
-
- "insert_rule": "rule:admin_or_owner",
- "remove_rule": "rule:admin_or_owner",
-
- "create_qos_queue": "rule:admin_only",
- "get_qos_queue": "rule:admin_only",
-
- "update_agent": "rule:admin_only",
- "delete_agent": "rule:admin_only",
- "get_agent": "rule:admin_only",
-
- "create_dhcp-network": "rule:admin_only",
- "delete_dhcp-network": "rule:admin_only",
- "get_dhcp-networks": "rule:admin_only",
- "create_l3-router": "rule:admin_only",
- "delete_l3-router": "rule:admin_only",
- "get_l3-routers": "rule:admin_only",
- "get_dhcp-agents": "rule:admin_only",
- "get_l3-agents": "rule:admin_only",
- "get_loadbalancer-agent": "rule:admin_only",
- "get_loadbalancer-pools": "rule:admin_only",
- "get_agent-loadbalancers": "rule:admin_only",
- "get_loadbalancer-hosting-agent": "rule:admin_only",
-
- "create_floatingip": "rule:regular_user",
- "create_floatingip:floating_ip_address": "rule:admin_only",
- "update_floatingip": "rule:admin_or_owner",
- "delete_floatingip": "rule:admin_or_owner",
- "get_floatingip": "rule:admin_or_owner",
-
- "create_network_profile": "rule:admin_only",
- "update_network_profile": "rule:admin_only",
- "delete_network_profile": "rule:admin_only",
- "get_network_profiles": "",
- "get_network_profile": "",
- "update_policy_profiles": "rule:admin_only",
- "get_policy_profiles": "",
- "get_policy_profile": "",
-
- "create_metering_label": "rule:admin_only",
- "delete_metering_label": "rule:admin_only",
- "get_metering_label": "rule:admin_only",
-
- "create_metering_label_rule": "rule:admin_only",
- "delete_metering_label_rule": "rule:admin_only",
- "get_metering_label_rule": "rule:admin_only",
-
- "get_service_provider": "rule:regular_user",
- "get_lsn": "rule:admin_only",
- "create_lsn": "rule:admin_only",
-
- "create_flavor": "rule:admin_only",
- "update_flavor": "rule:admin_only",
- "delete_flavor": "rule:admin_only",
- "get_flavors": "rule:regular_user",
- "get_flavor": "rule:regular_user",
- "create_service_profile": "rule:admin_only",
- "update_service_profile": "rule:admin_only",
- "delete_service_profile": "rule:admin_only",
- "get_service_profiles": "rule:admin_only",
- "get_service_profile": "rule:admin_only",
-
- "get_policy": "rule:regular_user",
- "create_policy": "rule:admin_only",
- "update_policy": "rule:admin_only",
- "delete_policy": "rule:admin_only",
- "get_policy_bandwidth_limit_rule": "rule:regular_user",
- "create_policy_bandwidth_limit_rule": "rule:admin_only",
- "delete_policy_bandwidth_limit_rule": "rule:admin_only",
- "update_policy_bandwidth_limit_rule": "rule:admin_only",
- "get_policy_dscp_marking_rule": "rule:regular_user",
- "create_policy_dscp_marking_rule": "rule:admin_only",
- "delete_policy_dscp_marking_rule": "rule:admin_only",
- "update_policy_dscp_marking_rule": "rule:admin_only",
- "get_rule_type": "rule:regular_user",
- "get_policy_minimum_bandwidth_rule": "rule:regular_user",
- "create_policy_minimum_bandwidth_rule": "rule:admin_only",
- "delete_policy_minimum_bandwidth_rule": "rule:admin_only",
- "update_policy_minimum_bandwidth_rule": "rule:admin_only",
-
- "restrict_wildcard": "(not field:rbac_policy:target_tenant=*) or rule:admin_only",
- "create_rbac_policy": "",
+ "get_router:ha": "rule:admin",
+ "create_router": "rule:admin or rule:member",
+ "create_router:external_gateway_info:enable_snat": "rule:admin",
+ "create_router:distributed": "rule:admin",
+ "create_router:ha": "rule:admin",
+ "get_router": "rule:admin or rule:member or rule:readonly",
+ "get_router:distributed": "rule:admin or rule:readonly",
+ "update_router:external_gateway_info:enable_snat": "rule:admin",
+ "update_router:distributed": "rule:admin",
+ "update_router:ha": "rule:admin",
+ "delete_router": "rule:admin or rule:member",
+
+ "add_router_interface": "rule:admin or rule:member",
+ "remove_router_interface": "rule:admin or rule:member",
+
+ "create_router:external_gateway_info:external_fixed_ips": "rule:admin",
+ "update_router:external_gateway_info:external_fixed_ips": "rule:admin",
+
+ "insert_rule": "rule:admin or rule:member",
+ "remove_rule": "rule:admin or rule:member",
+
+ "create_qos_queue": "rule:admin",
+ "get_qos_queue": "rule:admin",
+
+ "update_agent": "rule:admin",
+ "delete_agent": "rule:admin",
+ "get_agent": "rule:admin or rule:readonly",
+
+ "create_dhcp-network": "rule:admin",
+ "delete_dhcp-network": "rule:admin",
+ "get_dhcp-networks": "rule:admin or rule:readonly",
+ "create_l3-router": "rule:admin",
+ "delete_l3-router": "rule:admin",
+ "get_l3-routers": "rule:admin or rule:readonly",
+ "get_dhcp-agents": "rule:admin or rule:readonly",
+ "get_l3-agents": "rule:admin",
+ "get_loadbalancer-agent": "rule:admin",
+ "get_loadbalancer-pools": "rule:admin",
+ "get_agent-loadbalancers": "rule:admin",
+ "get_loadbalancer-hosting-agent": "rule:admin",
+
+ "create_floatingip": "rule:admin or rule:member",
+ "create_floatingip:floating_ip_address": "rule:admin",
+ "update_floatingip": "rule:admin or rule:member",
+ "delete_floatingip": "rule:admin or rule:member",
+ "get_floatingip": "rule:admin or rule:member or rule:readonly",
+
+ "create_network_profile": "rule:admin",
+ "update_network_profile": "rule:admin",
+ "delete_network_profile": "rule:admin",
+ "get_network_profiles": "rule:admin or rule:member",
+ "get_network_profile": "rule:admin or rule:member",
+ "update_policy_profiles": "rule:admin",
+ "get_policy_profiles": "rule:admin or rule:member",
+ "get_policy_profile": "rule:admin or rule:member",
+
+ "create_metering_label": "rule:admin",
+ "delete_metering_label": "rule:admin",
+ "get_metering_label": "rule:admin or rule:readonly",
+
+ "create_metering_label_rule": "rule:admin",
+ "delete_metering_label_rule": "rule:admin",
+ "get_metering_label_rule": "rule:admin or rule:readonly",
+
+ "get_service_provider": "rule:admin or rule:member or rule:readonly",
+ "get_lsn": "rule:admin",
+ "create_lsn": "rule:admin",
+
+ "create_flavor": "rule:admin",
+ "update_flavor": "rule:admin",
+ "delete_flavor": "rule:admin",
+ "get_flavors": "rule:admin or rule:member",
+ "get_flavor": "rule:admin or rule:member",
+ "create_service_profile": "rule:admin",
+ "update_service_profile": "rule:admin",
+ "delete_service_profile": "rule:admin",
+ "get_service_profiles": "rule:admin",
+ "get_service_profile": "rule:admin",
+
+ "get_policy": "rule:admin or rule:member",
+ "create_policy": "rule:admin",
+ "update_policy": "rule:admin",
+ "delete_policy": "rule:admin",
+ "get_policy_bandwidth_limit_rule": "rule:admin or rule:member",
+ "create_policy_bandwidth_limit_rule": "rule:admin",
+ "delete_policy_bandwidth_limit_rule": "rule:admin",
+ "update_policy_bandwidth_limit_rule": "rule:admin",
+ "get_policy_dscp_marking_rule": "rule:admin or rule:member",
+ "create_policy_dscp_marking_rule": "rule:admin",
+ "delete_policy_dscp_marking_rule": "rule:admin",
+ "update_policy_dscp_marking_rule": "rule:admin",
+ "get_rule_type": "rule:admin or rule:member",
+ "get_policy_minimum_bandwidth_rule": "rule:admin or rule:member",
+ "create_policy_minimum_bandwidth_rule": "rule:admin",
+ "delete_policy_minimum_bandwidth_rule": "rule:admin",
+ "update_policy_minimum_bandwidth_rule": "rule:admin",
+
+ "restrict_wildcard": "(not field:rbac_policy:target_tenant=*) or rule:admin",
+ "create_rbac_policy": "rule:admin or rule:member",
"create_rbac_policy:target_tenant": "rule:restrict_wildcard",
- "update_rbac_policy": "rule:admin_or_owner",
- "update_rbac_policy:target_tenant": "rule:restrict_wildcard and rule:admin_or_owner",
- "get_rbac_policy": "rule:admin_or_owner",
- "delete_rbac_policy": "rule:admin_or_owner",
-
- "create_flavor_service_profile": "rule:admin_only",
- "delete_flavor_service_profile": "rule:admin_only",
- "get_flavor_service_profile": "rule:regular_user",
- "get_auto_allocated_topology": "rule:admin_or_owner",
-
- "create_trunk": "rule:regular_user",
- "get_trunk": "rule:admin_or_owner",
- "delete_trunk": "rule:admin_or_owner",
- "get_subports": "",
- "add_subports": "rule:admin_or_owner",
- "remove_subports": "rule:admin_or_owner"
+ "update_rbac_policy": "rule:admin or rule:member",
+ "update_rbac_policy:target_tenant": "rule:restrict_wildcard and rule:admin or rule:member",
+ "get_rbac_policy": "rule:admin or rule:member",
+ "delete_rbac_policy": "rule:admin or rule:member",
+
+ "create_flavor_service_profile": "rule:admin",
+ "delete_flavor_service_profile": "rule:admin",
+ "get_flavor_service_profile": "rule:admin or rule:member",
+ "get_auto_allocated_topology": "rule:admin or rule:member",
+
+ "create_trunk": "rule:admin or rule:member",
+ "get_trunk": "rule:admin or rule:member",
+ "delete_trunk": "rule:admin or rule:member",
+ "get_subports": "rule:admin or rule:member",
+ "add_subports": "rule:admin or rule:member",
+ "remove_subports": "rule:admin or rule:member"
}