Upgrade to latest oparent
[aaf/authz.git] / authz-test / TestSuite / expected / TC_Role2.expected
1 set XX@NS <pass>
2 set testid@aaf.att.com <pass>
3 set testunused@aaf.att.com <pass>
4 set bogus boguspass
5 #delay 10
6 set NFR 0
7 as testid@aaf.att.com
8 # TC_Role2.10.0.POS Print NS to prove ok
9 ns list name com.test.TC_Role2.@[user.name] 
10 ** Expect 200 **
11
12 List Namespaces by Name[com.test.TC_Role2.@[THE_USER]]
13 --------------------------------------------------------------------------------
14     *** Namespace Not Found ***
15
16 # TC_Role2.10.1.POS Create Namespace with valid IDs and Responsible Parties
17 ns create com.test.TC_Role2.@[user.name] @[user.name] testid@aaf.att.com
18 ** Expect 201 **
19 Created Namespace
20
21 ##############
22 # Testing Model
23 # We are making a Testing model based loosely on George Orwell's Animal Farm
24 # In Animal Farm, Animals did all the work but didn't get any priviledges.
25 #   In our test, the animals can't see anything but their own role, etc
26 # Dogs were supervisors, and ostensibly did something, though mostly laid around
27 #   In our test, they have Implicit Permissions by being Admins
28 # Pigs were the Elite.  They did nothing, but watch everyone and eat the produce
29 #   In our test, they have Explicit Permissions to see everything they want
30 ##############
31 as testid@aaf.att.com
32 # TC_Role2.20.1.POS List Data on non-Empty NS
33 ns list name com.test.TC_Role2.@[user.name]
34 ** Expect 200 **
35
36 List Namespaces by Name[com.test.TC_Role2.@[THE_USER]]
37 --------------------------------------------------------------------------------
38 com.test.TC_Role2.@[THE_USER]
39     Administrators
40         testid@aaf.att.com                                                      
41     Responsible Parties
42         @[THE_USER]@csp.att.com                                                      
43     Roles
44         com.test.TC_Role2.@[THE_USER].admin                                          
45         com.test.TC_Role2.@[THE_USER].owner                                          
46     Permissions
47         com.test.TC_Role2.@[THE_USER].access *                        *              
48         com.test.TC_Role2.@[THE_USER].access *                        read           
49
50 # TC_Role2.20.10.POS Create Orwellian Roles
51 role create com.test.TC_Role2.@[user.name].r.animals 
52 ** Expect 201 **
53 Created Role
54
55 role create com.test.TC_Role2.@[user.name].r.dogs
56 ** Expect 201 **
57 Created Role
58
59 role create com.test.TC_Role2.@[user.name].r.pigs 
60 ** Expect 201 **
61 Created Role
62
63 # TC_Role2.20.20.POS Create and Grant Perms to Dog Roles
64 perm create com.test.TC_Role2.@[user.name].r.A garbage eat com.test.TC_Role2.@[user.name].r.animals
65 ** Expect 201 **
66 Created Permission
67 Granted Permission [com.test.TC_Role2.@[THE_USER].r.A|garbage|eat] to Role [com.test.TC_Role2.@[THE_USER].r.animals]
68
69 perm create com.test.TC_Role2.@[user.name].r.A grain eat com.test.TC_Role2.@[user.name].r.dogs
70 ** Expect 201 **
71 Created Permission
72 Granted Permission [com.test.TC_Role2.@[THE_USER].r.A|grain|eat] to Role [com.test.TC_Role2.@[THE_USER].r.dogs]
73
74 perm create com.test.TC_Role2.@[user.name].r.A grain * com.test.TC_Role2.@[user.name].r.dogs
75 ** Expect 201 **
76 Created Permission
77 Granted Permission [com.test.TC_Role2.@[THE_USER].r.A|grain|*] to Role [com.test.TC_Role2.@[THE_USER].r.dogs]
78
79 perm create com.test.TC_Role2.@[user.name].r.A * * com.test.TC_Role2.@[user.name].r.dogs
80 ** Expect 201 **
81 Created Permission
82 Granted Permission [com.test.TC_Role2.@[THE_USER].r.A|*|*] to Role [com.test.TC_Role2.@[THE_USER].r.dogs]
83
84 # TC_Role2.20.25.POS Create and Grant Animal Farm Priviledges to Pigs
85 as XX@NS
86 perm create com.att.aaf.role com.test.TC_Role2.@[user.name].r.animals view com.test.TC_Role2.@[user.name].r.pigs
87 ** Expect 201 **
88 Created Permission
89 Granted Permission [com.att.aaf.role|com.test.TC_Role2.@[THE_USER].r.animals|view] to Role [com.test.TC_Role2.@[THE_USER].r.pigs]
90
91 perm create com.att.aaf.role com.test.TC_Role2.@[user.name].r.dogs view com.test.TC_Role2.@[user.name].r.pigs
92 ** Expect 201 **
93 Created Permission
94 Granted Permission [com.att.aaf.role|com.test.TC_Role2.@[THE_USER].r.dogs|view] to Role [com.test.TC_Role2.@[THE_USER].r.pigs]
95
96 # TC_Role2.20.60.POS List Data on non-Empty NS
97 as testid@aaf.att.com
98 ns list name com.test.TC_Role2.@[user.name]
99 ** Expect 200 **
100
101 List Namespaces by Name[com.test.TC_Role2.@[THE_USER]]
102 --------------------------------------------------------------------------------
103 com.test.TC_Role2.@[THE_USER]
104     Administrators
105         testid@aaf.att.com                                                      
106     Responsible Parties
107         @[THE_USER]@csp.att.com                                                      
108     Roles
109         com.test.TC_Role2.@[THE_USER].admin                                          
110         com.test.TC_Role2.@[THE_USER].owner                                          
111         com.test.TC_Role2.@[THE_USER].r.animals                                      
112         com.test.TC_Role2.@[THE_USER].r.dogs                                         
113         com.test.TC_Role2.@[THE_USER].r.pigs                                         
114     Permissions
115         com.test.TC_Role2.@[THE_USER].access *                        *              
116         com.test.TC_Role2.@[THE_USER].access *                        read           
117         com.test.TC_Role2.@[THE_USER].r.A   *                        *              
118         com.test.TC_Role2.@[THE_USER].r.A   garbage                  eat            
119         com.test.TC_Role2.@[THE_USER].r.A   grain                    *              
120         com.test.TC_Role2.@[THE_USER].r.A   grain                    eat            
121
122 as XX@NS
123 # TC_Role2.40.1.POS List Data on Role
124 role list role com.test.TC_Role2.@[user.name].r.animals
125 ** Expect 200 **
126
127 List Roles for Role[com.test.TC_Role2.@[THE_USER].r.animals]
128 --------------------------------------------------------------------------------
129 ROLE Name                                         
130    PERM Type                      Instance                       Action         
131 --------------------------------------------------------------------------------
132 com.test.TC_Role2.@[THE_USER].r.animals                
133    com.test.TC_Role2.@[THE_USER].r.A   garbage                        eat            
134
135 role list role com.test.TC_Role2.@[user.name].r.dogs
136 ** Expect 200 **
137
138 List Roles for Role[com.test.TC_Role2.@[THE_USER].r.dogs]
139 --------------------------------------------------------------------------------
140 ROLE Name                                         
141    PERM Type                      Instance                       Action         
142 --------------------------------------------------------------------------------
143 com.test.TC_Role2.@[THE_USER].r.dogs                   
144    com.test.TC_Role2.@[THE_USER].r.A   *                              *              
145    com.test.TC_Role2.@[THE_USER].r.A   grain                          *              
146    com.test.TC_Role2.@[THE_USER].r.A   grain                          eat            
147
148 role list role com.test.TC_Role2.@[user.name].r.pigs
149 ** Expect 200 **
150
151 List Roles for Role[com.test.TC_Role2.@[THE_USER].r.pigs]
152 --------------------------------------------------------------------------------
153 ROLE Name                                         
154    PERM Type                      Instance                       Action         
155 --------------------------------------------------------------------------------
156 com.test.TC_Role2.@[THE_USER].r.pigs                   
157    com.att.aaf.role               com.test.TC_Role2.@[THE_USER].r.animals view           
158    com.att.aaf.role               com.test.TC_Role2.@[THE_USER].r.dogs view           
159
160 # TC_Role2.40.10.POS Add testunused to animals
161 as testid@aaf.att.com
162 user role add testunused@aaf.att.com com.test.TC_Role2.@[user.name].r.animals
163 ** Expect 201 **
164 Added Role [com.test.TC_Role2.@[THE_USER].r.animals] to User [testunused@aaf.att.com]
165
166 # TC_Role2.40.11.POS List by Name when part of role
167 as testunused@aaf.att.com
168 role list role com.test.TC_Role2.@[user.name].r.animals
169 ** Expect 200 **
170
171 List Roles for Role[com.test.TC_Role2.@[THE_USER].r.animals]
172 --------------------------------------------------------------------------------
173 ROLE Name                                         
174    PERM Type                      Instance                       Action         
175 --------------------------------------------------------------------------------
176 com.test.TC_Role2.@[THE_USER].r.animals                
177    com.test.TC_Role2.@[THE_USER].r.A   garbage                        eat            
178
179 # TC_Role2.40.12.NEG List by Name when not part of Role
180 role list role com.test.TC_Role2.@[user.name].r.dogs
181 ** Expect 403 **
182 Failed [SVC1403]: Forbidden - [testunused@aaf.att.com] may not read Role [com.test.TC_Role2.@[THE_USER].r.dogs]
183
184 role list role com.test.TC_Role2.@[user.name].r.pigs
185 ** Expect 403 **
186 Failed [SVC1403]: Forbidden - [testunused@aaf.att.com] may not read Role [com.test.TC_Role2.@[THE_USER].r.pigs]
187
188 # TC_Role2.40.30.POS Read various Roles based on being Admin in Namespace
189 as testid@aaf.att.com
190 role list role com.test.TC_Role2.@[user.name].r.animals
191 ** Expect 200 **
192
193 List Roles for Role[com.test.TC_Role2.@[THE_USER].r.animals]
194 --------------------------------------------------------------------------------
195 ROLE Name                                         
196    PERM Type                      Instance                       Action         
197 --------------------------------------------------------------------------------
198 com.test.TC_Role2.@[THE_USER].r.animals                
199    com.test.TC_Role2.@[THE_USER].r.A   garbage                        eat            
200
201 role list role com.test.TC_Role2.@[user.name].r.dogs
202 ** Expect 200 **
203
204 List Roles for Role[com.test.TC_Role2.@[THE_USER].r.dogs]
205 --------------------------------------------------------------------------------
206 ROLE Name                                         
207    PERM Type                      Instance                       Action         
208 --------------------------------------------------------------------------------
209 com.test.TC_Role2.@[THE_USER].r.dogs                   
210    com.test.TC_Role2.@[THE_USER].r.A   *                              *              
211    com.test.TC_Role2.@[THE_USER].r.A   grain                          *              
212    com.test.TC_Role2.@[THE_USER].r.A   grain                          eat            
213
214 role list role com.test.TC_Role2.@[user.name].r.pigs
215 ** Expect 200 **
216
217 List Roles for Role[com.test.TC_Role2.@[THE_USER].r.pigs]
218 --------------------------------------------------------------------------------
219 ROLE Name                                         
220    PERM Type                      Instance                       Action         
221 --------------------------------------------------------------------------------
222 com.test.TC_Role2.@[THE_USER].r.pigs                   
223    com.att.aaf.role               com.test.TC_Role2.@[THE_USER].r.animals view           
224    com.att.aaf.role               com.test.TC_Role2.@[THE_USER].r.dogs view           
225
226 # TC_Role2.40.50.POS Change testunused to Pigs
227 as testid@aaf.att.com
228 user role del testunused@aaf.att.com com.test.TC_Role2.@[user.name].r.animals
229 ** Expect 200 **
230 Removed Role [com.test.TC_Role2.@[THE_USER].r.animals] from User [testunused@aaf.att.com]
231
232 user role add testunused@aaf.att.com com.test.TC_Role2.@[user.name].r.pigs
233 ** Expect 201 **
234 Added Role [com.test.TC_Role2.@[THE_USER].r.pigs] to User [testunused@aaf.att.com]
235
236 # TC_Role2.40.51.POS Read various Roles based on having Explicit Permissions
237 as testunused@aaf.att.com
238 role list role com.test.TC_Role2.@[user.name].r.animals
239 ** Expect 403 **
240 Failed [SVC1403]: Forbidden - [testunused@aaf.att.com] may not read Role [com.test.TC_Role2.@[THE_USER].r.animals]
241
242 role list role com.test.TC_Role2.@[user.name].r.dogs
243 ** Expect 403 **
244 Failed [SVC1403]: Forbidden - [testunused@aaf.att.com] may not read Role [com.test.TC_Role2.@[THE_USER].r.dogs]
245
246 role list role com.test.TC_Role2.@[user.name].r.pigs
247 ** Expect 200 **
248
249 List Roles for Role[com.test.TC_Role2.@[THE_USER].r.pigs]
250 --------------------------------------------------------------------------------
251 ROLE Name                                         
252    PERM Type                      Instance                       Action         
253 --------------------------------------------------------------------------------
254 com.test.TC_Role2.@[THE_USER].r.pigs                   
255    com.att.aaf.role               com.test.TC_Role2.@[THE_USER].r.animals view           
256    com.att.aaf.role               com.test.TC_Role2.@[THE_USER].r.dogs view           
257
258 # TC_Role2.41.10.POS List by User when Same as Caller
259 as testunused@aaf.att.com
260 role list user testunused@aaf.att.com
261 ** Expect 200 **
262
263 List Roles for User [testunused@aaf.att.com]
264 --------------------------------------------------------------------------------
265 ROLE Name                                         
266    PERM Type                      Instance                       Action         
267 --------------------------------------------------------------------------------
268 com.test.TC_Role2.@[THE_USER].r.pigs                   
269    com.att.aaf.role               com.test.TC_Role2.@[THE_USER].r.animals view           
270    com.att.aaf.role               com.test.TC_Role2.@[THE_USER].r.dogs view           
271
272 # TC_Role2.41.15.POS List by User when not same as Caller, but own/admin namespace of Roles
273 as testid@aaf.att.com
274 role list user testunused@aaf.att.com
275 ** Expect 200 **
276
277 List Roles for User [testunused@aaf.att.com]
278 --------------------------------------------------------------------------------
279 ROLE Name                                         
280    PERM Type                      Instance                       Action         
281 --------------------------------------------------------------------------------
282 com.test.TC_Role2.@[THE_USER].r.pigs                   
283    com.att.aaf.role               com.test.TC_Role2.@[THE_USER].r.animals view           
284    com.att.aaf.role               com.test.TC_Role2.@[THE_USER].r.dogs view           
285
286 # TC_Role2.41.20.POS List by User when not same as Caller, but parent owner of Namespace
287 as XX@NS
288 role list user testunused@aaf.att.com
289 ** Expect 200 **
290
291 List Roles for User [testunused@aaf.att.com]
292 --------------------------------------------------------------------------------
293 ROLE Name                                         
294    PERM Type                      Instance                       Action         
295 --------------------------------------------------------------------------------
296 com.test.TC_Role2.@[THE_USER].r.pigs                   
297    com.att.aaf.role               com.test.TC_Role2.@[THE_USER].r.animals view           
298    com.att.aaf.role               com.test.TC_Role2.@[THE_USER].r.dogs view           
299
300 # TC_Role2.41.80.NEG List by User when not Caller nor associated to Namespace (nothing should be shown)
301 as testunused@aaf.att.com
302 role list user XX@NS
303 ** Expect 200 **
304
305 List Roles for User [XX@NS]
306 --------------------------------------------------------------------------------
307 ROLE Name                                         
308    PERM Type                      Instance                       Action         
309 --------------------------------------------------------------------------------
310
311 # TC_Role2.42.10.POS List Roles from NS when not allowed to see NS
312 as testid@aaf.att.com
313 role list ns com.test.TC_Role2.@[user.name]
314 ** Expect 200 **
315
316 List Roles by NS [com.test.TC_Role2.@[THE_USER]]
317 --------------------------------------------------------------------------------
318 ROLE Name                                         
319    PERM Type                      Instance                       Action         
320 --------------------------------------------------------------------------------
321 com.test.TC_Role2.@[THE_USER].admin                    
322    com.test.TC_Role2.@[THE_USER].access *                              *              
323 com.test.TC_Role2.@[THE_USER].owner                    
324    com.test.TC_Role2.@[THE_USER].access *                              read           
325 com.test.TC_Role2.@[THE_USER].r.animals                
326    com.test.TC_Role2.@[THE_USER].r.A   garbage                        eat            
327 com.test.TC_Role2.@[THE_USER].r.dogs                   
328    com.test.TC_Role2.@[THE_USER].r.A   *                              *              
329    com.test.TC_Role2.@[THE_USER].r.A   grain                          *              
330    com.test.TC_Role2.@[THE_USER].r.A   grain                          eat            
331 com.test.TC_Role2.@[THE_USER].r.pigs                   
332    com.att.aaf.role               com.test.TC_Role2.@[THE_USER].r.animals view           
333    com.att.aaf.role               com.test.TC_Role2.@[THE_USER].r.dogs view           
334
335 # TC_Role2.42.20.NEG Don't List Roles from NS when not allowed to see NS
336 as testunused@aaf.att.com
337 role list ns com.test.TC_Role2.@[user.name]
338 ** Expect 403 **
339 Failed [SVC1403]: Forbidden - [testunused@aaf.att.com] may not read in NS [com.test.TC_Role2.@[THE_USER]]
340
341 # TC_Role2.43.10.POS List Roles when allowed to see Perm
342 as testid@aaf.att.com
343 role list perm com.test.TC_Role2.@[user.name].r.A grain eat
344 ** Expect 200 **
345
346 List Roles by Perm com.test.TC_Role2.@[THE_USER].r.A|grain|eat
347 --------------------------------------------------------------------------------
348 ROLE Name                                         
349    PERM Type                      Instance                       Action         
350 --------------------------------------------------------------------------------
351 com.test.TC_Role2.@[THE_USER].r.dogs                   
352    com.test.TC_Role2.@[THE_USER].r.A   *                              *              
353    com.test.TC_Role2.@[THE_USER].r.A   grain                          *              
354    com.test.TC_Role2.@[THE_USER].r.A   grain                          eat            
355
356 role list perm com.test.TC_Role2.@[user.name].r.A grain *
357 ** Expect 200 **
358
359 List Roles by Perm com.test.TC_Role2.@[THE_USER].r.A|grain|*
360 --------------------------------------------------------------------------------
361 ROLE Name                                         
362    PERM Type                      Instance                       Action         
363 --------------------------------------------------------------------------------
364 com.test.TC_Role2.@[THE_USER].r.dogs                   
365    com.test.TC_Role2.@[THE_USER].r.A   *                              *              
366    com.test.TC_Role2.@[THE_USER].r.A   grain                          *              
367    com.test.TC_Role2.@[THE_USER].r.A   grain                          eat            
368
369 role list perm com.test.TC_Role2.@[user.name].r.A * *
370 ** Expect 200 **
371
372 List Roles by Perm com.test.TC_Role2.@[THE_USER].r.A|*|*
373 --------------------------------------------------------------------------------
374 ROLE Name                                         
375    PERM Type                      Instance                       Action         
376 --------------------------------------------------------------------------------
377 com.test.TC_Role2.@[THE_USER].r.dogs                   
378    com.test.TC_Role2.@[THE_USER].r.A   *                              *              
379    com.test.TC_Role2.@[THE_USER].r.A   grain                          *              
380    com.test.TC_Role2.@[THE_USER].r.A   grain                          eat            
381
382 # TC_Role2.43.15.NEG Don't List Roles when not allowed to see Perm
383 as testunused@aaf.att.com
384 role list perm com.test.TC_Role2.@[user.name].r.A grain eat
385 ** Expect 403 **
386 Failed [SVC1403]: Forbidden - [testunused@aaf.att.com] may not read Perm [com.test.TC_Role2.@[THE_USER].r.A|grain|eat]
387
388 role list perm com.test.TC_Role2.@[user.name].r.A grain *
389 ** Expect 403 **
390 Failed [SVC1403]: Forbidden - [testunused@aaf.att.com] may not read Perm [com.test.TC_Role2.@[THE_USER].r.A|grain|*]
391
392 role list perm com.test.TC_Role2.@[user.name].r.A * *
393 ** Expect 403 **
394 Failed [SVC1403]: Forbidden - [testunused@aaf.att.com] may not read Perm [com.test.TC_Role2.@[THE_USER].r.A|*|*]
395
396 as XX@NS
397 # TC_Role2.99.1.POS Delete Roles
398 force role delete com.test.TC_Role2.@[user.name].r.animals
399 ** Expect 200,404 **
400 Deleted Role
401
402 force role delete com.test.TC_Role2.@[user.name].r.dogs
403 ** Expect 200,404 **
404 Deleted Role
405
406 force role delete com.test.TC_Role2.@[user.name].r.pigs
407 ** Expect 200,404 **
408 Deleted Role
409
410 # TC_Role2.99.2.POS Delete Perms
411 force perm delete com.test.TC_Role2.@[user.name].r.A garbage eat
412 ** Expect 200,404 **
413 Deleted Permission
414
415 force perm delete com.test.TC_Role2.@[user.name].r.A grain eat
416 ** Expect 200,404 **
417 Deleted Permission
418
419 force perm delete com.test.TC_Role2.@[user.name].r.A grain *
420 ** Expect 200,404 **
421 Deleted Permission
422
423 force perm delete com.test.TC_Role2.@[user.name].r.A * *
424 ** Expect 200,404 **
425 Deleted Permission
426
427 force perm delete com.att.aaf.role com.test.TC_Role2.@[user.name].r.animals view
428 ** Expect 200,404 **
429 Deleted Permission
430
431 force perm delete com.att.aaf.role com.test.TC_Role2.@[user.name].r.dogs view
432 ** Expect 200,404 **
433 Deleted Permission
434
435 # TC_Role2.99.2.POS Namespace Admin can delete Namespace
436 force ns delete com.test.TC_Role2.@[user.name]
437 ** Expect 200,404 **
438 Deleted Namespace
439
440 # TC_Role2.99.3.POS Print Namespaces
441 ns list name com.test.TC_Role2.@[user.name]
442 ** Expect 200,404 **
443
444 List Namespaces by Name[com.test.TC_Role2.@[THE_USER]]
445 --------------------------------------------------------------------------------
446     *** Namespace Not Found ***
447