diff --git a/cinder/templates/bin/_backup-storage-init.sh.tpl b/cinder/templates/bin/_backup-storage-init.sh.tpl index 40f3e50df5..0223097934 100644 --- a/cinder/templates/bin/_backup-storage-init.sh.tpl +++ b/cinder/templates/bin/_backup-storage-init.sh.tpl @@ -51,10 +51,10 @@ elif [ "x$STORAGE_BACKEND" == "xcinder.backup.drivers.ceph" ]; then echo $KEYSTR > ${KEYRING} else #NOTE(Portdirect): Determine proper privs to assign keyring + #NOTE(JCL): Adjusted permissions for cinder backup. ceph auth get-or-create client.${RBD_POOL_USER} \ - mon "allow *" \ - osd "allow *" \ - mgr "allow *" \ + mon "profile rbd" \ + osd "profile rbd pool=${RBD_POOL_NAME}" \ -o ${KEYRING} fi diff --git a/cinder/templates/bin/_storage-init.sh.tpl b/cinder/templates/bin/_storage-init.sh.tpl index bbce6d5401..3932c98ad6 100644 --- a/cinder/templates/bin/_storage-init.sh.tpl +++ b/cinder/templates/bin/_storage-init.sh.tpl @@ -48,10 +48,10 @@ if [ "x$STORAGE_BACKEND" == "xcinder.volume.drivers.rbd.RBDDriver" ]; then echo $KEYSTR > ${KEYRING} else #NOTE(Portdirect): Determine proper privs to assign keyring + #NOTE(JCL): Restrict Cinder permissions to what is needed. MON Read only and RBD access to Cinder pool only. ceph auth get-or-create client.${RBD_POOL_USER} \ - mon "allow *" \ - osd "allow *" \ - mgr "allow *" \ + mon "profile rbd" \ + osd "profile rbd" \ -o ${KEYRING} fi diff --git a/glance/templates/bin/_storage-init.sh.tpl b/glance/templates/bin/_storage-init.sh.tpl index 4082c5222b..119c4b3733 100644 --- a/glance/templates/bin/_storage-init.sh.tpl +++ b/glance/templates/bin/_storage-init.sh.tpl @@ -55,10 +55,10 @@ elif [ "x$STORAGE_BACKEND" == "xrbd" ]; then echo "${KEYSTR}" > "${KEYRING}" else #NOTE(Portdirect): Determine proper privs to assign keyring + #NOTE(JCL): Restrict Glance user to only what is needed. MON Read only and RBD access to the Glance Pool ceph auth get-or-create "client.${RBD_POOL_USER}" \ - mon "allow *" \ - osd "allow *" \ - mgr "allow *" \ + mon "profile rbd" \ + osd "profile rbd pool=${RBD_POOL_NAME}" \ -o "${KEYRING}" fi diff --git a/nova/templates/bin/_ceph-keyring.sh.tpl b/nova/templates/bin/_ceph-keyring.sh.tpl index 418a40c27d..cdfef24b82 100644 --- a/nova/templates/bin/_ceph-keyring.sh.tpl +++ b/nova/templates/bin/_ceph-keyring.sh.tpl @@ -26,12 +26,12 @@ cat > ${KEYRING} <