Skip to content

Commit c7063e5

Browse files
committed
Add RBAC endpoints and namespaces for Hub Online Sync
1 parent bd2081d commit c7063e5

File tree

5 files changed

+729
-0
lines changed

5 files changed

+729
-0
lines changed

schema/spacewalk/common/data/endpoint.sql

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,55 @@ INSERT INTO access.endpoint (class_method, endpoint, http_method, scope, auth_re
6969
INSERT INTO access.endpoint (class_method, endpoint, http_method, scope, auth_required)
7070
VALUES ('', '/hub/sync/subscriptions', 'POST', 'W', False)
7171
ON CONFLICT (endpoint, http_method) DO NOTHING;
72+
73+
INSERT INTO access.endpoint (class_method, endpoint, http_method, scope, auth_required)
74+
VALUES ('', '/hub/syncChannels', 'POST', 'W', False)
75+
ON CONFLICT (endpoint, http_method) DO NOTHING;
76+
INSERT INTO access.endpoint (class_method, endpoint, http_method, scope, auth_required)
77+
VALUES ('', '/hub/sync/migrate/v1/deleteMaster', 'POST', 'W', False)
78+
ON CONFLICT (endpoint, http_method) DO NOTHING;
79+
80+
INSERT INTO access.endpoint (class_method, endpoint, http_method, scope, auth_required)
81+
VALUES ('', '/hub/scc/connect/organizations/products/unscoped', 'GET', 'W', False)
82+
ON CONFLICT (endpoint, http_method) DO NOTHING;
83+
INSERT INTO access.endpoint (class_method, endpoint, http_method, scope, auth_required)
84+
VALUES ('', '/hub/scc/connect/organizations/repositories', 'GET', 'W', False)
85+
ON CONFLICT (endpoint, http_method) DO NOTHING;
86+
INSERT INTO access.endpoint (class_method, endpoint, http_method, scope, auth_required)
87+
VALUES ('', '/hub/scc/connect/organizations/subscriptions', 'GET', 'W', False)
88+
ON CONFLICT (endpoint, http_method) DO NOTHING;
89+
INSERT INTO access.endpoint (class_method, endpoint, http_method, scope, auth_required)
90+
VALUES ('', '/hub/scc/connect/organizations/orders', 'GET', 'W', False)
91+
ON CONFLICT (endpoint, http_method) DO NOTHING;
92+
INSERT INTO access.endpoint (class_method, endpoint, http_method, scope, auth_required)
93+
VALUES ('', '/hub/scc/suma/product_tree.json', 'GET', 'W', False)
94+
ON CONFLICT (endpoint, http_method) DO NOTHING;
95+
96+
INSERT INTO access.endpoint (class_method, endpoint, http_method, scope, auth_required)
97+
VALUES ('', '/manager/admin/hub/hub-details', 'GET', 'W', True)
98+
ON CONFLICT (endpoint, http_method) DO NOTHING;
99+
INSERT INTO access.endpoint (class_method, endpoint, http_method, scope, auth_required)
100+
VALUES ('', '/manager/admin/hub/peripherals', 'GET', 'W', True)
101+
ON CONFLICT (endpoint, http_method) DO NOTHING;
102+
INSERT INTO access.endpoint (class_method, endpoint, http_method, scope, auth_required)
103+
VALUES ('', '/manager/admin/hub/peripherals/register', 'GET', 'W', True)
104+
ON CONFLICT (endpoint, http_method) DO NOTHING;
105+
INSERT INTO access.endpoint (class_method, endpoint, http_method, scope, auth_required)
106+
VALUES ('', '/manager/admin/hub/peripherals/migrate-from-v1', 'GET', 'W', True)
107+
ON CONFLICT (endpoint, http_method) DO NOTHING;
108+
INSERT INTO access.endpoint (class_method, endpoint, http_method, scope, auth_required)
109+
VALUES ('', '/manager/admin/hub/peripherals/migrate-from-v2', 'GET', 'W', True)
110+
ON CONFLICT (endpoint, http_method) DO NOTHING;
111+
INSERT INTO access.endpoint (class_method, endpoint, http_method, scope, auth_required)
112+
VALUES ('', '/manager/admin/hub/peripherals/:id', 'GET', 'W', True)
113+
ON CONFLICT (endpoint, http_method) DO NOTHING;
114+
INSERT INTO access.endpoint (class_method, endpoint, http_method, scope, auth_required)
115+
VALUES ('', '/manager/admin/hub/peripherals/:id/sync-channels', 'GET', 'W', True)
116+
ON CONFLICT (endpoint, http_method) DO NOTHING;
117+
INSERT INTO access.endpoint (class_method, endpoint, http_method, scope, auth_required)
118+
VALUES ('', '/manager/admin/hub/access-tokens', 'GET', 'W', True)
119+
ON CONFLICT (endpoint, http_method) DO NOTHING;
120+
72121
INSERT INTO access.endpoint (class_method, endpoint, http_method, scope, auth_required)
73122
VALUES ('', '/manager/systems/details/proxy-config', 'GET', 'W', True)
74123
ON CONFLICT (endpoint, http_method) DO NOTHING;
@@ -159,6 +208,60 @@ INSERT INTO access.endpoint (class_method, endpoint, http_method, scope, auth_re
159208
INSERT INTO access.endpoint (class_method, endpoint, http_method, scope, auth_required)
160209
VALUES ('', '/manager/api/channels/owned', 'GET', 'W', True)
161210
ON CONFLICT (endpoint, http_method) DO NOTHING;
211+
212+
INSERT INTO access.endpoint (class_method, endpoint, http_method, scope, auth_required)
213+
VALUES ('', '/manager/api/admin/hub/peripherals', 'GET', 'W', True)
214+
ON CONFLICT (endpoint, http_method) DO NOTHING;
215+
INSERT INTO access.endpoint (class_method, endpoint, http_method, scope, auth_required)
216+
VALUES ('', '/manager/api/admin/hub/peripherals', 'POST', 'W', True)
217+
ON CONFLICT (endpoint, http_method) DO NOTHING;
218+
INSERT INTO access.endpoint (class_method, endpoint, http_method, scope, auth_required)
219+
VALUES ('', '/manager/api/admin/hub/peripherals/:id', 'DELETE', 'W', True)
220+
ON CONFLICT (endpoint, http_method) DO NOTHING;
221+
INSERT INTO access.endpoint (class_method, endpoint, http_method, scope, auth_required)
222+
VALUES ('', '/manager/api/admin/hub/peripherals/:id/root-ca', 'POST', 'W', True)
223+
ON CONFLICT (endpoint, http_method) DO NOTHING;
224+
INSERT INTO access.endpoint (class_method, endpoint, http_method, scope, auth_required)
225+
VALUES ('', '/manager/api/admin/hub/peripherals/:id/root-ca', 'DELETE', 'W', True)
226+
ON CONFLICT (endpoint, http_method) DO NOTHING;
227+
INSERT INTO access.endpoint (class_method, endpoint, http_method, scope, auth_required)
228+
VALUES ('', '/manager/api/admin/hub/peripherals/:id/credentials', 'POST', 'W', True)
229+
ON CONFLICT (endpoint, http_method) DO NOTHING;
230+
INSERT INTO access.endpoint (class_method, endpoint, http_method, scope, auth_required)
231+
VALUES ('', '/manager/api/admin/hub/peripherals/:id/sync-channels', 'GET', 'W', True)
232+
ON CONFLICT (endpoint, http_method) DO NOTHING;
233+
INSERT INTO access.endpoint (class_method, endpoint, http_method, scope, auth_required)
234+
VALUES ('', '/manager/api/admin/hub/peripherals/:id/sync-channels', 'POST', 'W', True)
235+
ON CONFLICT (endpoint, http_method) DO NOTHING;
236+
INSERT INTO access.endpoint (class_method, endpoint, http_method, scope, auth_required)
237+
VALUES ('', '/manager/api/admin/hub/:id', 'DELETE', 'W', True)
238+
ON CONFLICT (endpoint, http_method) DO NOTHING;
239+
INSERT INTO access.endpoint (class_method, endpoint, http_method, scope, auth_required)
240+
VALUES ('', '/manager/api/admin/hub/:id/root-ca', 'POST', 'W', True)
241+
ON CONFLICT (endpoint, http_method) DO NOTHING;
242+
INSERT INTO access.endpoint (class_method, endpoint, http_method, scope, auth_required)
243+
VALUES ('', '/manager/api/admin/hub/:id/root-ca', 'DELETE', 'W', True)
244+
ON CONFLICT (endpoint, http_method) DO NOTHING;
245+
INSERT INTO access.endpoint (class_method, endpoint, http_method, scope, auth_required)
246+
VALUES ('', '/manager/api/admin/hub/migrate/v1', 'POST', 'W', True)
247+
ON CONFLICT (endpoint, http_method) DO NOTHING;
248+
INSERT INTO access.endpoint (class_method, endpoint, http_method, scope, auth_required)
249+
VALUES ('', '/manager/api/admin/hub/migrate/v2', 'POST', 'W', True)
250+
ON CONFLICT (endpoint, http_method) DO NOTHING;
251+
INSERT INTO access.endpoint (class_method, endpoint, http_method, scope, auth_required)
252+
VALUES ('', '/manager/api/admin/hub/access-tokens', 'GET', 'W', True)
253+
ON CONFLICT (endpoint, http_method) DO NOTHING;
254+
INSERT INTO access.endpoint (class_method, endpoint, http_method, scope, auth_required)
255+
VALUES ('', '/manager/api/admin/hub/access-tokens', 'POST', 'W', True)
256+
ON CONFLICT (endpoint, http_method) DO NOTHING;
257+
INSERT INTO access.endpoint (class_method, endpoint, http_method, scope, auth_required)
258+
VALUES ('', '/manager/api/admin/hub/access-tokens/:id/validity', 'POST', 'W', True)
259+
ON CONFLICT (endpoint, http_method) DO NOTHING;
260+
INSERT INTO access.endpoint (class_method, endpoint, http_method, scope, auth_required)
261+
VALUES ('', '/manager/api/admin/hub/access-tokens/:id', 'DELETE', 'W', True)
262+
ON CONFLICT (endpoint, http_method) DO NOTHING;
263+
264+
162265
INSERT INTO access.endpoint (class_method, endpoint, http_method, scope, auth_required)
163266
VALUES ('', '/manager/api/admin/mandatoryChannels', 'POST', 'W', True)
164267
ON CONFLICT (endpoint, http_method) DO NOTHING;
@@ -4005,6 +4108,42 @@ INSERT INTO access.endpoint (class_method, endpoint, http_method, scope, auth_re
40054108
INSERT INTO access.endpoint (class_method, endpoint, http_method, scope, auth_required)
40064109
VALUES ('com.suse.manager.xmlrpc.iss.HubHandler.storeAccessToken', '/manager/api/sync/hub/storeAccessToken', 'POST', 'A', True)
40074110
ON CONFLICT (endpoint, http_method) DO NOTHING;
4111+
4112+
INSERT INTO access.endpoint (class_method, endpoint, http_method, scope, auth_required)
4113+
VALUES ('com.suse.manager.xmlrpc.iss.HubHandler.getAllPeripheralChannels', '/manager/api/sync/hub/getAllPeripheralChannels', 'GET', 'A', True)
4114+
ON CONFLICT (endpoint, http_method) DO NOTHING;
4115+
INSERT INTO access.endpoint (class_method, endpoint, http_method, scope, auth_required)
4116+
VALUES ('com.suse.manager.xmlrpc.iss.HubHandler.getManagerInfo', '/manager/api/sync/hub/getManagerInfo', 'GET', 'A', True)
4117+
ON CONFLICT (endpoint, http_method) DO NOTHING;
4118+
INSERT INTO access.endpoint (class_method, endpoint, http_method, scope, auth_required)
4119+
VALUES ('com.suse.manager.xmlrpc.iss.HubHandler.isISSPeripheral', '/manager/api/sync/hub/isISSPeripheral', 'GET', 'A', True)
4120+
ON CONFLICT (endpoint, http_method) DO NOTHING;
4121+
INSERT INTO access.endpoint (class_method, endpoint, http_method, scope, auth_required)
4122+
VALUES ('com.suse.manager.xmlrpc.iss.HubHandler.getAllPeripheralOrgs', '/manager/api/sync/hub/getAllPeripheralOrgs', 'GET', 'A', True)
4123+
ON CONFLICT (endpoint, http_method) DO NOTHING;
4124+
INSERT INTO access.endpoint (class_method, endpoint, http_method, scope, auth_required)
4125+
VALUES ('com.suse.manager.xmlrpc.iss.HubHandler.migrateFromISSv1', '/manager/api/sync/hub/migrateFromISSv1', 'POST', 'A', True)
4126+
ON CONFLICT (endpoint, http_method) DO NOTHING;
4127+
INSERT INTO access.endpoint (class_method, endpoint, http_method, scope, auth_required)
4128+
VALUES ('com.suse.manager.xmlrpc.iss.HubHandler.syncPeripheralChannels', '/manager/api/sync/hub/syncPeripheralChannels', 'POST', 'A', True)
4129+
ON CONFLICT (endpoint, http_method) DO NOTHING;
4130+
INSERT INTO access.endpoint (class_method, endpoint, http_method, scope, auth_required)
4131+
VALUES ('com.suse.manager.xmlrpc.iss.HubHandler.migrateFromISSv2', '/manager/api/sync/hub/migrateFromISSv2', 'POST', 'A', True)
4132+
ON CONFLICT (endpoint, http_method) DO NOTHING;
4133+
INSERT INTO access.endpoint (class_method, endpoint, http_method, scope, auth_required)
4134+
VALUES ('com.suse.manager.xmlrpc.iss.HubHandler.removePeripheralChannelsToSync', '/manager/api/sync/hub/removePeripheralChannelsToSync', 'POST', 'A', True)
4135+
ON CONFLICT (endpoint, http_method) DO NOTHING;
4136+
INSERT INTO access.endpoint (class_method, endpoint, http_method, scope, auth_required)
4137+
VALUES ('com.suse.manager.xmlrpc.iss.HubHandler.addPeripheralChannelsToSync', '/manager/api/sync/hub/addPeripheralChannelsToSync', 'POST', 'A', True)
4138+
ON CONFLICT (endpoint, http_method) DO NOTHING;
4139+
INSERT INTO access.endpoint (class_method, endpoint, http_method, scope, auth_required)
4140+
VALUES ('com.suse.manager.xmlrpc.iss.HubHandler.regenerateSCCCredentials', '/manager/api/sync/hub/regenerateSCCCredentials', 'POST', 'A', True)
4141+
ON CONFLICT (endpoint, http_method) DO NOTHING;
4142+
INSERT INTO access.endpoint (class_method, endpoint, http_method, scope, auth_required)
4143+
VALUES ('com.suse.manager.xmlrpc.iss.HubHandler.listPeripheralChannelsToSync', '/manager/api/sync/hub/listPeripheralChannelsToSync', 'GET', 'A', True)
4144+
ON CONFLICT (endpoint, http_method) DO NOTHING;
4145+
4146+
40084147
INSERT INTO access.endpoint (class_method, endpoint, http_method, scope, auth_required)
40094148
VALUES ('com.redhat.rhn.frontend.xmlrpc.image.ImageInfoHandler.addImageFile', '/manager/api/image/addImageFile', 'POST', 'A', True)
40104149
ON CONFLICT (endpoint, http_method) DO NOTHING;

0 commit comments

Comments
 (0)