Bug 2196858 - [RFE] Add role capability in rados user in ODF via rook
Summary: [RFE] Add role capability in rados user in ODF via rook
Keywords:
Status: MODIFIED
Alias: None
Product: Red Hat OpenShift Data Foundation
Classification: Red Hat Storage
Component: rook
Version: 4.12
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
: ---
Assignee: Jiffin
QA Contact: Neha Berry
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-05-10 14:41 UTC by Sonal
Modified: 2023-08-09 17:03 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)

Description Sonal 2023-05-10 14:41:00 UTC
Description of problem (please be detailed as possible and provide log
snippests):

Currently  CephObjectStoreUser CRD  does not support adding role capability to a rados user. It only supports below caps:

users, buckets, usage, metadata and zone.

Doc : https://rook.io/docs/rook/v1.11/CRDs/Object-Storage/ceph-object-store-user-crd/#spec

Hence, on creating a user with role caps, got below error:

cat test-user-role-caps.yaml
~~~ 
apiVersion: ceph.rook.io/v1
kind: CephObjectStoreUser
metadata:
  name: test-3
  namespace: openshift-storage
spec:
  store: ocs-storagecluster-cephobjectstore
  displayName: test user
  capabilities:
    user: "*"
    bucket: "*"
    roles: "*"
~~~

~~~
oc create -f test-user-role-caps.yaml
W0509 21:01:22.957291  264117 warnings.go:70] unknown field "spec.capabilities.roles"
cephobjectstoreuser.ceph.rook.io/test-3 created
~~~

This RFE is to implement role caps feature in rook.


Version of all relevant components (if applicable):
ODF 4.12

Does this issue impact your ability to continue to work with the product
(please explain in detail what is the user impact)?
No, since there is a workaround.

Is there any workaround available to the best of your knowledge?
Add role caps using radosgw-admin command:
radosgw-admin caps add --uid=<username> --caps="roles=*"

Rate from 1 - 5 the complexity of the scenario you performed that caused this
bug (1 - very simple, 5 - very complex)?
1

Can this issue reproducible?
Yes

Can this issue reproduce from the UI?
Yes

If this is a regression, please provide more details to justify this:
No

Steps to Reproduce:
1. Use above shared yaml to create user with role caps using CephObjectStoreUser CRD
2. The user got created successfully, however without caps.


Actual results:
Got error `unknown field "spec.capabilities.roles"` on adding role caps to user

Expected results:
CephObjectStoreUser CRD  should support adding role capability to a rados user.

Additional info:
-


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