Upgrade to latest oparent
[aaf/authz.git] / authz-test / TestSuite / expected / TC_UR1.expected
1 set testid@aaf.att.com <pass>
2 set testunused@aaf.att.com <pass>
3 set XX@NS <pass>
4 set bogus boguspass
5 #delay 10
6 set NFR 0
7 as testid@aaf.att.com
8 # TC_UR1.10.0.POS Validate no NS
9 ns list name com.test.TC_UR1.@[user.name] 
10 ** Expect 200 **
11
12 List Namespaces by Name[com.test.TC_UR1.@[THE_USER]]
13 --------------------------------------------------------------------------------
14     *** Namespace Not Found ***
15
16 # TC_UR1.10.1.POS Create Namespace to add IDs
17 ns create com.test.TC_UR1.@[user.name] @[user.name] testid@aaf.att.com
18 ** Expect 201 **
19 Created Namespace
20
21 # TC_Role1.10.10.POS Create role to assign mechid perm to
22 role create com.test.TC_UR1.@[user.name].cred_admin
23 ** Expect 201 **
24 Created Role
25
26 as XX@NS
27 # TC_Role1.10.11.POS Assign role to mechid perm
28 perm grant com.att.aaf.mechid com.att create com.test.TC_UR1.@[user.name].cred_admin
29 ** Expect 201 **
30 Granted Permission [com.att.aaf.mechid|com.att|create] to Role [com.test.TC_UR1.@[THE_USER].cred_admin]
31
32 as testid@aaf.att.com
33 # TC_Role1.10.12.POS Assign user for creating creds
34 user role add testid@aaf.att.com com.test.TC_UR1.@[user.name].cred_admin
35 ** Expect 201 **
36 Added Role [com.test.TC_UR1.@[THE_USER].cred_admin] to User [testid@aaf.att.com]
37
38 # TC_UR1.10.20.POS Create two Credentials
39 user cred add m00001@@[user.name].TC_UR1.test.com "abc123sd"
40 ** Expect 201 **
41 Added Credential [m00001@@[THE_USER].TC_UR1.test.com]
42
43 user cred add m00002@@[user.name].TC_UR1.test.com "abc123sd"
44 ** Expect 201 **
45 Added Credential [m00002@@[THE_USER].TC_UR1.test.com]
46
47 # TC_UR1.10.21.POS Create two Roles
48 role create com.test.TC_UR1.@[user.name].r1
49 ** Expect 201 **
50 Created Role
51
52 role create com.test.TC_UR1.@[user.name].r2
53 ** Expect 201 **
54 Created Role
55
56 # TC_UR1.23.1.NEG Too Few Args for User Role 1
57 user 
58 ** Expect 0 **
59 user role <add|del|setTo|extend> <user> [role[,role]* (!REQ S)] 
60      cred <add|del|reset|extend> <id> [password (! D|E)] [entry# (if multi)] 
61      delegate <add|upd|del> <from> [to REQ A&U] [until (YYYY-MM-DD) REQ A] 
62      list role <role> 
63           perm <type> <instance> <action> 
64           cred <ns|id> <value> 
65           delegates <user|delegate> <id> 
66           approvals <user|approver|ticket> <value> 
67           activity <user> 
68
69 # TC_UR1.23.2.NEG Too Few Args for user role
70 user role
71 ** Expect -1 **
72 Too few args: role <add|del|setTo|extend> <user> [role[,role]* (!REQ S)] 
73
74 # TC_UR1.23.3.NEG Too Few Args for user role add
75 user role add
76 ** Expect -1 **
77 Too few args: role <add|del|setTo|extend> <user> [role[,role]* (!REQ S)] 
78
79 # TC_UR1.30.10.POS Create a UserRole
80 user role add m00001@@[user.name].TC_UR1.test.com com.test.TC_UR1.@[user.name].r1
81 ** Expect 201 **
82 Added Role [com.test.TC_UR1.@[THE_USER].r1] to User [m00001@@[THE_USER].TC_UR1.test.com]
83
84 # TC_UR1.30.11.NEG Created UserRole Exists
85 user role add m00001@@[user.name].TC_UR1.test.com com.test.TC_UR1.@[user.name].r1
86 ** Expect 409 **
87 Failed [SVC1409]: Conflict Already Exists - User Role exists
88
89 # TC_UR1.30.13.POS Delete UserRole 
90 sleep 0
91 user role del m00001@@[user.name].TC_UR1.test.com com.test.TC_UR1.@[user.name].r1
92 ** Expect 200 **
93 Removed Role [com.test.TC_UR1.@[THE_USER].r1] from User [m00001@@[THE_USER].TC_UR1.test.com]
94
95 # TC_UR1.30.20.POS Create multiple UserRoles
96 user role add m00001@@[user.name].TC_UR1.test.com com.test.TC_UR1.@[user.name].r1,com.test.TC_UR1.@[user.name].r2
97 ** Expect 201 **
98 Added Role [com.test.TC_UR1.@[THE_USER].r1] to User [m00001@@[THE_USER].TC_UR1.test.com]
99 Added Role [com.test.TC_UR1.@[THE_USER].r2] to User [m00001@@[THE_USER].TC_UR1.test.com]
100
101 # TC_UR1.30.21.NEG Created UserRole Exists
102 user role add m00001@@[user.name].TC_UR1.test.com com.test.TC_UR1.@[user.name].r1,com.test.TC_UR1.@[user.name].r2
103 ** Expect 409 **
104 Failed [SVC1409]: Conflict Already Exists - User Role exists
105 Failed [SVC1409]: Conflict Already Exists - User Role exists
106
107 # TC_UR1.30.23.POS Delete UserRole 
108 sleep 0
109 user role del m00001@@[user.name].TC_UR1.test.com com.test.TC_UR1.@[user.name].r1,com.test.TC_UR1.@[user.name].r2
110 ** Expect 200 **
111 Removed Role [com.test.TC_UR1.@[THE_USER].r1] from User [m00001@@[THE_USER].TC_UR1.test.com]
112 Removed Role [com.test.TC_UR1.@[THE_USER].r2] from User [m00001@@[THE_USER].TC_UR1.test.com]
113
114 # TC_UR1.30.30.POS Create a Role User
115 role user add com.test.TC_UR1.@[user.name].r1 m00001@@[user.name].TC_UR1.test.com 
116 ** Expect 201 **
117 Added User [m00001@@[THE_USER].TC_UR1.test.com] to Role [com.test.TC_UR1.@[THE_USER].r1]
118
119 # TC_UR1.30.31.NEG Created Role User Exists
120 role user add com.test.TC_UR1.@[user.name].r1 m00001@@[user.name].TC_UR1.test.com 
121 ** Expect 409 **
122 Failed [SVC1409]: Conflict Already Exists - User Role exists
123
124 # TC_UR1.30.33.POS Delete Role User
125 sleep 0
126 role user del com.test.TC_UR1.@[user.name].r1 m00001@@[user.name].TC_UR1.test.com
127 ** Expect 200 **
128 Removed User [m00001@@[THE_USER].TC_UR1.test.com] from Role [com.test.TC_UR1.@[THE_USER].r1]
129
130 # TC_UR1.30.40.POS Create multiple Role Users
131 role user add com.test.TC_UR1.@[user.name].r1 m00001@@[user.name].TC_UR1.test.com,m00002@@[user.name].TC_UR1.test.com
132 ** Expect 201 **
133 Added User [m00001@@[THE_USER].TC_UR1.test.com] to Role [com.test.TC_UR1.@[THE_USER].r1]
134 Added User [m00002@@[THE_USER].TC_UR1.test.com] to Role [com.test.TC_UR1.@[THE_USER].r1]
135
136 # TC_UR1.30.41.NEG Created Role User Exists
137 role user add com.test.TC_UR1.@[user.name].r1 m00001@@[user.name].TC_UR1.test.com,m00002@@[user.name].TC_UR1.test.com
138 ** Expect 409 **
139 Failed [SVC1409]: Conflict Already Exists - User Role exists
140 Failed [SVC1409]: Conflict Already Exists - User Role exists
141
142 # TC_UR1.30.43.POS Delete Role Users 
143 sleep 0
144 role user del com.test.TC_UR1.@[user.name].r1 m00001@@[user.name].TC_UR1.test.com,m00002@@[user.name].TC_UR1.test.com
145 ** Expect 200 **
146 Removed User [m00001@@[THE_USER].TC_UR1.test.com] from Role [com.test.TC_UR1.@[THE_USER].r1]
147 Removed User [m00002@@[THE_USER].TC_UR1.test.com] from Role [com.test.TC_UR1.@[THE_USER].r1]
148
149 # TC_UR1.40.10.POS Create multiple UserRoles
150 user role setTo m00001@@[user.name].TC_UR1.test.com com.test.TC_UR1.@[user.name].r1,com.test.TC_UR1.@[user.name].r2
151 ** Expect 200 **
152 Set User's Roles to [com.test.TC_UR1.@[THE_USER].r1,com.test.TC_UR1.@[THE_USER].r2]
153
154 # TC_UR1.40.11.POS Reset userrole for a user
155 user role setTo m00001@@[user.name].TC_UR1.test.com
156 ** Expect 200 **
157 Set User's Roles to []
158
159 # TC_UR1.40.12.NEG Create userrole where Role doesn't exist
160 user role setTo m00001@@[user.name].TC_UR1.test.com com.test.TC_UR1.@[user.name].r5
161 ** Expect 404 **
162 Failed [SVC3404]: Not Found - Role [com.test.TC_UR1.@[THE_USER].r5] does not exist
163
164 # TC_UR1.40.13.NEG Create userrole where User doesn't exist
165 user role setTo m99999@@[user.name].TC_UR1.test.com com.test.TC_UR1.@[user.name].r1
166 ** Expect 403 **
167 Failed [SVC2403]: Forbidden - m99999@@[THE_USER].TC_UR1.test.com is not a valid AAF Credential
168
169 as testunused@aaf.att.com
170 # TC_UR1.40.19.NEG User without permission tries to add userrole
171 user role setTo m00001@@[user.name].TC_UR1.test.com com.test.TC_UR1.@[user.name].r1
172 ** Expect 403 **
173 Failed [SVC1403]: Forbidden - [testunused@aaf.att.com] may not write Role [com.test.TC_UR1.@[THE_USER].r1]
174
175 # TC_UR1.40.20.NEG User without permission tries to add userrole
176 role user setTo com.test.TC_UR1.@[user.name].r1 m00001@@[user.name].TC_UR1.test.com
177 ** Expect 403 **
178 Failed [SVC1403]: Forbidden - [testunused@aaf.att.com] may not write Role [com.test.TC_UR1.@[THE_USER].r1]
179
180 as testid@aaf.att.com
181 # TC_UR1.40.22.POS Reset userrole for a user
182 role user setTo com.test.TC_UR1.@[user.name].r1
183 ** Expect 200 **
184 Set the Role to Users []
185
186 sleep 0
187 # TC_UR1.40.23.NEG Create UserRole where Role doesn't exist
188 role user setTo com.test.TC_UR1.@[user.name].r5 m00001@@[user.name].TC_UR1.test.com
189 ** Expect 404 **
190 Failed [SVC3404]: Not Found - Role [com.test.TC_UR1.@[THE_USER].r5] does not exist
191
192 sleep 0
193 # TC_UR1.40.24.NEG Create UserRole where User doesn't exist
194 role user setTo com.test.TC_UR1.@[user.name].r1 m99999@@[user.name].TC_UR1.test.com
195 ** Expect 403 **
196 Failed [SVC2403]: Forbidden - m99999@@[THE_USER].TC_UR1.test.com is not a valid AAF Credential
197
198 # Need to let DB catch up on deletes
199 sleep 0
200 as testid@aaf.att.com
201 # TC_UR1.99.1.POS Remove User from Role
202 role user del com.test.TC_UR1.@[user.name].r1 m00001@@[user.name].TC_UR1.test.com,m00002@@[user.name].TC_UR1.test.com 
203 ** Expect 200,404 **
204 Failed [SVC6404]: Not Found - User [ m00001@@[THE_USER].TC_UR1.test.com ] is not Assigned to the Role [ com.test.TC_UR1.@[THE_USER].r1 ]
205 Failed [SVC6404]: Not Found - User [ m00002@@[THE_USER].TC_UR1.test.com ] is not Assigned to the Role [ com.test.TC_UR1.@[THE_USER].r1 ]
206
207 role user del com.test.TC_UR1.@[user.name].r2 m00001@@[user.name].TC_UR1.test.com,m00002@@[user.name].TC_UR1.test.com 
208 ** Expect 200,404 **
209 Failed [SVC6404]: Not Found - User [ m00001@@[THE_USER].TC_UR1.test.com ] is not Assigned to the Role [ com.test.TC_UR1.@[THE_USER].r2 ]
210 Failed [SVC6404]: Not Found - User [ m00002@@[THE_USER].TC_UR1.test.com ] is not Assigned to the Role [ com.test.TC_UR1.@[THE_USER].r2 ]
211
212 role user setTo com.test.TC_UR1.@[user.name].r1
213 ** Expect 200,404 **
214 Set the Role to Users []
215
216 # TC_UR1.99.2.POS Remove ability to create creds
217 user role del testid@aaf.att.com com.test.TC_UR1.@[user.name].cred_admin
218 ** Expect 200,404 **
219 Removed Role [com.test.TC_UR1.@[THE_USER].cred_admin] from User [testid@aaf.att.com]
220
221 as XX@NS
222 perm ungrant com.att.aaf.mechid com.att create com.test.TC_UR1.@[user.name].cred_admin
223 ** Expect 200,404 **
224 UnGranted Permission [com.att.aaf.mechid|com.att|create] from Role [com.test.TC_UR1.@[THE_USER].cred_admin]
225
226 as testid@aaf.att.com
227 role delete com.test.TC_UR1.@[user.name].cred_admin
228 ** Expect 200,404 **
229 Deleted Role
230
231 # TC_UR1.99.3.POS Delete Creds
232 set force true
233 user cred del m00001@@[user.name].TC_UR1.test.com
234 ** Expect 200,404 **
235 Deleted Credential [m00001@@[THE_USER].TC_UR1.test.com]
236
237 set force true
238 user cred del m00002@@[user.name].TC_UR1.test.com
239 ** Expect 200,404 **
240 Deleted Credential [m00002@@[THE_USER].TC_UR1.test.com]
241
242 # TC_UR1.99.4.POS Delete Roles
243 set force true
244 set force=true role delete com.test.TC_UR1.@[user.name].r1
245 ** Expect 200,404 **
246 Deleted Role
247
248 set force true
249 set force=true role delete com.test.TC_UR1.@[user.name].r2
250 ** Expect 200,404 **
251 Deleted Role
252
253 # TC_UR1.99.5.POS Delete Namespace 
254 set force true
255 set force=true ns delete com.test.TC_UR1.@[user.name]
256 ** Expect 200,404 **
257 Deleted Namespace
258
259 # TC_UR1.99.99.POS Verify Cleaned NS
260 ns list name com.test.TC_UR1.@[user.name]
261 ** Expect 200,404 **
262
263 List Namespaces by Name[com.test.TC_UR1.@[THE_USER]]
264 --------------------------------------------------------------------------------
265     *** Namespace Not Found ***
266