Policy files contain the access control rules for an OpenStack deployment. The upstream policy files are conservative and restrictive; they are designed to be customized on the end users system. However, poorly written changes can potentially break security, their deployment should be carefully managed and monitored.
Since RBAC Policy controls access to the Keystone server, the Keystone policy files themselves are not served from a database in the Keystone server. They are, instead, configuration files, and managed via the deployment’s content management system. In a Tripleo based deployment, none of the other services use the policy storage in Keystone, either.
In Tripleo, the deployment of the overcloud is managed via Heat. the OpenStack Tripleo Heat templates have support for deploying files at the end of the install, and this matches how we need to deploy policy.
- Create a directory structure that mimics the policy file layout in the overcloud. For this example, I will limit it to just Keystone. Create a directory called policy (making this a git repository is reasonable) and under it create etc/keystone.
Inside that Directory, copy the either the default policy.json file or the overcloudv3sample.json to be named policy.json.
- keystone:keystone as the owner,
- rw-r—– are the permissions
- Modify the policy files to reflect organizational rules
- Use the offline tool to check policy access control. Confirm that the policy behaves as desired.
create a tarball of the files.
- cd policy
- tar -zxf openstack-policy.tar.gz etc
Use the Script to upload to undercloud swift:
- . ./stackrc; ./upload-swift-artifacts openstack-policy.tar.gz
Confirm the upload with swift list -l overcloud
- 1298 2016-08-04 16:34:22 application/x-tar openstack-policy.tar.gz
- Redeploy the overcloud
- Confirm that the policy file contains the modifications made in development