summaryrefslogtreecommitdiffstats
path: root/moonclient/moonclient/tests/tests_subject_assignments.json
blob: 7eb1e82c5aa5f54b15ae270754c55b02739da872 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
{
  "command_options": "-f value",
  "tests_group": {
    "authz": [
      {
        "name": "list tenant",
        "command": "tenant list",
        "result": "(?!alt_demo)",
        "description": "Check if tenant alt_demo is used."
      },
      {
        "name": "add tenant alt_demo",
        "command": "tenant add alt_demo",
        "result": "^$",
        "description": "Add a new tenant",
        "command_options": ""
      },
      {
        "name": "check tenant alt_demo",
        "command": "tenant list",
        "result": "(?P<uuid>\\w+)\\s+alt_demo",
        "description": "Check that tenant alt_demo has been correctly added"
      },
      {
        "name": "create_intraextension_authz",
        "command": "intraextension add --policy_model policy_authz authz_test",
        "result": "IntraExtension created: (?P<uuid_authz>\\w+)",
        "description": "Create an authz intra extension",
        "command_options": ""
      },
      {
        "name": "list_intraextension_authz",
        "command": "intraextension list",
        "result": "$uuid_authz",
        "description": "Check the existence of that authz intra extension"
      },
      {
        "name": "set_tenant_authz",
        "command": "tenant set --authz $uuid_authz $uuid",
        "result": "",
        "description": "Connect the authz intra extension to the tenant alt_demo",
        "command_options": ""
      },
      {
        "name": "select_authz_ie",
        "command": "intraextension select $uuid_authz",
        "result": "Select $uuid_authz IntraExtension.",
        "description": "Select the authz IntraExtension",
        "command_options": ""
      },
      {
        "name": "check_select_authz_ie",
        "command": "intraextension show selected",
        "result": "$uuid_authz",
        "description": "Check the selected authz IntraExtension",
        "command_options": "-c id -f value"
      },
      {
        "name": "add_subject",
        "command": "subject add alt_demo",
        "result": "",
        "description": "Add the new subject category alt_demo",
        "command_options": ""
      },
      {
        "name": "list_subject",
        "command": "subject list",
        "result": "(?P<uuid_subject>\\w+)\\s+alt_demo",
        "description": "Check that alt_demo subject was added."
      },
      {
        "name": "add_subject_category",
        "command": "subject category add my_new_subject_category",
        "result": "",
        "description": "Add the new subject category my_new_subject_category",
        "command_options": ""
      },
      {
        "name": "list_subject_category",
        "command": "subject category list",
        "result": "(?P<uuid_subject_category>\\w+)\\s+my_new_subject_category",
        "description": "Check that my_new_subject_category subject_category was added."
      },
      {
        "name": "add_scope",
        "command": "subject scope add $uuid_subject_category testers --description \"test engineers\"",
        "result": "^$",
        "description": "Add one scope to subject category role",
        "command_options": ""
      },
      {
        "name": "check_added_scope",
        "command": "subject scope list $uuid_subject_category",
        "result": "(?P<uuid_subject_scope>\\w+)\\s+testers\\s+test engineers",
        "description": "Check added scope.",
        "command_options": "-c id -c name -c description -f value"
      },

      {
        "name": "add_assignment",
        "command": "subject assignment add $uuid_subject $uuid_subject_category $uuid_subject_scope",
        "result": "^$",
        "description": "Add a new assignment",
        "command_options": ""
      },
      {
        "name": "check_added_assignment",
        "command": "subject assignment list $uuid_subject $uuid_subject_category",
        "result": "$uuid_subject_scope testers",
        "description": "Check added assignment.",
        "command_options": "-c id -c name -f value"
      },

      {
        "name": "delete_assignment",
        "command": "subject assignment delete $uuid_subject $uuid_subject_category $uuid_subject_scope",
        "result": "^$",
        "description": "Delete the added assignment",
        "command_options": ""
      },
      {
        "name": "check_deleted_assignment",
        "command": "subject assignment list $uuid_subject $uuid_subject_category",
        "result": "(?!$uuid_subject_scope)",
        "description": "Check deleted assignment.",
        "command_options": "-c id -f value"
      },

      {
        "name": "delete_scope",
        "command": "subject scope delete $uuid_subject_category $uuid_subject_scope",
        "result": "^$",
        "description": "Delete one scope from subject category role",
        "command_options": ""
      },
      {
        "name": "delete_subject_category",
        "command": "subject category delete $uuid_subject_category",
        "result": "^$",
        "description": "Delete my_new_subject_category subject_category.",
        "command_options": ""
      },
      {
        "name": "list_subject_category",
        "command": "subject category list",
        "result": "(?!$uuid_subject_category)",
        "description": "Check that my_new_subject_category subject_category was deleted."
      },
      {
        "name": "delete_authz_intra_extension",
        "command": "intraextension delete $uuid_authz",
        "result": "",
        "description": "Delete the authz intra extension",
        "command_options": ""
      },
      {
        "name": "delete_tenant",
        "command": "tenant delete $uuid",
        "result": "",
        "description": "Delete the tenant alt_demo",
        "command_options": ""
      }
    ],
    "authz_and_admin": [
      {
        "name": "list tenant",
        "command": "tenant list",
        "result": "(?!alt_demo)",
        "description": "Check if tenant alt_demo is used."
      },
      {
        "name": "add tenant alt_demo",
        "command": "tenant add alt_demo",
        "result": "^$",
        "description": "Add a new tenant",
        "command_options": ""
      },
      {
        "name": "check tenant alt_demo",
        "command": "tenant list",
        "result": "(?P<uuid>\\w+)\\s+alt_demo",
        "description": "Check that tenant alt_demo has been correctly added"
      },
      {
        "name": "create_intraextension_authz",
        "command": "intraextension add --policy_model policy_authz authz_test",
        "result": "IntraExtension created: (?P<uuid_authz>\\w+)",
        "description": "Create an authz intra extension",
        "command_options": ""
      },
      {
        "name": "list_intraextension_authz",
        "command": "intraextension list",
        "result": "$uuid_authz",
        "description": "Check the existence of that authz intra extension"
      },
      {
        "name": "create_intraextension_admin",
        "command": "intraextension add --policy_model policy_rbac_admin admin_test",
        "result": "IntraExtension created: (?P<uuid_admin>\\w+)",
        "description": "Create an admin intra extension",
        "command_options": ""
      },
      {
        "name": "list_intraextension_admin",
        "command": "intraextension list",
        "result": "$uuid_admin",
        "description": "Check the existence of that admin intra extension"
      },
      {
        "name": "set_tenant_authz",
        "command": "tenant set --authz $uuid_authz $uuid",
        "result": "",
        "description": "Connect the authz intra extension to the tenant demo",
        "command_options": ""
      },
      {
        "name": "set_tenant_admin",
        "command": "tenant set --admin $uuid_admin $uuid",
        "result": "",
        "description": "Connect the authz intra extension to the tenant alt_demo",
        "command_options": ""
      },
      {
        "name": "check tenant alt_demo and authz ie",
        "command": "tenant list",
        "result": "alt_demo $uuid_authz",
        "description": "Check that authz intra extension has been correctly added to the tenant.",
        "command_options": "-c name -c intra_authz_extension_id -f value"
      },
      {
        "name": "check tenant alt_demo and admin ie",
        "command": "tenant list",
        "result": "$uuid_admin",
        "description": "Check that admin intra extension has been correctly added to the tenant.",
        "command_options": "-c intra_admin_extension_id -f value"
      },
      {
        "name": "select_authz_ie",
        "command": "intraextension select $uuid_authz",
        "result": "Select $uuid_authz IntraExtension.",
        "description": "Select the authz IntraExtension",
        "command_options": ""
      },
      {
        "name": "check_select_authz_ie",
        "command": "intraextension show selected",
        "result": "$uuid_authz",
        "description": "Check the selected authz IntraExtension",
        "command_options": "-c id -f value"
      },
      {
        "name": "add_subject",
        "command": "subject add alt_demo",
        "result": "",
        "description": "Add the new subject category alt_demo",
        "command_options": ""
      },
      {
        "name": "list_subject",
        "command": "subject list",
        "result": "(?P<uuid_subject>\\w+)\\s+alt_demo",
        "description": "Check that alt_demo subject was added."
      },
      {
        "name": "add_subject_category",
        "command": "subject category add my_new_subject_category",
        "result": "",
        "description": "Add the new subject category my_new_subject_category",
        "command_options": ""
      },
      {
        "name": "list_subject_category",
        "command": "subject category list",
        "result": "(?P<uuid_subject_category>\\w+)\\s+my_new_subject_category",
        "description": "Check that my_new_subject_category subject_category was added."
      },
      {
        "name": "add_scope",
        "command": "subject scope add $uuid_subject_category testers --description \"test engineers\"",
        "result": "^$",
        "description": "Add one scope to subject category role",
        "command_options": ""
      },
      {
        "name": "check_added_scope",
        "command": "subject scope list $uuid_subject_category",
        "result": "(?P<uuid_subject_scope>\\w+)\\s+testers\\s+test engineers",
        "description": "Check added scope.",
        "command_options": "-c id -c name -c description -f value"
      },

      {
        "name": "add_assignment",
        "command": "subject assignment add $uuid_subject $uuid_subject_category $uuid_subject_scope",
        "result": "^$",
        "description": "Add a new assignment",
        "command_options": ""
      },
      {
        "name": "check_added_assignment",
        "command": "subject assignment list $uuid_subject $uuid_subject_category",
        "result": "$uuid_subject_scope testers",
        "description": "Check added assignment.",
        "command_options": "-c id -c name -f value"
      },

      {
        "name": "delete_assignment",
        "command": "subject assignment delete $uuid_subject $uuid_subject_category $uuid_subject_scope",
        "result": "^$",
        "description": "Delete the added assignment",
        "command_options": ""
      },
      {
        "name": "check_deleted_assignment",
        "command": "subject assignment list $uuid_subject $uuid_subject_category",
        "result": "(?!$uuid_subject_scope)",
        "description": "Check deleted assignment.",
        "command_options": "-c id -f value"
      },

      {
        "name": "delete_scope",
        "command": "subject scope delete $uuid_subject_category $uuid_subject_scope",
        "result": "^$",
        "description": "Delete one scope from subject category role",
        "command_options": ""
      },
      {
        "name": "delete_subject_category",
        "command": "subject category delete $uuid_subject_category",
        "result": "^$",
        "description": "Delete my_new_subject_category subject_category.",
        "command_options": ""
      },
      {
        "name": "list_subject_category",
        "command": "subject category list",
        "result": "(?!$uuid_subject_category)",
        "description": "Check that my_new_subject_category subject_category was deleted."
      },
      {
        "name": "delete_admin_intra_extension",
        "command": "intraextension delete $uuid_admin",
        "result": "",
        "description": "Delete the admin intra extension",
        "command_options": ""
      },
      {
        "name": "delete_authz_intra_extension",
        "command": "intraextension delete $uuid_authz",
        "result": "",
        "description": "Delete the authz intra extension",
        "command_options": ""
      },
      {
        "name": "delete_tenant",
        "command": "tenant delete $uuid",
        "result": "",
        "description": "Delete the tenant alt_demo",
        "command_options": ""
      }
    ]
  }
}