Bug 1543879 - ceph_volume_client: sets invalid caps for existing ceph auth IDs with no MDS or OSD caps
Summary: ceph_volume_client: sets invalid caps for existing ceph auth IDs with no MDS ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Ceph Storage
Classification: Red Hat Storage
Component: CephFS
Version: 3.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: z2
: 3.0
Assignee: Ram Raja
QA Contact: ceph-qe-bugs
URL:
Whiteboard:
Depends On: 1548067
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-02-09 13:15 UTC by Ram Raja
Modified: 2018-04-26 17:40 UTC (History)
13 users (show)

Fixed In Version: RHEL: ceph-12.2.4-1.el7cp Ubuntu: ceph_12.2.4-2redhat1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1493597
Environment:
Last Closed: 2018-04-26 17:38:39 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Ceph Project Bug Tracker 21501 0 None None None 2018-02-09 13:15:20 UTC
Red Hat Bugzilla 1493597 0 medium CLOSED Performing a manila access-allow on an existing auth entry in Ceph corrupts the permissions. 2021-02-22 00:41:40 UTC
Red Hat Product Errata RHBA-2018:1259 0 None None None 2018-04-26 17:40:22 UTC

Internal Links: 1493597

Description Ram Raja 2018-02-09 13:15:21 UTC
Manila's cephfs native driver uses this client library. Users of the driver will get back auth IDs with invalid caps, for auth IDs that weren't created by the driver and had no MDS or OSD caps.

Steps to reproduce:

1. Create a ceph auth ID with no caps.
$ sudo ceph auth get-or-create client.test2

2. Create a ceph client auth ID 'manila' with r/w access to the entire CephFS . It will be used by the ceph volume client.
$ sudo ceph auth get-or-create client.manila mon "allow *" osd "allow rw" mds "allow *" -o /etc/ceph/ceph.client.manila.keyring 
   
3. Allow ceph volume client to authorize ID 'client.test2' to access a volume (a  CephFS subdir). Do this in the python interpreter.

>>> import ceph_volume_client
>>> vc = ceph_volume_client.CephFSVolumeClient("manila", "/etc/ceph/ceph.conf", "ceph")
>>> vc.connect()
>>> vp = ceph_volume_client.VolumePath('group1', 'share1')
>>> vc.create_volume(vp, size=5)
>>> vc.authorize(vp, 'test2')
>>> vc.disconnect()

4. Now check out the caps of 'client.test2'. It's got invalid OSD and MDS caps, a ',' is at the beginning of the caps.
$ sudo ceph auth get client.test2
[client.test2]
key = AQD4CsVZCpBBORAAtqL6wndnhTbip9xf0NQeeQ==
caps mds = ",allow rw path=/volumes/group1/share1"
caps mon = "allow r"
caps osd = ",allow rw pool=cephfs_data namespace=fsvolumens_share1"

Comment 3 Ram Raja 2018-02-09 13:19:44 UTC
The fix is in uptream v12.2.2
https://github.com/ceph/ceph/commit/c5ccbf1108532547f54f084b8f06c7f5ddf8a4e8

Comment 6 Ram Raja 2018-02-09 13:32:15 UTC
In https://bugzilla.redhat.com/show_bug.cgi?id=1543879#c0

> Manila's cephfs native driver uses this client library

Meant to say 'ceph_volume_client' library

Comment 15 Ramakrishnan Periyasamy 2018-03-19 10:50:53 UTC
provided qa_ack, clearing needinfo flag.

Comment 21 errata-xmlrpc 2018-04-26 17:38:39 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/RHBA-2018:1259


Note You need to log in before you can comment on or make changes to this bug.