5.4.2. 强化块存储
本节包含增强 OpenStack 块存储安全性的实用建议。
5.4.2.1. 将配置文件的 user/group 所有权设置为 root/cinder 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
配置文件包含组件无缝运行所需的关键参数和信息。如果非特权用户有意或意外地修改或删除任何参数,或者文件本身会导致严重可用性问题,从而导致向其他最终用户拒绝服务。因此,此类关键配置文件的用户所有权必须设置为 root,而组所有权必须设置为 cinder。
使用以下命令,检查这些配置文件的用户和组所有权是否分别设置为 root 和 cinder:
stat -L -c "%U %G" /var/lib/config-data/puppet-generated/cinder/etc/cinder/cinder.conf | egrep "root cinder" stat -L -c "%U %G" /var/lib/config-data/puppet-generated/cinder/etc/cinder/api-paste.ini | egrep "root cinder" stat -L -c "%U %G" /var/lib/config-data/puppet-generated/cinder/etc/cinder/policy.json | egrep "root cinder" stat -L -c "%U %G" /var/lib/config-data/puppet-generated/cinder/etc/cinder/rootwrap.conf | egrep "root cinder"
$ stat -L -c "%U %G" /var/lib/config-data/puppet-generated/cinder/etc/cinder/cinder.conf | egrep "root cinder"
$ stat -L -c "%U %G" /var/lib/config-data/puppet-generated/cinder/etc/cinder/api-paste.ini | egrep "root cinder"
$ stat -L -c "%U %G" /var/lib/config-data/puppet-generated/cinder/etc/cinder/policy.json | egrep "root cinder"
$ stat -L -c "%U %G" /var/lib/config-data/puppet-generated/cinder/etc/cinder/rootwrap.conf | egrep "root cinder"