blob: d099990c057cc74e32401f349aa895c6b0fb6a43 [file] [log] [blame]
sg481n43854a92017-08-03 17:27:34 -04001set testid <pass>
2set testid@aaf.att.com <pass>
3set XX@NS <pass>
4set testunused <pass>
5set bogus boguspass
6#delay 10
7set NFR 0
8# TC_Perm1.10.0.POS Validate Namespace is empty first
9as testid@aaf.att.com
10ns list name com.test.TC_Perm1.@[user.name]
11** Expect 200 **
12
13List Namespaces by Name[com.test.TC_Perm1.@[THE_USER]]
14--------------------------------------------------------------------------------
15 *** Namespace Not Found ***
16
17# TC_Perm1.10.1.POS Create Namespace with valid IDs and Responsible Parties
18ns create com.test.TC_Perm1.@[user.name] @[user.name] testid@aaf.att.com
19** Expect 201 **
20Created Namespace
21
22# TC_Perm1.10.10.POS Create role to assign mechid perm to
23role create com.test.TC_Perm1.@[user.name].cred_admin
24** Expect 201 **
25Created Role
26
27as XX@NS
28# TC_Perm1.10.11.POS Assign role to mechid perm
29perm grant com.att.aaf.mechid com.att create com.test.TC_Perm1.@[user.name].cred_admin
30** Expect 201 **
31Granted Permission [com.att.aaf.mechid|com.att|create] to Role [com.test.TC_Perm1.@[THE_USER].cred_admin]
32
33as testid@aaf.att.com
34# TC_Perm1.10.12.POS Assign user for creating creds
35user role add XX@NS com.test.TC_Perm1.@[user.name].cred_admin
36** Expect 201 **
37Added Role [com.test.TC_Perm1.@[THE_USER].cred_admin] to User [XX@NS]
38
39# TC_Perm1.20.1.POS List Data on non-Empty NS
40ns list name com.test.TC_Perm1.@[user.name]
41** Expect 200 **
42
43List Namespaces by Name[com.test.TC_Perm1.@[THE_USER]]
44--------------------------------------------------------------------------------
45com.test.TC_Perm1.@[THE_USER]
46 Administrators
47 testid@aaf.att.com
48 Responsible Parties
49 @[THE_USER]@csp.att.com
50 Roles
51 com.test.TC_Perm1.@[THE_USER].admin
52 com.test.TC_Perm1.@[THE_USER].cred_admin
53 com.test.TC_Perm1.@[THE_USER].owner
54 Permissions
55 com.test.TC_Perm1.@[THE_USER].access * *
56 com.test.TC_Perm1.@[THE_USER].access * read
57
58# TC_Perm1.20.2.POS Add Perm
59perm create com.test.TC_Perm1.@[user.name].p.A myInstance myAction
60** Expect 201 **
61Created Permission
62
63# TC_Perm1.20.3.NEG Already Added Perm
64perm create com.test.TC_Perm1.@[user.name].p.A myInstance myAction
65** Expect 409 **
66Failed [SVC1409]: Conflict Already Exists - Permission [com.test.TC_Perm1.@[THE_USER].p.A|myInstance|myAction] already exists.
67
68# TC_Perm1.20.4.POS Add Perm with non-existent Roles as well
69force perm create com.test.TC_Perm1.@[user.name].p.B myInstance myAction com.test.TC_Perm1.@[user.name].r.A,com.test.TC_Perm1.@[user.name].r.B
70** Expect 201 **
71Created Role [com.test.TC_Perm1.@[THE_USER].r.A]
72Created Role [com.test.TC_Perm1.@[THE_USER].r.B]
73Created Permission
74Granted Permission [com.test.TC_Perm1.@[THE_USER].p.B|myInstance|myAction] to Role [com.test.TC_Perm1.@[THE_USER].r.A]
75Granted Permission [com.test.TC_Perm1.@[THE_USER].p.B|myInstance|myAction] to Role [com.test.TC_Perm1.@[THE_USER].r.B]
76
77# TC_Perm1.20.8.POS Print Info for Validation
78ns list name com.test.TC_Perm1.@[user.name]
79** Expect 200 **
80
81List Namespaces by Name[com.test.TC_Perm1.@[THE_USER]]
82--------------------------------------------------------------------------------
83com.test.TC_Perm1.@[THE_USER]
84 Administrators
85 testid@aaf.att.com
86 Responsible Parties
87 @[THE_USER]@csp.att.com
88 Roles
89 com.test.TC_Perm1.@[THE_USER].admin
90 com.test.TC_Perm1.@[THE_USER].cred_admin
91 com.test.TC_Perm1.@[THE_USER].owner
92 com.test.TC_Perm1.@[THE_USER].r.A
93 com.test.TC_Perm1.@[THE_USER].r.B
94 Permissions
95 com.test.TC_Perm1.@[THE_USER].access * *
96 com.test.TC_Perm1.@[THE_USER].access * read
97 com.test.TC_Perm1.@[THE_USER].p.A myInstance myAction
98 com.test.TC_Perm1.@[THE_USER].p.B myInstance myAction
99
100# TC_Perm1.20.9.NEG Already Added Perm with some Roles as well
101perm create com.test.TC_Perm1.@[user.name].p.B myInstance myAction com.test.TC_Perm1.@[user.name].r.A,com.test.TC_Perm1.@[user.name].r.B
102** Expect 409 **
103Failed [SVC1409]: Conflict Already Exists - Permission [com.test.TC_Perm1.@[THE_USER].p.B|myInstance|myAction] already exists.
104
105# TC_Perm1.20.10.NEG Non-admins can't change description
106as testunused
107perm describe com.test.TC_Perm1.@[user.name].p.A myInstance myAction Description for A
108** Expect 403 **
109Failed [SVC1403]: Forbidden - You do not have approval to change Permission [com.test.TC_Perm1.@[THE_USER].p.A|myInstance|myAction]
110
111# TC_Perm1.20.11.NEG Permission must exist to change description
112as testid
113perm describe com.test.TC_Perm1.@[user.name].p.C myInstance myAction Description for C
114** Expect 404 **
115Failed [SVC1404]: Not Found - Permission [com.test.TC_Perm1.@[THE_USER].p.C|myInstance|myAction] does not exist
116
117# TC_Perm1.20.12.POS Admin can change description
118perm describe com.test.TC_Perm1.@[user.name].p.A myInstance myAction Description for A
119** Expect 200 **
120Description added to Permission
121
122# TC_Perm1.22.1.NEG Try to rename permission without changing anything
123perm rename com.test.TC_Perm1.@[user.name].p.B myInstance myAction com.test.TC_Perm1.@[user.name].p.B myInstance myAction
124** Expect 409 **
125Failed [SVC1409]: Conflict Already Exists - New Permission must be different than original permission
126
127# TC_Perm1.22.2.NEG Try to rename parent ns
128perm rename com.test.TC_Perm1.@[user.name].p.B myInstance myAction com.att.TC_Perm1.@[user.name].p.C myInstance myAction
129** Expect 403 **
130Failed [SVC1403]: Forbidden - You do not have approval to change Permission [com.att.TC_Perm1.@[THE_USER].p.C|myInstance|myAction]
131
132# TC_Perm1.22.10.POS View permission in original state
133ns list name com.test.TC_Perm1.@[user.name]
134** Expect 200 **
135
136List Namespaces by Name[com.test.TC_Perm1.@[THE_USER]]
137--------------------------------------------------------------------------------
138com.test.TC_Perm1.@[THE_USER]
139 Administrators
140 testid@aaf.att.com
141 Responsible Parties
142 @[THE_USER]@csp.att.com
143 Roles
144 com.test.TC_Perm1.@[THE_USER].admin
145 com.test.TC_Perm1.@[THE_USER].cred_admin
146 com.test.TC_Perm1.@[THE_USER].owner
147 com.test.TC_Perm1.@[THE_USER].r.A
148 com.test.TC_Perm1.@[THE_USER].r.B
149 Permissions
150 com.test.TC_Perm1.@[THE_USER].access * *
151 com.test.TC_Perm1.@[THE_USER].access * read
152 com.test.TC_Perm1.@[THE_USER].p.A myInstance myAction
153 com.test.TC_Perm1.@[THE_USER].p.B myInstance myAction
154
155# TC_Perm1.22.11.POS Rename permission instance
156perm rename com.test.TC_Perm1.@[user.name].p.B myInstance myAction com.test.TC_Perm1.@[user.name].p.B yourInstance myAction
157** Expect 200 **
158Updated Permission
159
160# TC_Perm1.22.12.POS Verify change in permission instance
161ns list name com.test.TC_Perm1.@[user.name]
162** Expect 200 **
163
164List Namespaces by Name[com.test.TC_Perm1.@[THE_USER]]
165--------------------------------------------------------------------------------
166com.test.TC_Perm1.@[THE_USER]
167 Administrators
168 testid@aaf.att.com
169 Responsible Parties
170 @[THE_USER]@csp.att.com
171 Roles
172 com.test.TC_Perm1.@[THE_USER].admin
173 com.test.TC_Perm1.@[THE_USER].cred_admin
174 com.test.TC_Perm1.@[THE_USER].owner
175 com.test.TC_Perm1.@[THE_USER].r.A
176 com.test.TC_Perm1.@[THE_USER].r.B
177 Permissions
178 com.test.TC_Perm1.@[THE_USER].access * *
179 com.test.TC_Perm1.@[THE_USER].access * read
180 com.test.TC_Perm1.@[THE_USER].p.A myInstance myAction
181 com.test.TC_Perm1.@[THE_USER].p.B yourInstance myAction
182
183# TC_Perm1.22.13.POS Rename permission action
184perm rename com.test.TC_Perm1.@[user.name].p.B yourInstance myAction com.test.TC_Perm1.@[user.name].p.B yourInstance yourAction
185** Expect 200 **
186Updated Permission
187
188# TC_Perm1.22.14.POS Verify change in permission action
189ns list name com.test.TC_Perm1.@[user.name]
190** Expect 200 **
191
192List Namespaces by Name[com.test.TC_Perm1.@[THE_USER]]
193--------------------------------------------------------------------------------
194com.test.TC_Perm1.@[THE_USER]
195 Administrators
196 testid@aaf.att.com
197 Responsible Parties
198 @[THE_USER]@csp.att.com
199 Roles
200 com.test.TC_Perm1.@[THE_USER].admin
201 com.test.TC_Perm1.@[THE_USER].cred_admin
202 com.test.TC_Perm1.@[THE_USER].owner
203 com.test.TC_Perm1.@[THE_USER].r.A
204 com.test.TC_Perm1.@[THE_USER].r.B
205 Permissions
206 com.test.TC_Perm1.@[THE_USER].access * *
207 com.test.TC_Perm1.@[THE_USER].access * read
208 com.test.TC_Perm1.@[THE_USER].p.A myInstance myAction
209 com.test.TC_Perm1.@[THE_USER].p.B yourInstance yourAction
210
211# TC_Perm1.22.15.POS Rename permission type
212perm rename com.test.TC_Perm1.@[user.name].p.B yourInstance yourAction com.test.TC_Perm1.@[user.name].p.yourB yourInstance yourAction
213** Expect 200 **
214Updated Permission
215
216# TC_Perm1.22.16.POS Verify change in permission type
217ns list name com.test.TC_Perm1.@[user.name]
218** Expect 200 **
219
220List Namespaces by Name[com.test.TC_Perm1.@[THE_USER]]
221--------------------------------------------------------------------------------
222com.test.TC_Perm1.@[THE_USER]
223 Administrators
224 testid@aaf.att.com
225 Responsible Parties
226 @[THE_USER]@csp.att.com
227 Roles
228 com.test.TC_Perm1.@[THE_USER].admin
229 com.test.TC_Perm1.@[THE_USER].cred_admin
230 com.test.TC_Perm1.@[THE_USER].owner
231 com.test.TC_Perm1.@[THE_USER].r.A
232 com.test.TC_Perm1.@[THE_USER].r.B
233 Permissions
234 com.test.TC_Perm1.@[THE_USER].access * *
235 com.test.TC_Perm1.@[THE_USER].access * read
236 com.test.TC_Perm1.@[THE_USER].p.A myInstance myAction
237 com.test.TC_Perm1.@[THE_USER].p.yourB yourInstance yourAction
238
239# TC_Perm1.22.20.POS See permission is attached to this role
240role list role com.test.TC_Perm1.@[user.name].r.A
241** Expect 200 **
242
243List Roles for Role[com.test.TC_Perm1.@[THE_USER].r.A]
244--------------------------------------------------------------------------------
245ROLE Name
246 PERM Type Instance Action
247--------------------------------------------------------------------------------
248com.test.TC_Perm1.@[THE_USER].r.A
249 com.test.TC_Perm1.@[THE_USER].p.yourB yourInstance yourAction
250
251# TC_Perm1.22.21.POS Rename permission type, instance and action
252perm rename com.test.TC_Perm1.@[user.name].p.yourB yourInstance yourAction com.test.TC_Perm1.@[user.name].p.B myInstance myAction
253** Expect 200 **
254Updated Permission
255
256# TC_Perm1.22.22.POS See permission stays attached after rename
257role list role com.test.TC_Perm1.@[user.name].r.A
258** Expect 200 **
259
260List Roles for Role[com.test.TC_Perm1.@[THE_USER].r.A]
261--------------------------------------------------------------------------------
262ROLE Name
263 PERM Type Instance Action
264--------------------------------------------------------------------------------
265com.test.TC_Perm1.@[THE_USER].r.A
266 com.test.TC_Perm1.@[THE_USER].p.B myInstance myAction
267
268# TC_Perm1.22.23.POS Verify permission is back to original state
269ns list name com.test.TC_Perm1.@[user.name]
270** Expect 200 **
271
272List Namespaces by Name[com.test.TC_Perm1.@[THE_USER]]
273--------------------------------------------------------------------------------
274com.test.TC_Perm1.@[THE_USER]
275 Administrators
276 testid@aaf.att.com
277 Responsible Parties
278 @[THE_USER]@csp.att.com
279 Roles
280 com.test.TC_Perm1.@[THE_USER].admin
281 com.test.TC_Perm1.@[THE_USER].cred_admin
282 com.test.TC_Perm1.@[THE_USER].owner
283 com.test.TC_Perm1.@[THE_USER].r.A
284 com.test.TC_Perm1.@[THE_USER].r.B
285 Permissions
286 com.test.TC_Perm1.@[THE_USER].access * *
287 com.test.TC_Perm1.@[THE_USER].access * read
288 com.test.TC_Perm1.@[THE_USER].p.A myInstance myAction
289 com.test.TC_Perm1.@[THE_USER].p.B myInstance myAction
290
291# TC_Perm1.25.1.POS Create another Role in This namespace
292role create com.test.TC_Perm1.@[user.name].r.C
293** Expect 201 **
294Created Role
295
296# TC_Perm1.25.2.POS Create another Perm in This namespace
297perm create com.test.TC_Perm1.@[user.name].p.C myInstance myAction
298** Expect 201 **
299Created Permission
300
301# TC_Perm1.25.3.NEG Permission must Exist to Add to Role
302perm grant com.test.TC_Perm1.@[user.name].p.NO myInstance myAction com.test.TC_Perm1.@[user.name].r.C
303** Expect 404 **
304Failed [SVC4404]: Not Found - Permission [com.test.TC_Perm1.@[THE_USER].p.NO|myInstance|myAction] does not exist
305
306# TC_Perm1.25.4.POS Grant individual new Perm to new Role
307perm grant com.test.TC_Perm1.@[user.name].p.C myInstance myAction com.test.TC_Perm1.@[user.name].r.C
308** Expect 201 **
309Granted Permission [com.test.TC_Perm1.@[THE_USER].p.C|myInstance|myAction] to Role [com.test.TC_Perm1.@[THE_USER].r.C]
310
311# TC_Perm1.25.5.NEG Already Granted Perm
312perm grant com.test.TC_Perm1.@[user.name].p.C myInstance myAction com.test.TC_Perm1.@[user.name].r.C
313** Expect 409 **
314Failed [SVC1409]: Conflict Already Exists - Permission [com.test.TC_Perm1.@[THE_USER].p.C|myInstance|myAction] already granted to Role [com.test.TC_Perm1.@[THE_USER].r.C]
315
316# TC_Perm1.25.6.POS Print Info for Validation
317ns list name com.test.TC_Perm1.@[user.name]
318** Expect 200 **
319
320List Namespaces by Name[com.test.TC_Perm1.@[THE_USER]]
321--------------------------------------------------------------------------------
322com.test.TC_Perm1.@[THE_USER]
323 Administrators
324 testid@aaf.att.com
325 Responsible Parties
326 @[THE_USER]@csp.att.com
327 Roles
328 com.test.TC_Perm1.@[THE_USER].admin
329 com.test.TC_Perm1.@[THE_USER].cred_admin
330 com.test.TC_Perm1.@[THE_USER].owner
331 com.test.TC_Perm1.@[THE_USER].r.A
332 com.test.TC_Perm1.@[THE_USER].r.B
333 com.test.TC_Perm1.@[THE_USER].r.C
334 Permissions
335 com.test.TC_Perm1.@[THE_USER].access * *
336 com.test.TC_Perm1.@[THE_USER].access * read
337 com.test.TC_Perm1.@[THE_USER].p.A myInstance myAction
338 com.test.TC_Perm1.@[THE_USER].p.B myInstance myAction
339 com.test.TC_Perm1.@[THE_USER].p.C myInstance myAction
340
341# TC_Perm1.25.10.POS UnGrant individual new Perm to new Role
342perm ungrant com.test.TC_Perm1.@[user.name].p.C myInstance myAction com.test.TC_Perm1.@[user.name].r.C
343** Expect 200 **
344UnGranted Permission [com.test.TC_Perm1.@[THE_USER].p.C|myInstance|myAction] from Role [com.test.TC_Perm1.@[THE_USER].r.C]
345
346# TC_Perm1.25.11.NEG Already UnGranted Perm
347perm ungrant com.test.TC_Perm1.@[user.name].p.C myInstance myAction com.test.TC_Perm1.@[user.name].r.C
348** Expect 404 **
349Failed [SVC4404]: Not Found - Permission [com.test.TC_Perm1.@[THE_USER].p.C|myInstance|myAction] not associated with any Role
350
351# TC_Perm1.25.20.POS Reset roles attached to permision with setTo
352perm setTo com.test.TC_Perm1.@[user.name].p.C myInstance myAction com.test.TC_Perm1.@[user.name].r.C,com.test.TC_Perm1.@[user.name].r.A
353** Expect 200 **
354Set Permission's Roles to [com.test.TC_Perm1.@[THE_USER].r.C,com.test.TC_Perm1.@[THE_USER].r.A]
355
356# TC_Perm1.25.21.POS Owner of permission can reset roles
357perm setTo com.test.TC_Perm1.@[user.name].p.C myInstance myAction
358** Expect 200 **
359Set Permission's Roles to []
360
361# TC_Perm1.26.1.POS Create another Namespace, not owned by testid, one in company, one not
362as XX@NS
363ns create com.test2.TC_Perm1.@[user.name] @[user.name] XX@NS
364** Expect 201 **
365Created Namespace
366
367ns create com.test.TC_Perm1.@[user.name]_2 @[user.name] XX@NS
368** Expect 201 **
369Created Namespace
370
371# TC_Perm1.26.2.POS Create ID in other Namespace
372user cred add m99990@@[user.name].TC_Perm1.test2.com aRealPass7
373** Expect 201 **
374Added Credential [m99990@@[THE_USER].TC_Perm1.test2.com]
375
376# TC_Perm1.26.3.POS Create a Role in other Namespaces, not owned by testid
377role create com.test2.TC_Perm1.@[user.name].r.C
378** Expect 201 **
379Created Role
380
381role create com.test2.TC_Perm1.@[user.name]_2.r.C
382** Expect 201 **
383Created Role
384
385# TC_Perm1.26.11.NEG Grant Perm to Role in Other Namespace, when Role ID
386as m99990@@[THE_USER].TC_Perm1.test2.com
387perm grant com.test.TC_Perm1.@[user.name].p.C myInstance myAction com.test2.TC_Perm1.@[user.name].r.C
388** Expect 403 **
389Failed [SVC1403]: Forbidden - [m99990@@[THE_USER].TC_Perm1.test2.com] may not write Perm [com.test.TC_Perm1.@[THE_USER].p.C|myInstance|myAction]
390
391# TC_Perm1.26.11a.NEG Grant Perm to Role in Other Namespace, when Role ID
392as m99990@@[THE_USER].TC_Perm1.test2.com
393set request true
394perm grant com.test.TC_Perm1.@[user.name].p.C myInstance myAction com.test2.TC_Perm1.@[user.name].r.C
395** Expect 202 **
396Permission Role Granted Accepted, but requires Approvals before actualizing
397
398# TC_Perm1.26.12.NEG Grant Perm to Role in Other Namespace, when Perm ID, but different Company
399as testid@aaf.att.com
400perm grant com.test.TC_Perm1.@[user.name].p.C myInstance myAction com.test2.TC_Perm1.@[user.name].r.C
401** Expect 403 **
402Failed [SVC1403]: Forbidden - [testid@aaf.att.com] may not write Role [com.test2.TC_Perm1.@[THE_USER].r.C]
403
404# TC_Perm1.26.13.NEG Fail Grant Perm to Role in Other Namespace, when Perm ID, but same Company
405as testid@aaf.att.com
406perm grant com.test.TC_Perm1.@[user.name].p.C myInstance myAction com.test.TC_Perm1.@[user.name]_2.r.C
407** Expect 404 **
408Failed [SVC3404]: Not Found - Role [com.test.TC_Perm1.@[THE_USER]_2.r.C] does not exist
409
410# TC_Perm1.26.14.POS Create Role
411as testid@aaf.att.com
412role create com.test.TC_Perm1.@[user.name]_2.r.C
413** Expect 201 **
414Created Role
415
416# TC_Perm1.26.15.POS Fail Create/Grant Perm to Role in Other Namespace, when Perm ID, but same Company
417perm grant com.test.TC_Perm1.@[user.name].p.C myInstance myAction com.test.TC_Perm1.@[user.name]_2.r.C
418** Expect 201 **
419Granted Permission [com.test.TC_Perm1.@[THE_USER].p.C|myInstance|myAction] to Role [com.test.TC_Perm1.@[THE_USER]_2.r.C]
420
421# TC_Perm1.26.16.POS Print Info for Validation
422ns list name com.test.TC_Perm1.@[user.name]
423** Expect 200 **
424
425List Namespaces by Name[com.test.TC_Perm1.@[THE_USER]]
426--------------------------------------------------------------------------------
427com.test.TC_Perm1.@[THE_USER]
428 Administrators
429 testid@aaf.att.com
430 Responsible Parties
431 @[THE_USER]@csp.att.com
432 Roles
433 com.test.TC_Perm1.@[THE_USER].admin
434 com.test.TC_Perm1.@[THE_USER].cred_admin
435 com.test.TC_Perm1.@[THE_USER].owner
436 com.test.TC_Perm1.@[THE_USER].r.A
437 com.test.TC_Perm1.@[THE_USER].r.B
438 com.test.TC_Perm1.@[THE_USER].r.C
439 Permissions
440 com.test.TC_Perm1.@[THE_USER].access * *
441 com.test.TC_Perm1.@[THE_USER].access * read
442 com.test.TC_Perm1.@[THE_USER].p.A myInstance myAction
443 com.test.TC_Perm1.@[THE_USER].p.B myInstance myAction
444 com.test.TC_Perm1.@[THE_USER].p.C myInstance myAction
445
446# TC_Perm1.26.17.POS Grant individual new Perm to new Role
447perm grant com.test.TC_Perm1.@[user.name].p.C myInstance myAction com.test.TC_Perm1.@[user.name].r.C
448** Expect 201 **
449Granted Permission [com.test.TC_Perm1.@[THE_USER].p.C|myInstance|myAction] to Role [com.test.TC_Perm1.@[THE_USER].r.C]
450
451# TC_Perm1.26.18.NEG Already Granted Perm
452perm grant com.test.TC_Perm1.@[user.name].p.C myInstance myAction com.test.TC_Perm1.@[user.name].r.C
453** Expect 409 **
454Failed [SVC1409]: Conflict Already Exists - Permission [com.test.TC_Perm1.@[THE_USER].p.C|myInstance|myAction] already granted to Role [com.test.TC_Perm1.@[THE_USER].r.C]
455
456# TC_Perm1.26.19.POS UnGrant Perm from Role in Other Namespace, when Perm ID
457perm ungrant com.test.TC_Perm1.@[user.name].p.C myInstance myAction com.test.TC_Perm1.@[user.name]_2.r.C
458** Expect 200 **
459UnGranted Permission [com.test.TC_Perm1.@[THE_USER].p.C|myInstance|myAction] from Role [com.test.TC_Perm1.@[THE_USER]_2.r.C]
460
461# TC_Perm1.26.21.NEG No Permission to Grant Perm to Role with Unrelated ID
462as m99990@@[THE_USER].TC_Perm1.test2.com
463perm grant com.test.TC_Perm1.@[user.name].p.C myInstance myAction com.test2.TC_Perm1.@[user.name].r.C
464** Expect 403 **
465Failed [SVC1403]: Forbidden - [m99990@@[THE_USER].TC_Perm1.test2.com] may not write Perm [com.test.TC_Perm1.@[THE_USER].p.C|myInstance|myAction]
466
467# TC_Perm1.26.22.NEG No Permission to Grant Perm to Role with Unrelated ID
468set request true
469as m99990@@[THE_USER].TC_Perm1.test2.com
470perm grant com.test.TC_Perm1.@[user.name].p.C myInstance myAction com.test2.TC_Perm1.@[user.name].r.C
471** Expect 202 **
472Permission Role Granted Accepted, but requires Approvals before actualizing
473
474# TC_Perm1.26.25.NEG No Permission to UnGrant with Unrelated ID
475perm grant com.test.TC_Perm1.@[user.name].p.C myInstance myAction com.test.TC_Perm1.@[user.name].r.B
476** Expect 403 **
477Failed [SVC1403]: Forbidden - [m99990@@[THE_USER].TC_Perm1.test2.com] may not write Perm [com.test.TC_Perm1.@[THE_USER].p.C|myInstance|myAction]
478
479# TC_Perm1.26.26.NEG No Permission to UnGrant with Unrelated ID
480set request true
481perm grant com.test.TC_Perm1.@[user.name].p.C myInstance myAction com.test.TC_Perm1.@[user.name].r.B
482** Expect 202 **
483Permission Role Granted Accepted, but requires Approvals before actualizing
484
485# TC_Perm1.26.30.POS Add ID to Role
486as XX@NS
487ns admin add com.test2.TC_Perm1.@[user.name] m99990@@[user.name].TC_Perm1.test2.com
488** Expect 201 **
489Admin m99990@@[THE_USER].TC_Perm1.test2.com added to com.test2.TC_Perm1.@[THE_USER]
490
491as m99990@@[THE_USER].TC_Perm1.test2.com
492sleep 0
493# TC_Perm1.26.31.NEG No Permission Grant Perm to Role if not Perm Owner
494perm grant com.test.TC_Perm1.@[user.name].p.C myInstance myAction com.test2.TC_Perm1.@[user.name].r.C
495** Expect 403 **
496Failed [SVC1403]: Forbidden - [m99990@@[THE_USER].TC_Perm1.test2.com] may not write Perm [com.test.TC_Perm1.@[THE_USER].p.C|myInstance|myAction]
497
498# TC_Perm1.26.31.NEG No Permission Grant Perm to Role if not Perm Owner
499set request true
500perm grant com.test.TC_Perm1.@[user.name].p.C myInstance myAction com.test2.TC_Perm1.@[user.name].r.C
501** Expect 202 **
502Permission Role Granted Accepted, but requires Approvals before actualizing
503
504# TC_Perm1.26.32.POS Grant individual new Perm to Role in Other Namespace
505as testid@aaf.att.com
506perm grant com.test.TC_Perm1.@[user.name].p.C myInstance myAction com.test.TC_Perm1.@[user.name]_2.r.C
507** Expect 201 **
508Granted Permission [com.test.TC_Perm1.@[THE_USER].p.C|myInstance|myAction] to Role [com.test.TC_Perm1.@[THE_USER]_2.r.C]
509
510# TC_Perm1.26.34.POS Print Info for Validation
511ns list name com.test.TC_Perm1.@[user.name]
512** Expect 200 **
513
514List Namespaces by Name[com.test.TC_Perm1.@[THE_USER]]
515--------------------------------------------------------------------------------
516com.test.TC_Perm1.@[THE_USER]
517 Administrators
518 testid@aaf.att.com
519 Responsible Parties
520 @[THE_USER]@csp.att.com
521 Roles
522 com.test.TC_Perm1.@[THE_USER].admin
523 com.test.TC_Perm1.@[THE_USER].cred_admin
524 com.test.TC_Perm1.@[THE_USER].owner
525 com.test.TC_Perm1.@[THE_USER].r.A
526 com.test.TC_Perm1.@[THE_USER].r.B
527 com.test.TC_Perm1.@[THE_USER].r.C
528 Permissions
529 com.test.TC_Perm1.@[THE_USER].access * *
530 com.test.TC_Perm1.@[THE_USER].access * read
531 com.test.TC_Perm1.@[THE_USER].p.A myInstance myAction
532 com.test.TC_Perm1.@[THE_USER].p.B myInstance myAction
533 com.test.TC_Perm1.@[THE_USER].p.C myInstance myAction
534
535as XX@NS
536# TC_Perm1.26.35.POS Print Info for Validation
537ns list name com.test2.TC_Perm1.@[user.name]
538** Expect 200 **
539
540List Namespaces by Name[com.test2.TC_Perm1.@[THE_USER]]
541--------------------------------------------------------------------------------
542com.test2.TC_Perm1.@[THE_USER]
543 Administrators
544 XX@NS
545 m99990@@[THE_USER].TC_Perm1.test2.com
546 Responsible Parties
547 @[THE_USER]@csp.att.com
548 Roles
549 com.test2.TC_Perm1.@[THE_USER].admin
550 com.test2.TC_Perm1.@[THE_USER].owner
551 com.test2.TC_Perm1.@[THE_USER].r.C
552 Permissions
553 com.test2.TC_Perm1.@[THE_USER].access * *
554 com.test2.TC_Perm1.@[THE_USER].access * read
555 Credentials
556 m99990@@[THE_USER].TC_Perm1.test2.com
557
558as testid@aaf.att.com
559# TC_Perm1.26.36.POS UnGrant individual new Perm to new Role
560as testid@aaf.att.com
561perm ungrant com.test.TC_Perm1.@[user.name].p.C myInstance myAction com.test.TC_Perm1.@[user.name]_2.r.C
562** Expect 200 **
563UnGranted Permission [com.test.TC_Perm1.@[THE_USER].p.C|myInstance|myAction] from Role [com.test.TC_Perm1.@[THE_USER]_2.r.C]
564
565# TC_Perm1.26.37.NEG Already UnGranted Perm
566perm ungrant com.test.TC_Perm1.@[user.name].p.C myInstance myAction com.test.TC_Perm1.@[user.name]_2.r.C
567** Expect 404 **
568Failed [SVC4404]: Not Found - Permission [com.test.TC_Perm1.@[THE_USER].p.C|myInstance|myAction] not associated with any Role
569
570# TC_Perm1.26.40.POS Reset roles attached to permision with setTo
571perm setTo com.test.TC_Perm1.@[user.name].p.C myInstance myAction com.test.TC_Perm1.@[user.name].r.C,com.test.TC_Perm1.@[user.name].r.A
572** Expect 200 **
573Set Permission's Roles to [com.test.TC_Perm1.@[THE_USER].r.C,com.test.TC_Perm1.@[THE_USER].r.A]
574
575# TC_Perm1.26.41.NEG Non-owner of permission cannot reset roles
576as m99990@@[THE_USER].TC_Perm1.test2.com
577perm setTo com.test.TC_Perm1.@[user.name].p.C myInstance myAction
578** Expect 403 **
579Failed [SVC1403]: Forbidden - [m99990@@[THE_USER].TC_Perm1.test2.com] may not write Perm [com.test.TC_Perm1.@[THE_USER].p.C|myInstance|myAction]
580
581# TC_Perm1.26.42.NEG Non-owner of permission cannot ungrant
582perm ungrant com.test.TC_Perm1.@[user.name].p.C myInstance myAction com.test.TC_Perm1.@[user.name].r.C
583** Expect 403 **
584Failed [SVC1403]: Forbidden - [m99990@@[THE_USER].TC_Perm1.test2.com] may not write Perm [com.test.TC_Perm1.@[THE_USER].p.C|myInstance|myAction]
585
586# TC_Perm1.26.43.NEG Non-owner of permission cannot delete
587perm delete com.test.TC_Perm1.@[user.name].p.C myInstance myAction
588** Expect 403 **
589Failed [SVC1403]: Forbidden - [m99990@@[THE_USER].TC_Perm1.test2.com] may not write Perm [com.test.TC_Perm1.@[THE_USER].p.C|myInstance|myAction]
590
591# TC_Perm1.26.45.POS Owner of permission can reset roles
592as testid@aaf.att.com
593perm setTo com.test.TC_Perm1.@[user.name].p.C myInstance myAction
594** Expect 200 **
595Set Permission's Roles to []
596
597as XX@NS
598# TC_Perm1.26.97.POS List the Namespaces
599ns list name com.test.TC_Perm1.@[user.name]
600** Expect 200 **
601
602List Namespaces by Name[com.test.TC_Perm1.@[THE_USER]]
603--------------------------------------------------------------------------------
604com.test.TC_Perm1.@[THE_USER]
605 Administrators
606 testid@aaf.att.com
607 Responsible Parties
608 @[THE_USER]@csp.att.com
609 Roles
610 com.test.TC_Perm1.@[THE_USER].admin
611 com.test.TC_Perm1.@[THE_USER].cred_admin
612 com.test.TC_Perm1.@[THE_USER].owner
613 com.test.TC_Perm1.@[THE_USER].r.A
614 com.test.TC_Perm1.@[THE_USER].r.B
615 com.test.TC_Perm1.@[THE_USER].r.C
616 Permissions
617 com.test.TC_Perm1.@[THE_USER].access * *
618 com.test.TC_Perm1.@[THE_USER].access * read
619 com.test.TC_Perm1.@[THE_USER].p.A myInstance myAction
620 com.test.TC_Perm1.@[THE_USER].p.B myInstance myAction
621 com.test.TC_Perm1.@[THE_USER].p.C myInstance myAction
622
623ns list name com.test2.TC_Perm1.@[user.name]
624** Expect 200 **
625
626List Namespaces by Name[com.test2.TC_Perm1.@[THE_USER]]
627--------------------------------------------------------------------------------
628com.test2.TC_Perm1.@[THE_USER]
629 Administrators
630 XX@NS
631 m99990@@[THE_USER].TC_Perm1.test2.com
632 Responsible Parties
633 @[THE_USER]@csp.att.com
634 Roles
635 com.test2.TC_Perm1.@[THE_USER].admin
636 com.test2.TC_Perm1.@[THE_USER].owner
637 com.test2.TC_Perm1.@[THE_USER].r.C
638 Permissions
639 com.test2.TC_Perm1.@[THE_USER].access * *
640 com.test2.TC_Perm1.@[THE_USER].access * read
641 Credentials
642 m99990@@[THE_USER].TC_Perm1.test2.com
643
644as testid@aaf.att.com
645# TC_Perm1.26.98.POS Cleanup
646role delete com.test.TC_Perm1.@[user.name].r.A
647** Expect 200 **
648Deleted Role
649
650role delete com.test.TC_Perm1.@[user.name].r.B
651** Expect 200 **
652Deleted Role
653
654role delete com.test.TC_Perm1.@[user.name].r.C
655** Expect 200 **
656Deleted Role
657
658role delete com.test.TC_Perm1.@[user.name]_2.r.C
659** Expect 200 **
660Deleted Role
661
662as XX@NS
663role delete com.test2.TC_Perm1.@[user.name]_2.r.C
664** Expect 200 **
665Deleted Role
666
667role delete com.test2.TC_Perm1.@[user.name].r.C
668** Expect 200 **
669Deleted Role
670
671as testid@aaf.att.com
672perm delete com.test.TC_Perm1.@[user.name].p.A myInstance myAction
673** Expect 200 **
674Deleted Permission
675
676perm delete com.test.TC_Perm1.@[user.name].p.B myInstance myAction
677** Expect 200 **
678Deleted Permission
679
680perm delete com.test.TC_Perm1.@[user.name].p.C myInstance myAction
681** Expect 200 **
682Deleted Permission
683
684force ns delete com.test.TC_Perm1.@[user.name]_2
685** Expect 200 **
686Deleted Namespace
687
688as XX@NS
689set force true
690set force=true user cred del m99990@@[user.name].TC_Perm1.test2.com
691** Expect 200 **
692Deleted Credential [m99990@@[THE_USER].TC_Perm1.test2.com]
693
694ns delete com.test2.TC_Perm1.@[user.name]
695** Expect 200 **
696Deleted Namespace
697
698# TC_Perm1.26.99.POS List the Now Empty Namespaces
699ns list name com.test.TC_Perm1.@[user.name]
700** Expect 200 **
701
702List Namespaces by Name[com.test.TC_Perm1.@[THE_USER]]
703--------------------------------------------------------------------------------
704com.test.TC_Perm1.@[THE_USER]
705 Administrators
706 testid@aaf.att.com
707 Responsible Parties
708 @[THE_USER]@csp.att.com
709 Roles
710 com.test.TC_Perm1.@[THE_USER].admin
711 com.test.TC_Perm1.@[THE_USER].cred_admin
712 com.test.TC_Perm1.@[THE_USER].owner
713 Permissions
714 com.test.TC_Perm1.@[THE_USER].access * *
715 com.test.TC_Perm1.@[THE_USER].access * read
716
717ns list name com.test2.TC_Perm1.@[user.name]
718** Expect 200 **
719
720List Namespaces by Name[com.test2.TC_Perm1.@[THE_USER]]
721--------------------------------------------------------------------------------
722 *** Namespace Not Found ***
723
724# TC_Perm1.27.1.POS Create Permission
725perm create com.test.TC_Perm1.@[user.name].p.A myInstance myAction
726** Expect 201 **
727Created Permission
728
729# TC_Perm1.27.2.POS Create Role
730role create com.test.TC_Perm1.@[user.name].r.A
731** Expect 201 **
732Created Role
733
734# TC_Perm1.27.10.NEG Role must Exist to Add to Role without force
735perm grant com.test.TC_Perm1.@[user.name].p.A myInstance myAction com.test.TC_Perm1.@[user.name].r.unknown
736** Expect 404 **
737Failed [SVC3404]: Not Found - Role [com.test.TC_Perm1.@[THE_USER].r.unknown] does not exist
738
739# TC_Perm1.27.11.POS Role is created with force
740force perm create com.test.TC_Perm1.@[user.name].p.A myInstance myAction com.test.TC_Perm1.@[user.name].r.unknown
741** Expect 201 **
742Created Role [com.test.TC_Perm1.@[THE_USER].r.unknown]
743Created Permission
744Granted Permission [com.test.TC_Perm1.@[THE_USER].p.A|myInstance|myAction] to Role [com.test.TC_Perm1.@[THE_USER].r.unknown]
745
746# TC_Perm1.27.12.NEG Perm must Exist to Grant without force
747perm grant com.test.TC_Perm1.@[user.name].p.unknown myInstance myAction com.test.TC_Perm1.@[user.name].r.A
748** Expect 404 **
749Failed [SVC4404]: Not Found - Permission [com.test.TC_Perm1.@[THE_USER].p.unknown|myInstance|myAction] does not exist
750
751# TC_Perm1.27.13.POS Perm is created with force
752force perm grant com.test.TC_Perm1.@[user.name].p.unknown myInstance myAction com.test.TC_Perm1.@[user.name].r.A
753** Expect 201 **
754Granted Permission [com.test.TC_Perm1.@[THE_USER].p.unknown|myInstance|myAction] to Role [com.test.TC_Perm1.@[THE_USER].r.A]
755
756# TC_Perm1.27.14.POS Role and perm are created with force
757force perm create com.test.TC_Perm1.@[user.name].p.unknown2 myInstance myAction com.test.TC_Perm1.@[user.name].r.unknown2
758** Expect 201 **
759Created Role [com.test.TC_Perm1.@[THE_USER].r.unknown2]
760Created Permission
761Granted Permission [com.test.TC_Perm1.@[THE_USER].p.unknown2|myInstance|myAction] to Role [com.test.TC_Perm1.@[THE_USER].r.unknown2]
762
763# TC_Perm1.30.1.POS List Data on non-Empty NS
764as testid
765ns list name com.test.TC_Perm1.@[user.name]
766** Expect 200 **
767
768List Namespaces by Name[com.test.TC_Perm1.@[THE_USER]]
769--------------------------------------------------------------------------------
770com.test.TC_Perm1.@[THE_USER]
771 Administrators
772 testid@aaf.att.com
773 Responsible Parties
774 @[THE_USER]@csp.att.com
775 Roles
776 com.test.TC_Perm1.@[THE_USER].admin
777 com.test.TC_Perm1.@[THE_USER].cred_admin
778 com.test.TC_Perm1.@[THE_USER].owner
779 com.test.TC_Perm1.@[THE_USER].r.A
780 com.test.TC_Perm1.@[THE_USER].r.unknown
781 com.test.TC_Perm1.@[THE_USER].r.unknown2
782 Permissions
783 com.test.TC_Perm1.@[THE_USER].access * *
784 com.test.TC_Perm1.@[THE_USER].access * read
785 com.test.TC_Perm1.@[THE_USER].p.A myInstance myAction
786 com.test.TC_Perm1.@[THE_USER].p.unknown myInstance myAction
787 com.test.TC_Perm1.@[THE_USER].p.unknown2 myInstance myAction
788
789# TC_Perm1.30.2.POS Create Sub-ns when Roles that exist
790ns create com.test.TC_Perm1.@[user.name].r @[user.name] testid@aaf.att.com
791** Expect 201 **
792Created Namespace
793
794# TC_Perm1.30.3.POS List Data on NS with sub-roles
795ns list name com.test.TC_Perm1.@[user.name]
796** Expect 200 **
797
798List Namespaces by Name[com.test.TC_Perm1.@[THE_USER]]
799--------------------------------------------------------------------------------
800com.test.TC_Perm1.@[THE_USER]
801 Administrators
802 testid@aaf.att.com
803 Responsible Parties
804 @[THE_USER]@csp.att.com
805 Roles
806 com.test.TC_Perm1.@[THE_USER].admin
807 com.test.TC_Perm1.@[THE_USER].cred_admin
808 com.test.TC_Perm1.@[THE_USER].owner
809 Permissions
810 com.test.TC_Perm1.@[THE_USER].access * *
811 com.test.TC_Perm1.@[THE_USER].access * read
812 com.test.TC_Perm1.@[THE_USER].p.A myInstance myAction
813 com.test.TC_Perm1.@[THE_USER].p.unknown myInstance myAction
814 com.test.TC_Perm1.@[THE_USER].p.unknown2 myInstance myAction
815
816ns list name com.test.TC_Perm1.@[user.name].r
817** Expect 200 **
818
819List Namespaces by Name[com.test.TC_Perm1.@[THE_USER].r]
820--------------------------------------------------------------------------------
821com.test.TC_Perm1.@[THE_USER].r
822 Administrators
823 testid@aaf.att.com
824 Responsible Parties
825 @[THE_USER]@csp.att.com
826 Roles
827 com.test.TC_Perm1.@[THE_USER].r.A
828 com.test.TC_Perm1.@[THE_USER].r.admin
829 com.test.TC_Perm1.@[THE_USER].r.owner
830 com.test.TC_Perm1.@[THE_USER].r.unknown
831 com.test.TC_Perm1.@[THE_USER].r.unknown2
832 Permissions
833 com.test.TC_Perm1.@[THE_USER].r.access * *
834 com.test.TC_Perm1.@[THE_USER].r.access * read
835
836as XX@NS
837# TC_Perm1.99.1.POS Namespace Admin can delete Namepace defined Roles
838set force true
839set force=true perm delete com.test.TC_Perm1.@[user.name].p.A myInstance myAction
840** Expect 200,404 **
841Deleted Permission
842
843set force true
844set force=true perm delete com.test.TC_Perm1.@[user.name].p.B myInstance myAction
845** Expect 200,404 **
846Failed [SVC4404]: Not Found - Permission [com.test.TC_Perm1.@[THE_USER].p.B|myInstance|myAction] does not exist
847
848set force true
849set force=true perm delete com.test.TC_Perm1.@[user.name].p.C myInstance myAction
850** Expect 200,404 **
851Failed [SVC4404]: Not Found - Permission [com.test.TC_Perm1.@[THE_USER].p.C|myInstance|myAction] does not exist
852
853set force true
854set force=true perm delete com.test.TC_Perm1.@[user.name].p.unknown myInstance myAction
855** Expect 200,404 **
856Deleted Permission
857
858set force true
859set force=true perm delete com.test.TC_Perm1.@[user.name].p.unknown2 myInstance myAction
860** Expect 200,404 **
861Deleted Permission
862
863role delete com.test.TC_Perm1.@[user.name].r.A
864** Expect 200,404 **
865Deleted Role
866
867role delete com.test.TC_Perm1.@[user.name].r.B
868** Expect 200,404 **
869Failed [SVC3404]: Not Found - Role [com.test.TC_Perm1.@[THE_USER].r.B] does not exist
870
871role delete com.test.TC_Perm1.@[user.name].r.C
872** Expect 200,404 **
873Failed [SVC3404]: Not Found - Role [com.test.TC_Perm1.@[THE_USER].r.C] does not exist
874
875role delete com.test.TC_Perm1.@[user.name].r.unknown
876** Expect 200,404 **
877Deleted Role
878
879role delete com.test.TC_Perm1.@[user.name].r.unknown2
880** Expect 200,404 **
881Deleted Role
882
883role delete com.test2.TC_Perm1.@[user.name].r.C
884** Expect 200,404 **
885Failed [SVC3404]: Not Found - Role [com.test2.TC_Perm1.@[THE_USER].r.C] does not exist
886
887role delete com.test.TC_Perm1.@[user.name]_2.r.C
888** Expect 200,404 **
889Failed [SVC3404]: Not Found - Role [com.test.TC_Perm1.@[THE_USER]_2.r.C] does not exist
890
891role delete com.test2.TC_Perm1.@[user.name]_2.r.C
892** Expect 200,404 **
893Failed [SVC3404]: Not Found - Role [com.test2.TC_Perm1.@[THE_USER]_2.r.C] does not exist
894
895# TC_Perm1.99.2.POS Remove ability to create creds
896user role del XX@NS com.test.TC_Perm1.@[user.name].cred_admin
897** Expect 200,404 **
898Removed Role [com.test.TC_Perm1.@[THE_USER].cred_admin] from User [XX@NS]
899
900as XX@NS
901perm ungrant com.att.aaf.mechid com.att create com.test.TC_Perm1.@[user.name].cred_admin
902** Expect 200,404 **
903UnGranted Permission [com.att.aaf.mechid|com.att|create] from Role [com.test.TC_Perm1.@[THE_USER].cred_admin]
904
905as testid@aaf.att.com
906role delete com.test.TC_Perm1.@[user.name].cred_admin
907** Expect 200,404 **
908Deleted Role
909
910sleep 0
911as XX@NS
912# TC_Perm1.99.98.POS Namespace Admin can delete Namespace
913set force true
914set force=true ns delete com.test2.TC_Perm1.@[user.name]
915** Expect 200,404 **
916Failed [SVC2404]: Not Found - com.test2.TC_Perm1.@[THE_USER] does not exist
917
918as testid
919force ns delete com.test.TC_Perm1.@[user.name].r
920** Expect 200,404 **
921Deleted Namespace
922
923force ns delete com.test.TC_Perm1.@[user.name]_2
924** Expect 200,404 **
925Failed [SVC2404]: Not Found - com.test.TC_Perm1.@[THE_USER]_2 does not exist
926
927force ns delete com.test.TC_Perm1.@[user.name]
928** Expect 200,404 **
929Deleted Namespace
930
931force ns delete com.test2.TC_Perm1.@[user.name]
932** Expect 200,404 **
933Failed [SVC2404]: Not Found - com.test2.TC_Perm1.@[THE_USER] does not exist
934
935# TC_Perm1.99.99.POS List to prove removed
936ns list name com.test.TC_Perm1.@[user.name]
937** Expect 200,404 **
938
939List Namespaces by Name[com.test.TC_Perm1.@[THE_USER]]
940--------------------------------------------------------------------------------
941 *** Namespace Not Found ***
942
943ns list name com.test.TC_Perm1.@[user.name].r
944** Expect 200,404 **
945
946List Namespaces by Name[com.test.TC_Perm1.@[THE_USER].r]
947--------------------------------------------------------------------------------
948 *** Namespace Not Found ***
949
950ns list name com.test.TC_Perm1.@[user.name]_2
951** Expect 200,404 **
952
953List Namespaces by Name[com.test.TC_Perm1.@[THE_USER]_2]
954--------------------------------------------------------------------------------
955 *** Namespace Not Found ***
956
957ns list name com.test2.TC_Perm1.@[user.name]
958** Expect 200,404 **
959
960List Namespaces by Name[com.test2.TC_Perm1.@[THE_USER]]
961--------------------------------------------------------------------------------
962 *** Namespace Not Found ***
963