此内容没有您所选择的语言版本。
Chapter 13. Configuring RBAC policies
13.1. Overview of RBAC policies 复制链接链接已复制到粘贴板!
Role-based access control (RBAC) policies in OpenStack Networking allow granular control over shared neutron networks. OpenStack Networking uses a RBAC table to control sharing of neutron networks among projects, allowing an administrator to control which projects are granted permission to attach instances to a network.
As a result, cloud administrators can remove the ability for some projects to create networks and can instead allow them to attach to pre-existing networks that correspond to their project.
13.2. Creating RBAC policies 复制链接链接已复制到粘贴板!
This example procedure demonstrates how to use a role-based access control (RBAC) policy to grant a project access to a shared network.
View the list of available networks:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow View the list of projects:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Create a RBAC entry for the
web-serversnetwork that grants access to the auditors project (4b0b98f8c6c040f38ba4f7146e8680f5):Copy to Clipboard Copied! Toggle word wrap Toggle overflow
As a result, users in the auditors project can connect instances to the web-servers network.
13.3. Reviewing RBAC policies 复制链接链接已复制到粘贴板!
Run the
openstack network rbac listcommand to retrieve the ID of your existing role-based access control (RBAC) policies:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Run the
openstack network rbac-showcommand to view the details of a specific RBAC entry:Copy to Clipboard Copied! Toggle word wrap Toggle overflow
13.4. Deleting RBAC policies 复制链接链接已复制到粘贴板!
Run the
openstack network rbac listcommand to retrieve the ID of your existing role-based access control (RBAC) policies:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Run the
openstack network rbac deletecommand to delete the RBAC, using the ID of the RBAC that you want to delete:openstack network rbac delete 314004d0-2261-4d5e-bda7-0181fcf40709
# openstack network rbac delete 314004d0-2261-4d5e-bda7-0181fcf40709 Deleted rbac_policy: 314004d0-2261-4d5e-bda7-0181fcf40709Copy to Clipboard Copied! Toggle word wrap Toggle overflow
13.5. Granting RBAC policy access for external networks 复制链接链接已复制到粘贴板!
You can grant role-based access control (RBAC) policy access to external networks (networks with gateway interfaces attached) using the --action access_as_external parameter.
Complete the steps in the following example procedure to create a RBAC for the web-servers network and grant access to the engineering project (c717f263785d4679b16a122516247deb):
Create a new RBAC policy using the
--action access_as_externaloption:Copy to Clipboard Copied! Toggle word wrap Toggle overflow As a result, users in the engineering project are able to view the network or connect instances to it:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow