Bug 2218189 - print better error message for wrong permissions in MDS caps
Summary: print better error message for wrong permissions in MDS caps
Keywords:
Status: ASSIGNED
Alias: None
Product: Red Hat Ceph Storage
Classification: Red Hat Storage
Component: CephFS
Version: 5.3
Hardware: All
OS: All
unspecified
low
Target Milestone: ---
: 6.1z2
Assignee: Rishabh Dave
QA Contact: Hemanth Kumar
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-06-28 11:50 UTC by Rishabh Dave
Modified: 2023-07-12 01:53 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Ceph Project Bug Tracker 61666 0 None None None 2023-06-28 11:56:25 UTC
Github ceph ceph pull 52042 0 None open MDSAuthCaps: print better error message for perm flag in MDS caps 2023-06-28 11:57:03 UTC
Red Hat Issue Tracker RHCEPH-6933 0 None None None 2023-06-28 11:52:18 UTC

Description Rishabh Dave 2023-06-28 11:50:56 UTC
Description of problem:

Any permissions in MDS caps besides "allow *" and "allow w" must start with "allow r" or "allow rw". Otherwise the MDS cap is rejected. The error printed by MDS in this case is the generic error the MDS prints in every case of incorrect MDS caps.

Unlike some other Ceph daemons, MDS doesn't permission like "allow w". Therefore, print a special error message so that users are specifically told that the permissions in the MDS caps, besides "all" and "*", must start with "r" or "rw".

Such a message is printed in case of "ceph fs authorize" but the commands "ceph auth add", "ceph auth caps", "ceph auth get-or-create" and "ceph auth get-or-create-key" don't. Let's make these commands too print a special message.

Version-Release number of selected component (if applicable):


How reproducible:
Everytime


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