Commit Graph

131899 Commits

Author SHA1 Message Date
Pritha Srivastava
f272a57fdb rgw: oids must not be prefixed in case of read_info
and store_info since that gets taken care of the meta_be->put()
and meta_be->get().

Signed-off-by: Pritha Srivastava <prsrivas@redhat.com>
2022-06-06 16:19:43 +05:30
Pritha Srivastava
9549d2cb6c rgw: adding a metadata section for roles.
Signed-off-by: Pritha Srivastava <prsrivas@redhat.com>
2022-06-06 16:19:43 +05:30
Pritha Srivastava
520e4ffa3e rgw: moving data members of RGWRole into RGWRoleInfo.
Signed-off-by: Pritha Srivastava <prsrivas@redhat.com>
2022-06-06 16:19:43 +05:30
Pritha Srivastava
fb1f670fbb rgw: shifting back be_handler and module initialization to svc role
rados.

Signed-off-by: Pritha Srivastava <prsrivas@redhat.com>
2022-06-06 16:19:43 +05:30
Pritha Srivastava
36169ca69f rgw: using put() method of metadata backend to ensure that role
metadata is written to md log in method store_info().

Signed-off-by: Pritha Srivastava <prsrivas@redhat.com>
2022-06-06 16:19:43 +05:30
Pritha Srivastava
510db31fc7 rgw: cleanup.
Signed-off-by: Pritha Srivastava <prsrivas@redhat.com>
2022-06-06 16:19:43 +05:30
Pritha Srivastava
a100026281 rgw: code for handling mtime, object tracker and attrs
needed for RGWRoleMetadataHandler.

Signed-off-by: Pritha Srivastava <prsrivas@redhat.com>
2022-06-06 16:19:43 +05:30
Pritha Srivastava
3f574a39a4 rgw: removing do_start() method from
RGWRoleMetadataHandler and class RGWSI_Role_Module.

Signed-off-by: Pritha Srivastava <prsrivas@redhat.com>
2022-06-06 16:19:43 +05:30
Pritha Srivastava
04913ebd8e rgw: role metadata handler invokes RGWRole interfaces.
Removing references to RGW services and RGW Ctl.

Signed-off-by: Pritha Srivastava <prsrivas@redhat.com>
2022-06-06 16:19:43 +05:30
Abhishek Lekshmanan
4aa53fffcf svc: role: use the stat system obj call for checking presence
Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
2022-06-06 16:19:43 +05:30
Abhishek Lekshmanan
8f4e00c474 rgw: tools: introduce rgw_stat_system_obj
Similar to the read and write system_obj interfaces this function stats an
object and returns the mtime & attrs if set.

Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
2022-06-06 16:19:43 +05:30
Abhishek Lekshmanan
d8c2a893b3 rgw: role/svc cosmetic comments & ws cleanup
Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
2022-06-06 16:19:43 +05:30
Abhishek Lekshmanan
846a0e4ec9 rgw: role: use the list roles from role svc classes
This keeps the implementation of storage seperate from the RGWRole class. Also
drop the get_roles_by_path_prefix static function as this is currently
implemented in the backend and can be directly accessed from role ctl classes.

Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
2022-06-06 16:19:43 +05:30
Abhishek Lekshmanan
35c0e1315c svc: role: make string consts static
Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
2022-06-06 16:19:43 +05:30
Abhishek Lekshmanan
e078dea849 svc: role: introduce list roles by path
Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
2022-06-06 16:19:43 +05:30
Abhishek Lekshmanan
a38db5d0fd rgw: role: use svc->delete_role for deleting
Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
2022-06-06 16:19:43 +05:30
Abhishek Lekshmanan
46c20d9d7a rgw: role: use a err msg string in RoleInfo class for logging
Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
2022-06-06 16:19:42 +05:30
Abhishek Lekshmanan
ea187c9a69 rgw_role: remove unrelated functions
Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
2022-06-06 16:19:42 +05:30
Abhishek Lekshmanan
0a74355a67 svc: role: improve delete functions & introduce delete_role
This deletes all the role related objects

Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
2022-06-06 16:19:42 +05:30
Abhishek Lekshmanan
a92752be96 svc: roles: set objv_tracker to null for sysobj calls
Since these aren't tracked via MDLog and merely ancillary objects

Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
2022-06-06 16:19:42 +05:30
Abhishek Lekshmanan
5f9f977fd8 rgw: role: move populate from svc->role
As populate creates uuids etc which are only needed in direct calls to rgw_admin

Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
2022-06-06 16:19:42 +05:30
Abhishek Lekshmanan
932807bc1c rgw: role: use create_role from svc
Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
2022-06-06 16:19:42 +05:30
Pritha Srivastava
6e462430f7 svc: role: introduce create role
Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
2022-06-06 16:19:42 +05:30
Abhishek Lekshmanan
93375dd04c rgw: role: json fixes
Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
2022-06-06 16:19:42 +05:30
Abhishek Lekshmanan
7fb221cdef rgw: role: use ot
Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
2022-06-06 16:19:42 +05:30
Abhishek Lekshmanan
83e30f63b8 svc: role: move prefix to Module
Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
2022-06-06 16:19:42 +05:30
Abhishek Lekshmanan
feb4754e82 rgw: role fixes
Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
2022-06-06 16:19:42 +05:30
Abhishek Lekshmanan
ceb7cf9fb0 rgw: role: backend handler definition
Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
2022-06-06 16:19:42 +05:30
Abhishek Lekshmanan
59b072ad7f rgw: role: md handler get_meta_obj defn
Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
2022-06-06 16:19:42 +05:30
Abhishek Lekshmanan
d1fd01c46f rgw: role: define md handler for roles
Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
2022-06-06 16:19:42 +05:30
Abhishek Lekshmanan
90b6642f2a rgw: role: add RGWRoleMetadataObject
Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
2022-06-06 16:19:42 +05:30
Abhishek Lekshmanan
0ca675644b rgw: metadata: provide a constructor for RGWMetadataObject
Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
2022-06-06 16:19:42 +05:30
Abhishek Lekshmanan
e41629fc7f rgw: role: drop rados_ctl and use only role_ctl
Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
2022-06-06 16:19:42 +05:30
Abhishek Lekshmanan
ccebb5c63b rgw: finish role class impl
Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
2022-06-06 16:19:42 +05:30
Abhishek Lekshmanan
f8189c64da rgw: role: modify store_name & path
Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
2022-06-06 16:19:42 +05:30
Abhishek Lekshmanan
e2b8006bb6 rgw: base role md handler decl
Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
2022-06-06 16:19:42 +05:30
Abhishek Lekshmanan
3c7d027322 svc: introduce role_rados service
Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
2022-06-06 16:19:42 +05:30
Abhishek Lekshmanan
7a2795f293 rgw: start using role_ctl
Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
2022-06-06 16:19:42 +05:30
Abhishek Lekshmanan
0569b7d05d rgw: svc: role_rados: stub out get_path
Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
2022-06-06 16:19:42 +05:30
Abhishek Lekshmanan
150f78b2d6 rgw_role: define RGWRoleCtl
Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
2022-06-06 16:19:42 +05:30
Abhishek Lekshmanan
2335a4b2a1 rgw: role: basic ctl class defn
Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
2022-06-06 16:19:42 +05:30
Abhishek Lekshmanan
0cabcf6b8e rgw: split RGWRole into an Info Class containing members
Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
2022-06-06 16:19:42 +05:30
Abhishek Lekshmanan
cd69cfc553 rgw: implement delete oids
Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
2022-06-06 16:19:42 +05:30
Abhishek Lekshmanan
00dbe323d1 svc: role: implement read/write role path & name
Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
2022-06-06 16:19:42 +05:30
Abhishek Lekshmanan
842f74a1cf svc: role: implement get/put/delete Roles
Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
2022-06-06 16:19:42 +05:30
Abhishek Lekshmanan
4f8b4b5bc5 svc: role: fix real_time put param
Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
2022-06-06 16:19:41 +05:30
Abhishek Lekshmanan
cff18a2132 rgw: RGWRole: add a missing RGWRados forward declaration
Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
2022-06-06 16:19:41 +05:30
Abhishek Lekshmanan
3fe43071e2 rgw: introduce RGW Role Rados service
This handles the metadata for RGW Roles with the RADOS backend

Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
2022-06-06 16:19:41 +05:30
Abhishek Lekshmanan
1584fe53b5 rgw: svc: introduce a service for rgw_role
Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
2022-06-06 16:19:41 +05:30
Cory Snyder
ebf4209fa7 rgw: log identity applier metadata in ops logs
As relevant, logs the access key id, subuser, and whether a request was made
via a temp_url in the ops logs for auditing purposes.

Fixes: https://tracker.ceph.com/issues/53367
Signed-off-by: Cory Snyder <csnyder@iland.com>
2022-06-06 04:05:52 -04:00