cls/user: add interfaces to index user account resources#54563
cls/user: add interfaces to index user account resources#54563
Conversation
|
edit: updated to index by-path and by-name, and to store additional metadata needed by the apis |
30d3e1a to
acd2017
Compare
Signed-off-by: Casey Bodley <cbodley@redhat.com>
Signed-off-by: Casey Bodley <cbodley@redhat.com>
acd2017 to
0adbda9
Compare
fixed - |
Signed-off-by: Casey Bodley <cbodley@redhat.com>
0adbda9 to
5f66625
Compare
|
jenkins test this please |
|
passed qa in https://pulpito.ceph.com/cbodley-2023-11-27_20:42:48-rgw-wip-cbodley-testing-distro-default-smithi/ after rerun https://pulpito.ceph.com/cbodley-2023-11-29_13:34:32-rgw-wip-cbodley-testing-distro-default-smithi/ ceph_test_cls_user passing: |
i guess i was mistaken about this part after testing against aws in ceph/s3-tests#537. aws is returning users sorted by name, regardless of their paths that implies that we shouldn't use PathPrefix to limit the range of keys we visit (by passing that prefix to cls_cxx_map_get_vals()). instead we need to visit the entire range of names, and filter entries by path after decoding their value that certainly makes the cls_user logic simpler, but it means we'll have different behavior when listing roles in accounts vs. the per-tenant roles outside of accounts |
|
i pushed updated versions of these commits to #54333 and see it passing these tests now |
a small building block for the rados user account implementation. this allows each account to maintain omap indices of its resources in rados objects like
{account}.users,{account}.roles, and{account}.groups. these indices will only be used to serve the iam rest apis likeListUsers/ListRoles/ListGroups. the existing cls_user apis likecls_user_set_buckets()will be used to track{account}.bucketsforListBucketsand account statsadds a generic
struct cls_user_account_resourcewhich can represent a user, role, or group.cls_useronly needs to know about the resource'snameandpath. all other type-specific information needed by the iam apis can be encoded in the opaquebufferlist metadatafieldthe
cls_user_clientinterface is very simple, providing methods to add acls_user_account_resourceentry to the index, remove an entry by name, and to list entries with pagination and filtering by path prefixthe
cls_userserver implementation just manages two omap indices:Show available Jenkins commands
jenkins retest this pleasejenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test dashboard cephadmjenkins test apijenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume toxjenkins test windowsjenkins test rook e2e