diff --git a/cinder/templates/bin/_backup-storage-init.sh.tpl b/cinder/templates/bin/_backup-storage-init.sh.tpl index 40f3e50d..02230979 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 bbce6d54..3932c98a 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 4082c522..119c4b37 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 418a40c2..cdfef24b 100644 --- a/nova/templates/bin/_ceph-keyring.sh.tpl +++ b/nova/templates/bin/_ceph-keyring.sh.tpl @@ -26,12 +26,12 @@ cat > ${KEYRING} <