ceph backend, secret key leak
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Cinder |
Fix Committed
|
Low
|
Brian Rosmaita | ||
OpenStack Security Advisory |
Won't Fix
|
Undecided
|
Unassigned | ||
OpenStack Security Notes |
Fix Released
|
Undecided
|
Brian Rosmaita |
Bug Description
Cinder + ceph backend, secret key leak
Conditions: cinder + ceph backend + rbd_keyring_conf set in cinder config files
As an authenticated simple user create a cinder volume that ends up on a ceph backend,
Then reuse the os.initialize_
(used by nova-compute/
curl -g -i -X POST https://<cinder_
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "OpenStack-
-H "X-Auth-Token: $TOKEN" \
-d '{"os-initializ
If you do not want to forge the http request, openstack clients and extensions may prove helpful.
As root:
apt-get install python3-
virtualenv -p python3 venv_openstack
source venv_openstack/
pip install python-
pip install python-cinderclient
pip install os-brick
pip install python-
cinder create vol 1
cinder --debug local-attach 7e59b91e-
This leaks the ceph credentials for the whole ceph cluster, leaving anyone able to go through ceph acls to get access
to all the volumes within the cluster.
{
"connection_
"data" : {
"discard" : true,
},
"keyring" : "SECRETFILETOHIDE",
"ports" : [
"6789",
"6789",
"6789"
],
"name" : "volumes/
"hosts" : [
...
],
},
"
}
}
Quick workaround:
1. Remove rbd_keyring_conf param from any cinder config file, this will mitigate the information disclosure.
2. For cinder backups to still work, providers should instead deploy their ceph keyring secrets directly on cinder-backup hosts
(/etc/cinder/
Note that nova-compute hosts should not be impacted by the change, because ceph secrets are expected to be stored in
libvirt secrets already, thus making this keyring disclose useless to it.
(to be confirmed, there may be other compute drivers that might be impacted by this)
Quick code fix:
Mandatory: revert this commit https:/
Optional: revert this one https:/
Long term code fix proposals:
What the os.initialize_
in order to attach volumes outside the scope of any virtual machines/nova.
Thus, information returned by this call should give enough information for a volume attach to be possible for the caller but they should not disclose
anything that would allow him to do more than that.
Since it is not possible at all with ceph to do so (no tenant isolation within ceph cluster),
the related cinder backend for ceph should not implement this route at all
There is indeed no reason why cinder should disclose anything here about ceph cluster, including hosts, cluster-ids,
if the attach is doomed to fail for users missing secret informations anyway.
Then, any 'admin' service using this call to locally attach the volumes (nova-compute, cinder-backup...) should be modified to:
- check caller rw permissions on requested volumes
- escalate the request
- go through a new admin api route, not this 'user' one
description: | updated |
Changed in ossn: | |
status: | Confirmed → In Progress |
Changed in ossn: | |
status: | In Progress → Fix Released |
Changed in cinder: | |
status: | In Progress → Fix Committed |
Changed in cinder: | |
status: | In Progress → Fix Committed |
Eric, is this something you can comment on? Or know someone on the team that can?