Bug 1734513

Summary: all users has access to read ceph manager client keyring files
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Yogev Rabl <yrabl>
Component: Ceph-AnsibleAssignee: Guillaume Abrioux <gabrioux>
Status: CLOSED ERRATA QA Contact: Ameena Suhani S H <amsyedha>
Severity: high Docs Contact:
Priority: high    
Version: 3.3CC: amsyedha, aschoen, ceph-eng-bugs, elicohen, gabrioux, gfidente, gmeno, nthomas, nweinber, pasik, tserlin
Target Milestone: z2   
Target Release: 3.3   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: RHEL: ceph-ansible-3.2.36-1.el7cp Ubuntu: ceph-ansible_3.2.36-2redhat1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-12-19 17:59:09 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1578730    
Attachments:
Description Flags
Ansible logs none

Description Yogev Rabl 2019-07-30 18:01:36 UTC
Description of problem:
in a containerized deployment of Ceph the permissions are set wrong, enabling all users in the OS to read ceph.mgr keyrings:

-rw-------. 1 ceph ceph  161 Jul 18 19:04 ceph.client.admin.keyring
-rw-------. 1 ceph ceph  268 Jul 18 19:12 ceph.client.manila.keyring
-rw-------. 1 ceph ceph  253 Jul 18 19:12 ceph.client.openstack.keyring
-rw-------. 1 ceph ceph  134 Jul 18 19:12 ceph.client.radosgw.keyring
-rw-r--r--. 1 root root 1546 Jul 18 19:04 ceph.conf
-rw-r--r--. 1 root root   67 Jul 18 19:05 ceph.mgr.controller-0.keyring
-rw-r--r--. 1 root root   67 Jul 18 19:05 ceph.mgr.controller-1.keyring
-rw-r--r--. 1 root root   67 Jul 18 19:04 ceph.mgr.controller-2.keyring
-rw-------. 1 ceph ceph  690 Jul 18 19:04 ceph.mon.keyring
-rw-r--r--. 1 root root   92 Aug  3  2018 rbdmap

With a non containerized deployment the permissions are different:
-rw-------. 1 ceph ceph  63 Jul 17 11:50 ceph.client.admin.keyring
-rw-r--r--. 1 ceph ceph 997 Jul 17 11:49 ceph.conf
-rw-------. 1 ceph ceph 139 Jul 18 12:22 ceph.mgr.cephserver1.keyring
-rw-------. 1 ceph ceph 139 Jul 18 12:22 ceph.mgr.cephserver2.keyring
-rw-------. 1 ceph ceph 139 Jul 18 12:22 ceph.mgr.cephserver3.keyring
-rw-r--r--. 1 root root  92 Apr 25 17:34 rbdmap


Version-Release number of selected component (if applicable):
ceph-ansible-3.2.15-1.el7cp.noarch

How reproducible:
unknown

Steps to Reproduce:
1. Deploy containerized ceph with TripleO in the Overcloud


Actual results:
The permissions are too permissive

Expected results:
The permissions should be only rw to the ceph user

Additional info:

Comment 4 Ameena Suhani S H 2019-11-12 07:11:34 UTC
Created attachment 1635197 [details]
Ansible logs

Hi,
I tried with ceph-ansible-3.2.34-1.el7cp.noarch. The issue is still seen.

#ls -la /etc/ceph/

-rw-r--r--.   1 root root   447 Nov 11 16:12 ceph.conf
-rw-r--r--.   1 root root   139 Nov 12 05:14 ceph.mgr.magna124.keyring
-rw-r--r--.   1 root root   139 Nov 12 05:14 ceph.mgr.magna125.keyring
-rw-r--r--.   1 root root   139 Nov 12 05:14 ceph.mgr.magna126.keyring
-rw-------.   1  167  167   690 Nov 11 16:12 ceph.mon.keyring

Comment 13 errata-xmlrpc 2019-12-19 17:59:09 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2019:4353