os/security/authorisation/userpromptservice/test/tups/scripts/tups_integ.script
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 //
     2 // Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
     3 // All rights reserved.
     4 // This component and the accompanying materials are made available
     5 // under the terms of the License "Eclipse Public License v1.0"
     6 // which accompanies this distribution, and is available
     7 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     8 //
     9 // Initial Contributors:
    10 // Nokia Corporation - initial contribution.
    11 //
    12 // Contributors:
    13 //
    14 // Description: 
    15 //
    16 
    17 //tups_install
    18 //PRINT Run Basic test cases PREQ1262 for integration test
    19 
    20 //
    21 //  Prepare various clones of TUPSInteg.exe with different SIDs.
    22 //  Don't forget to delete clones at the end of test script.
    23 //  but do not delete original one !!!!
    24 
    25 RUN_PROGRAM 100 SETCAP TUPSInteg_data.exe 1c000 -SID 80001234 TUPSInteg_2.exe
    26 RUN_PROGRAM 100 SETCAP TUPSInteg_data.exe 1c000 -SID 80002222 TUPSInteg_3.exe  
    27 RUN_PROGRAM 100 SETCAP TUPSInteg_data.exe 1c000 -SID 10004444 TUPSInteg_4.exe 
    28 RUN_PROGRAM 100 SETCAP TUPSInteg_data.exe 810  	-SID 10006666 TUPSInteg_allfiles_readdevice.exe
    29 RUN_PROGRAM 100 SETCAP TUPSInteg_data.exe 10 	-SID 10007777 TUPSInteg_readdevice.exe
    30 RUN_PROGRAM 100 SETCAP TUPSInteg_data.exe 20 	-SID 10008888 TUPSInteg_writedevice.exe
    31 RUN_PROGRAM 100 SETCAP TUPSInteg_data.exe 1cf00 -SID 101F7790 TUPSInteg_minor.exe 
    32 
    33 // load suites
    34 LOAD_SUITE TUPSInteg_1
    35 LOAD_SUITE TUPSInteg_unprotected
    36 
    37 // load clones
    38 LOAD_SUITE TUPSInteg_2
    39 LOAD_SUITE TUPSInteg_3
    40 LOAD_SUITE TUPSInteg_4
    41 LOAD_SUITE TUPSInteg_allfiles_readdevice
    42 LOAD_SUITE TUPSInteg_readdevice
    43 LOAD_SUITE TUPSInteg_writedevice
    44 LOAD_SUITE TUPSInteg_minor
    45 
    46 
    47 //! @SYMTestCaseID SEC-UPS-MISC-0001
    48 //! @SYMTestCaseDesc Set up properties for policy evaluators and dialog creators, and Delete Existing Database
    49 
    50 START_TESTCASE SEC-UPS-MISC-0001
    51 
    52 RUN_TEST_STEP 100 TUPSInteg_1 PropertyStep z:\tups\integ\scripts\tups_properties.ini PropertiesToDestroy
    53 
    54 // Set up properties for policy evaluators and dialog creators.
    55 RUN_TEST_STEP 100 TUPSInteg_1 PropertyStep z:\tups\integ\scripts\tups_properties.ini PropertiesToCreate
    56 
    57 // Delete Existing Database
    58 RUN_TEST_STEP 100 TUPSInteg_1 UtilsCloseUps
    59 RUN_UTILS DeleteFile c:\private\10283558\database\ups.db
    60 
    61 END_TESTCASE SEC-UPS-MISC-0001
    62 
    63 
    64 //********************** SEC-UPS-A : BASIC USER PROMPTING  **********************
    65 
    66 //! @SYMTestCaseID SEC-UPS-INTEG-A001
    67 //! @SYMTestCaseDesc User prompt service: option “only this session”
    68 //!                  (only_this_session)
    69 //!		
    70 //! @SYMPREQ PREQ1262
    71 //! @SYMREQ REQ7367, REQ7410, REQ7411, REQ7412, REQ7413, REQ7414, REQ7415, REQ7417, REQ7446
    72 //! @SYMTestPriority Critical
    73 //! @SYMTestStatus   Implemented
    74 //! @SYMTestActions 	Preconditions:
    75 //!			• There is an appropriate policy, policy evaluator and dialog that matches the UID of the service 	
    76 //!			offered by the “system server”.
    77 //!
    78 //!			
    79 //!			Test Actions:
    80 //!			• Launch “test client” which tries to connect to a system server and use service.
    81 //!			• System server asks for a user prompt to the UPS.
    82 //!			• When UPS prompts user, select the “Only this session” option.
    83 //!			• Check that now the “test client” can use the intended service from the “system server”.
    84 //!			• Check again In same session that client still can use test service without need of user prompt. 
    85 //!			• Disconnect session and create new one.
    86 //!			• Ask “test client” to request again for the same service to the system server.  This should cause 	
    87 //!			the service provided to request for a new user prompt.
    88 //!			• Select again “Only this session” option.
    89 //!			• Check that “test client” can use again the intended service from system server.
    90 //!
    91 //! @SYMTestExpectedResults 	• User prompt service dialog is displayed correctly in both occasions that “test client” 
    92 //!				request for authorisation.
    93 //!				• Information displayed about the client is complete (see Appendix A).
    94 //!				• “Test client” can use service from system server in both  occasions after selecting “Only 	
    95 //!				this session”
    96 //!				• Information about the “Test client” is displayed correctly by user prompt.
    97 //!				• Decision DB is not affected by previous operation as “only this session” is not expected to 
    98 //!				be stored. 
    99 //!
   100 //! @SYMTestType CIT
   101 
   102 START_TESTCASE SEC-UPS-INTEG-A001
   103 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini only_this_session
   104 END_TESTCASE SEC-UPS-INTEG-A001
   105 
   106 
   107 //! @SYMTestCaseID SEC-UPS-INTEG-A002
   108 //! @SYMTestCaseDesc User prompt service: User prompt service: option “never”
   109 //!                  (never)
   110 //!		
   111 //! @SYMPREQ PREQ1262
   112 //! @SYMREQ REQ7367, REQ7372, REQ7374
   113 //!
   114 //! @SYMTestPriority Critical
   115 //! @SYMTestStatus   Implemented
   116 //! @SYMTestActions 	Preconditions:
   117 //!			• There is an appropriate policy, policy evaluator and dialog creator that matches the UID of the 	
   118 //!			service offered by the “system server”.
   119 //!			
   120 //!			Test Actions:
   121 //!			• Launch “test client” which tries to connect to a system server and use service.
   122 //!			• System server asks for a user prompt to the UPS.
   123 //!			• When UPS prompts user, select the “Never” option.
   124 //!			• Check that now the “test client” can NOT use the intended service after user selected “never”.
   125 //!			• Disconnect session and create new one.
   126 //!			• Ask “test client” to request again for the same service to the system server.  System server should 
   127 //!			deny access to “test client” immediately without showing user prompt. Make sure that UPS was invoked 	
   128 //!			again.
   129 //!
   130 //!
   131 //! @SYMTestExpectedResults 	• User prompt service dialog is displayed correctly.
   132 //!				• Security dialog is displayed within one second (1 sec) of client request for service. 
   133 //!				• Information displayed about the client is complete (see Appendix A).
   134 //!				• “Test client” can NOT use service from system server after selecting “Never”
   135 //!				• Decision DB is updated correctly with the never decision. 
   136 //!				• The second time the “Test client” tries to access the service from the system server it 	
   137 //!				should receive a silent denial. 
   138 //!
   139 //! @SYMTestType CIT
   140 
   141 START_TESTCASE SEC-UPS-INTEG-A002
   142 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini never
   143 RUN_TEST_STEP 100 TUPSInteg_1 UtilsCloseUps
   144 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini never_b
   145 END_TESTCASE SEC-UPS-INTEG-A002
   146 
   147 
   148 //! @SYMTestCaseID SEC-UPS-INTEG-A003
   149 //! @SYMTestCaseDesc User prompt service: option “Always”
   150 //!                  (always)
   151 //!		
   152 //! @SYMPREQ PREQ1262
   153 //! @SYMREQ REQ7428, REQ7429, REQ7367, REQ7372, REQ7374, REQ7493
   154 //!
   155 //! @SYMTestPriority Critical
   156 //! @SYMTestStatus   Implemented
   157 //! @SYMTestActions 	Preconditions:
   158 //!			• There is an appropriate policy, policy evaluator and dialog creator that matches the UID of the 	
   159 //!			service offered by the “system server”.
   160 //!			• Special: make sure that client have all necessary capabilities in order to test  REQ7493
   161 //!			
   162 //!			Test Actions:
   163 //!			• Launch “test client” which tries to connect to a system server and use service.
   164 //!			• System server asks for a user prompt to the UPS.
   165 //!			• When UPS prompts user, select the “Always” option.
   166 //!			• Check in same session that now the “test client” now can use the intended service after user 		
   167 //!			selected “Always”.
   168 //!			• Ask “test client” to request again for the same service to the system server.  System server should 
   169 //!			give immediate access to “test client” without showing user prompt (in same session).  
   170 //!			• Disconnect session and create new one.
   171 //!			• Ask “test client” to request again for the same service to the system server.  System server should 
   172 //!			give immediate access to “test client” without showing user prompt.  Make sure that UPS was invoked 	
   173 //!			again.
   174 //!
   175 //! @SYMTestExpectedResults 	• User prompt service dialog is displayed correctly.
   176 //!				• Security dialog is displayed within one second (1 sec) of client request for service. 
   177 //!				• Information displayed about the client is complete (see Appendix A).
   178 //!				• “Test client” can use service from system server after selecting “Always”
   179 //!				• Decision DB is updated correctly with the Always decision. 
   180 //!				• The second time the “Test client” tries to access the service from the system server it 	
   181 //!				should receive immediate access.  
   182 //!				• The response time from UPS for second use of test client is 100 ms (H4 board without demand 
   183 //!				paging) 
   184 //!
   185 //! @SYMTestType CIT
   186 
   187 START_TESTCASE SEC-UPS-INTEG-A003
   188 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini always
   189 RUN_TEST_STEP 100 TUPSInteg_1 UtilsCloseUps
   190 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini always_b
   191 END_TESTCASE SEC-UPS-INTEG-A003
   192 
   193 
   194 //! @SYMTestCaseID SEC-UPS-INTEG-A004
   195 //! @SYMTestCaseDesc User prompt service: “Yes” or “No” selection”
   196 //!                  (yes_or_no)
   197 //!		
   198 //! @SYMPREQ PREQ1262
   199 //! @SYMREQ REQ7372
   200 //!
   201 //! @SYMTestPriority Critical
   202 //! @SYMTestStatus   Implemented
   203 //! @SYMTestActions 	Preconditions:
   204 //!			• There is an appropriate policy, policy evaluator and dialog creator that matches the UID of the 	
   205 //!			service offered by the “system server”.
   206 //!			• Policy is set to display “yes” or “no” option
   207 //!			
   208 //!			Test Actions:
   209 //!			• Launch “test client” which tries to connect to a system server and use service.
   210 //!			• System server asks for a user prompt to the UPS.
   211 //!			• When UPS prompts user, select the “yes” option.
   212 //!			• Check that now the “test client” now can use the intended service.
   213 //!			• In same session that before, request uses service.
   214 //!			• UPS should prompt user again. Select yes  
   215 //!			• Launch “test client” in a new session. When security dialog is displayed select “no”.
   216 //!			• Check that test client can not access intended service. 
   217 //!
   218 //! @SYMTestExpectedResults 	• User prompt service dialog is displayed correctly.
   219 //!				• Security dialog is displayed within one second (1 sec) of client request for service. 
   220 //!				• Information displayed about the client is complete (see Appendix A).
   221 //!				• Decision DB does not store any new decision. 
   222 //!				• Access to test service is denied or granted accordingly.
   223 //!
   224 //! @SYMTestType CIT
   225 
   226 START_TESTCASE SEC-UPS-INTEG-A004
   227 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini yes_or_no
   228 END_TESTCASE SEC-UPS-INTEG-A004
   229 
   230 
   231 
   232 //********************** SEC-UPS-B : USE CASES FOR UPS INVOLVING CONCURRENCY  **********************
   233 
   234 
   235 //! @SYMTestCaseID 	SEC-UPS-INTEG-B004
   236 //! @SYMTestCaseDesc 	Concurrent process can access service despite unattended security dialog.
   237 //!                     (Unattended_Dialog)
   238 //!		
   239 //! @SYMPREQ 		PREQ1262
   240 //! @SYMREQ  		REQ7427
   241 //!
   242 //! @SYMTestPriority 	Critical
   243 //! @SYMTestStatus   	Implemented
   244 //! @SYMTestActions 	Preconditions:
   245 //!			• There is an appropriate policy, policy evaluator and dialog creator that matches the UID of the 
   246 //!			service offered by the “system server”.
   247 //!
   248 //!			Test Actions:
   249 //!			• Launch 3 “test client” (A, B & C) which requests use of different system servers. Client A should
   250 //!			not have any decision related to it stored in DB, Clients B should have a decision “Always” stored 
   251 //!			in DB, Client C should have decision “Never” stored in DB. Make sure that Client B & C are launch 
   252 //!			after security dialog is displayed for Client A. 
   253 //!			• Do not act in the security dialog for Client A when this one is displayed.
   254 //!			• Check that Client B can access intended test service.
   255 //!			• Check that Client C can not access intended test service and did receive a denial response.
   256 //!			• Act now in security dialog for Client A, select “always”.
   257 //!			• Check that Client A can access intended test service.
   258 //!
   259 //! @SYMTestExpectedResults 	• Final check in Decision DB shows 3 decisions stored: “Always” for Clients A & B,  “Never” 
   260 //!				for Client C.
   261 //!				• Accesses to service were granted for Clients A & B.
   262 //!
   263 //! @SYMTestType CIT
   264 
   265 START_TESTCASE SEC-UPS-INTEG-B004
   266 
   267 // Delete Existing Database
   268 RUN_TEST_STEP 100 TUPSInteg_1 UtilsCloseUps
   269 RUN_UTILS DeleteFile c:\private\10283558\database\ups.db
   270 
   271 // Setup up the Database so that Client B has an 'Always' Decision and Client C has a 'Never' Decision stored
   272 RUN_TEST_STEP 100 TUPSInteg_2 UPSClientStep z:\tups\integ\scripts\tups_integ.ini Unattended_Dialog_ClientB_Setup
   273 RUN_TEST_STEP 100 TUPSInteg_3 UPSClientStep z:\tups\integ\scripts\tups_integ.ini Unattended_Dialog_ClientC_Setup
   274 
   275 // Run 3 concurrent clients with a Coordinator to ensure that the Clients are synchronised
   276 CONCURRENT
   277 RUN_TEST_STEP 100 TUPSInteg_1 UPSCoordinatorStep z:\tups\integ\scripts\tups_integ.ini Unattended_Dialog_Coordinator
   278 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini Unattended_Dialog_ClientA
   279 RUN_TEST_STEP 100 TUPSInteg_2 UPSClientStep z:\tups\integ\scripts\tups_integ.ini Unattended_Dialog_ClientB
   280 RUN_TEST_STEP 100 TUPSInteg_3 UPSClientStep z:\tups\integ\scripts\tups_integ.ini Unattended_Dialog_ClientC
   281 CONSECUTIVE
   282 
   283 // Database Management Checks
   284 RUN_TEST_STEP 100 TUPSInteg_1 UPSDbManagementStep z:\tups\integ\scripts\tups_integ.ini Unattended_Dialog_dbManagementcheck
   285 
   286 END_TESTCASE SEC-UPS-INTEG-B004
   287 
   288 
   289 //! @SYMTestCaseID 	SEC-UPS-INTEG-B005
   290 //! @SYMTestCaseDesc 	Cancellation of UPS request in concurrent system server.
   291 //!                     (concurrent_cancellation)
   292 //!		
   293 //! @SYMPREQ 		PREQ1262
   294 //! @SYMREQ  		REQ7427, REQ7431, REQ7432
   295 //!
   296 //! @SYMTestPriority 	Critical
   297 //! @SYMTestStatus   	Implemented
   298 //! @SYMTestActions 	Preconditions:
   299 //!			• There is an appropriate policy, policy evaluator and dialog creator that matches the UID of the 
   300 //!			service offered by the “system server”.
   301 //!
   302 //!			Test Actions:
   303 //!			• Launch 2 “test client” (A & B ) which requests use of different system servers. Client A 		
   304 //!			should have a decision “Always” stored in DB, client B should have decision “Never” stored in DB. 	
   305 //!			Client A & B run continuously and they request periodic use of a test service, each of this request 	
   306 //!			should cause UPS to be invoked, UPS should continuously issue an appropriate silence response for A & 
   307 //!			B. 
   308 //!			• Launch “test client C” which requests use of different system servers. This client C does not have 	
   309 //!			any related decision stored in DB.
   310 //!			• The system server for client C is expected to request UPS for security dialog.
   311 //!			• Do not act in security dialog displayed for client C, instead instruct system server for client C 	
   312 //!			to cancel previous request made to UPS.
   313 //!			• Make sure that clients A & B can still receive appropriate silent response from UPS despite 		
   314 //!			cancellation of request by system server attending client C.
   315 //!			• Launch test client D which should attempt use of same service attempted by client C. Security 	
   316 //!			dialog should be displayed, select “Always”.
   317 //!			• Check that client D can access intended service.
   318 //!			• Launch client D in new session and check that it received silent acceptance.
   319 //!
   320 //!
   321 //! @SYMTestExpectedResults 	• Final check in Decision DB shows 2 decisions stored: “Always” for Clients A,  “Never” for 	
   322 //!				Client B.
   323 //!				• Access to service was granted for Clients A & D.
   324 //!				• Access to service was denied for Clients B.	
   325 //!
   326 //! @SYMTestType CIT
   327 
   328 START_TESTCASE SEC-UPS-INTEG-B005
   329 
   330 // Delete Existing Database
   331 RUN_TEST_STEP 100 TUPSInteg_1 UtilsCloseUps
   332 RUN_UTILS DeleteFile c:\private\10283558\database\ups.db
   333 
   334 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini concurrent_cancellation_clientA_setup
   335 RUN_TEST_STEP 100 TUPSInteg_2 UPSClientStep z:\tups\integ\scripts\tups_integ.ini concurrent_cancellation_clientB_setup
   336 
   337 CONCURRENT
   338 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini concurrent_cancellation_clientA
   339 RUN_TEST_STEP 100 TUPSInteg_2 UPSClientStep z:\tups\integ\scripts\tups_integ.ini concurrent_cancellation_clientB
   340 RUN_TEST_STEP 100 TUPSInteg_3 UPSClientStep z:\tups\integ\scripts\tups_integ.ini concurrent_cancellation_clientC_cancel
   341 RUN_TEST_STEP 100 TUPSInteg_4 UPSClientStep z:\tups\integ\scripts\tups_integ.ini concurrent_cancellation_clientD
   342 CONSECUTIVE
   343 
   344 // Concurrent cancellation with UPS calling the same server, policy evaluator, dialog creator and policy from clients B + D
   345 CONCURRENT
   346 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini concurrent_cancellation_clientA
   347 RUN_TEST_STEP 100 TUPSInteg_2 UPSClientStep z:\tups\integ\scripts\tups_integ.ini concurrent_cancellation_clientB_samepolicy
   348 RUN_TEST_STEP 100 TUPSInteg_3 UPSClientStep z:\tups\integ\scripts\tups_integ.ini concurrent_cancellation_clientC_cancel
   349 RUN_TEST_STEP 100 TUPSInteg_4 UPSClientStep z:\tups\integ\scripts\tups_integ.ini concurrent_cancellation_clientD_samepolicy
   350 CONSECUTIVE
   351 
   352 END_TESTCASE SEC-UPS-INTEG-B005
   353 
   354 
   355 //! @SYMTestCaseID 	SEC-UPS-INTEG-B008
   356 //! @SYMTestCaseDesc 	Early closure of client with concurrent processes, policy evaluator stage
   357 //!                     (client_dying_at_evaluator_point)
   358 //!		
   359 //! @SYMPREQ 		PREQ1262
   360 //! @SYMREQ  		REQ7427 
   361 //!
   362 //! @SYMTestPriority 	Critical
   363 //! @SYMTestStatus   	Implemented
   364 //! @SYMTestActions 	Preconditions:
   365 //!			•  There is an appropriate policy, policy evaluator and dialog creator that 
   366 //!			   matches the UID of the service offered by the “system server”.
   367 //!
   368 //!			Test Actions:
   369 //!			•  Launch 2 “test client” (A & B) which requests use of different system servers.
   370 //!			   Client A should have a decision “Always” stored in DB, client B should have 
   371 //!		           decision “Never” stored in DB. Clients A & B run continuously and they request
   372 //!			   periodic use of a test service, each of this request should cause UPS to be 
   373 //!			   invoked, UPS should continuously issue an appropriate silence response for A & B. 
   374 //!			•  Launch “test client C” which requests use of a different system server. System 
   375 //!			   server will invoke UPS and this one should invoke a policy evaluator. When 
   376 //!			   policy evaluator is running shut down test client C.
   377 //!			•  Make sure that Clients A & B can still receive appropriate silent response from UPS.
   378 //!
   379 //! @SYMTestExpectedResults 
   380 //!			•  Final check in Decision DB shows 2 decisions stored: “Always” for Clients A, “Never”
   381 //!			   for Client B.
   382 //!			•  Access to service was granted for Clients A. 
   383 //!			•  Access to service was denied for Clients B & C. 
   384 //!
   385 //! @SYMTestType CIT
   386 
   387 START_TESTCASE SEC-UPS-INTEG-B008
   388 
   389 // Delete Existing Database
   390 RUN_TEST_STEP 100 TUPSInteg_1 UtilsCloseUps
   391 RUN_UTILS DeleteFile c:\private\10283558\database\ups.db
   392 
   393 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini populate_client_00a
   394 RUN_TEST_STEP 100 TUPSInteg_2 UPSClientStep z:\tups\integ\scripts\tups_integ.ini populate_client_00b
   395 
   396 CONCURRENT
   397 RUN_TEST_STEP 100 TUPSInteg_1 UPSCoordinatorStep z:\tups\integ\scripts\tups_integ.ini dying_client_at_evaluator_Coordinator
   398 RUN_TEST_STEP 100 TUPSInteg_minor DyingClient z:\tups\integ\scripts\tups_integ.ini dying_client_at_evaluator
   399 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini check_client_00a
   400 RUN_TEST_STEP 100 TUPSInteg_2 UPSClientStep z:\tups\integ\scripts\tups_integ.ini check_client_00b
   401 CONSECUTIVE
   402 
   403 // Database Management Checks
   404 RUN_TEST_STEP 100 TUPSInteg_1 UPSDbManagementStep z:\tups\integ\scripts\tups_integ.ini client_dying_at_evaluator_point_dbManagementCheck
   405 
   406 END_TESTCASE SEC-UPS-INTEG-B008
   407 
   408 
   409 
   410 //! @SYMTestCaseID 	SEC-UPS-B009
   411 //! @SYMTestCaseDesc 	Early closure of client with concurrent processes, dialog displayed stage
   412 //!                     (client_dying_at_dialog_point)
   413 //!		
   414 //! @SYMPREQ 		PREQ1262
   415 //! @SYMREQ  		REQ7427 
   416 //!
   417 //! @SYMTestPriority 	Critical
   418 //! @SYMTestStatus   	Implemented
   419 //! @SYMTestActions 	Preconditions:
   420 //!			•  There is an appropriate policy, policy evaluator and dialog creator that 
   421 //!			   matches the UID of the service offered by the “system server”.
   422 //!			Test Actions:
   423 //!			•  Launch 2 “test client” (A & B) which requests use of different system 
   424 //!			   servers. Client A should have a decision “Always” stored in DB, client B 
   425 //!			   should have decision “Never” stored in DB. Clients A & B run continuously and 
   426 //!			   they request periodic use of a test service, each of this request should cause 
   427 //!	                   UPS to be invoked, UPS should continuously issue an appropriate silence response 
   428 //!			   for A & B. 
   429 //!			•  Launch “test client C” which requests use of a different system server. System 
   430 //!			   server will invoke UPS and at some stage a security dialog will be invoked. When 
   431 //!			   security dialog is displayed do not act on this one and shut down test client C.
   432 //!			•  Make sure that Clients A & B can still receive appropriate silent response from UPS.
   433 //!
   434 //! @SYMTestExpectedResults 
   435 //!			•  Final check in Decision DB shows 2 decisions stored: “Always” for Clients A,  
   436 //!			   “Never” for Client B.
   437 //!			•  Access to service was granted for Clients A. 
   438 //!		        •  Access to service was denied for Clients B & C. 
   439 //!
   440 //! @SYMTestType CIT
   441 
   442 START_TESTCASE SEC-UPS-B009
   443 
   444 // Delete Existing Database
   445 RUN_TEST_STEP 100 TUPSInteg_1 UtilsCloseUps
   446 RUN_UTILS DeleteFile c:\private\10283558\database\ups.db
   447 
   448 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini populate_client_00a
   449 RUN_TEST_STEP 100 TUPSInteg_2 UPSClientStep z:\tups\integ\scripts\tups_integ.ini populate_client_00b
   450 
   451 CONCURRENT
   452 RUN_TEST_STEP 100 TUPSInteg_1 UPSCoordinatorStep z:\tups\integ\scripts\tups_integ.ini dying_client_at_dialog_Coordinator
   453 RUN_TEST_STEP 100 TUPSInteg_minor DyingClient z:\tups\integ\scripts\tups_integ.ini dying_client_at_dialog
   454 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini check_client_00a
   455 RUN_TEST_STEP 100 TUPSInteg_2 UPSClientStep z:\tups\integ\scripts\tups_integ.ini check_client_00b
   456 CONSECUTIVE
   457 
   458 // Database Management Checks
   459 RUN_TEST_STEP 100 TUPSInteg_1 UPSDbManagementStep z:\tups\integ\scripts\tups_integ.ini client_dying_at_dialog_point_dbManagementCheck
   460 
   461 END_TESTCASE SEC-UPS-B009
   462 
   463 
   464 
   465 //! @SYMTestCaseID 	SEC-UPS-B010
   466 //! @SYMTestCaseDesc 	Multiple clients requesting multiple services in concurrent manner.
   467 //!                     (multiple_client_requests_concurrent)
   468 //!		
   469 //! @SYMPREQ 		PREQ1262
   470 //! @SYMREQ  		REQ7427 
   471 //!
   472 //! @SYMTestPriority 	Critical
   473 //! @SYMTestStatus   	Implemented
   474 //! @SYMTestActions 	Preconditions:
   475 //!			• As set in test assumptions section on detail description of this test.
   476 //!
   477 //!			Test Actions:
   478 //!			• Execute test actions as set in “tests sequence part 1” above.
   479 //!			• Execute test actions as set in “tests sequence part 2” above.
   480 //!			• Reset test clients and test system servers.
   481 //!			• Execute test actions as set in “tests sequence part 3” above.
   482 //!
   483 //! @SYMTestExpectedResults 	Test services are granted/denied accordingly as set in detail test description.
   484 //!
   485 //! @SYMTestType CIT
   486 
   487 START_TESTCASE SEC-UPS-B010
   488 
   489 // Delete Existing Database
   490 RUN_TEST_STEP 100 TUPSInteg_1 UtilsCloseUps
   491 RUN_UTILS DeleteFile c:\private\10283558\database\ups.db
   492 
   493 CONCURRENT
   494 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini concurrent_multiple_request_client1
   495 RUN_TEST_STEP 100 TUPSInteg_2 UPSClientStep z:\tups\integ\scripts\tups_integ.ini concurrent_multiple_request_client2
   496 RUN_TEST_STEP 100 TUPSInteg_3 UPSClientStep z:\tups\integ\scripts\tups_integ.ini concurrent_multiple_request_client3
   497 RUN_TEST_STEP 100 TUPSInteg_4 UPSClientStep z:\tups\integ\scripts\tups_integ.ini concurrent_multiple_request_client4
   498 CONSECUTIVE
   499 
   500 CONCURRENT
   501 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini concurrent_multiple_request_client1
   502 RUN_TEST_STEP 100 TUPSInteg_2 UPSClientStep z:\tups\integ\scripts\tups_integ.ini concurrent_multiple_request_client2
   503 RUN_TEST_STEP 100 TUPSInteg_3 UPSClientStep z:\tups\integ\scripts\tups_integ.ini concurrent_multiple_request_client3
   504 RUN_TEST_STEP 100 TUPSInteg_4 UPSClientStep z:\tups\integ\scripts\tups_integ.ini concurrent_multiple_request_client4
   505 CONSECUTIVE
   506 
   507 // Close and Reset UPS
   508 RUN_TEST_STEP 100 TUPSInteg_1 UtilsCloseUps
   509 
   510 CONCURRENT
   511 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini concurrent_multiple_request_client1
   512 RUN_TEST_STEP 100 TUPSInteg_2 UPSClientStep z:\tups\integ\scripts\tups_integ.ini concurrent_multiple_request_client2
   513 RUN_TEST_STEP 100 TUPSInteg_3 UPSClientStep z:\tups\integ\scripts\tups_integ.ini concurrent_multiple_request_client3
   514 RUN_TEST_STEP 100 TUPSInteg_4 UPSClientStep z:\tups\integ\scripts\tups_integ.ini concurrent_multiple_request_client4
   515 CONSECUTIVE
   516 
   517 RUN_TEST_STEP 100 TUPSInteg_1 UPSDbManagementStep z:\tups\integ\scripts\tups_integ.ini count_24
   518 
   519 END_TESTCASE SEC-UPS-B010
   520 
   521 
   522 //! @SYMTestCaseID 	SEC-UPS-B011
   523 //! @SYMTestCaseDesc 	Multiple clients requesting multiple services in non–concurrent manner.
   524 //!                     (multiple_client_requests_consecutive)
   525 //!		
   526 //! @SYMPREQ 		PREQ1262
   527 //! @SYMREQ  		REQ****
   528 //!
   529 //! @SYMTestPriority 	Critical
   530 //! @SYMTestStatus   	Implemented
   531 //! @SYMTestActions 	Preconditions:
   532 //!			• As set for test case SEC-UPS-B002C, but each test client and system server do not run concurrently 
   533 //!			with other tests clients. 
   534 //!
   535 //!			Test Actions:
   536 //!			• Execute test actions as set in “tests sequence part 1” on test case SEC-UPS-B010 above.
   537 //!			• Execute test actions as set in “tests sequence part 2” on test case SEC-UPS-B010 above.
   538 //!			• Reset test clients and test system servers.
   539 //!			• Execute test actions as set in “tests sequence part 3” on test case SEC-UPS-B010 above.
   540 //!
   541 //! @SYMTestExpectedResults 	Test services are granted/denied accordingly as set in detail test description for test case 
   542 //!				SEC-UPS-B010 above.	
   543 //!
   544 //! @SYMTestType CIT
   545 
   546 START_TESTCASE SEC-UPS-B011
   547 
   548 // Delete Existing Database
   549 RUN_TEST_STEP 100 TUPSInteg_1 UtilsCloseUps
   550 RUN_UTILS DeleteFile c:\private\10283558\database\ups.db
   551 
   552 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini multiple_request_client1_Part1
   553 RUN_TEST_STEP 100 TUPSInteg_2 UPSClientStep z:\tups\integ\scripts\tups_integ.ini multiple_request_client2_Part1
   554 RUN_TEST_STEP 100 TUPSInteg_3 UPSClientStep z:\tups\integ\scripts\tups_integ.ini multiple_request_client3_Part1
   555 RUN_TEST_STEP 100 TUPSInteg_4 UPSClientStep z:\tups\integ\scripts\tups_integ.ini multiple_request_client4
   556 
   557 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini multiple_request_client1_Part2
   558 RUN_TEST_STEP 100 TUPSInteg_2 UPSClientStep z:\tups\integ\scripts\tups_integ.ini multiple_request_client2_Part2
   559 RUN_TEST_STEP 100 TUPSInteg_3 UPSClientStep z:\tups\integ\scripts\tups_integ.ini multiple_request_client3_Part2
   560 RUN_TEST_STEP 100 TUPSInteg_4 UPSClientStep z:\tups\integ\scripts\tups_integ.ini multiple_request_client4
   561 
   562 // Close and Reset UPS
   563 RUN_TEST_STEP 100 TUPSInteg_1 UtilsCloseUps
   564 
   565 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini multiple_request_client1_Part2
   566 RUN_TEST_STEP 100 TUPSInteg_2 UPSClientStep z:\tups\integ\scripts\tups_integ.ini multiple_request_client2_Part2
   567 RUN_TEST_STEP 100 TUPSInteg_3 UPSClientStep z:\tups\integ\scripts\tups_integ.ini multiple_request_client3_Part2
   568 RUN_TEST_STEP 100 TUPSInteg_4 UPSClientStep z:\tups\integ\scripts\tups_integ.ini multiple_request_client4
   569 
   570 RUN_TEST_STEP 100 TUPSInteg_1 UPSDbManagementStep z:\tups\integ\scripts\tups_integ.ini count_24
   571 
   572 END_TESTCASE SEC-UPS-B011
   573 
   574 
   575 
   576 //! @SYMTestCaseID 	SEC-UPS-INTEG-B012
   577 //! @SYMTestCaseDesc 	Concurrent process can access service despite multiple unattended security dialogs.
   578 //!                     (Multiple_Unattended_Dialogs)
   579 //!		
   580 //! @SYMPREQ 		PREQ1262
   581 //! @SYMREQ  		REQ7427
   582 //!
   583 //! @SYMTestPriority 	Critical
   584 //! @SYMTestStatus   	Implemented
   585 //! @SYMTestActions 	Preconditions:
   586 //!			• There is an appropriate policy, policy evaluator and dialog creator that matches the UID of the service offered by the “system 
   587 //!			server”.
   588 //!
   589 //!			Test Actions:
   590 //!			• Launch 3 “test client” (A, B & C) which requests use of different system servers. Clients A & B should not have any decision 
   591 //!			related to it stored in DB, Clients C should have a decision “Always” stored in DB. Make sure that Client B is launched after 
   592 //!			security dialog is displayed for Client A. Make sure that request for security dialog for client B is made before client C is 
   593 //!			launched. 
   594 //!			• Do not act in the security dialog for Client A when this one is displayed.
   595 //!			• Check that Client C can access intended test service and UPS did issue a silent acceptance to system server from UPS for the 
   596 //!			request made for client C.
   597 //!			• Act now in security dialog for Client A, select “Never”.
   598 //!			• Check that Client A can NOT access intended test service.
   599 //!			• Act now in security dialog for Client B, select “Always”.
   600 //!			• Check that Client B can access intended test service.
   601 //!
   602 //! @SYMTestExpectedResults 	• Final check in Decision DB shows 4 decisions stored: “Always” for Clients B & C. “Never” for Client A.
   603 //!				• Accesses to service were granted for Clients B & C. 
   604 //!
   605 //! @SYMTestType CIT
   606 
   607 START_TESTCASE SEC-UPS-INTEG-B012
   608 
   609 // Delete Existing Database
   610 RUN_TEST_STEP 100 TUPSInteg_1 UtilsCloseUps
   611 RUN_UTILS DeleteFile c:\private\10283558\database\ups.db
   612 
   613 // Setup up the Database so that Client C has an 'Always' Decision stored
   614 RUN_TEST_STEP 100 TUPSInteg_3 UPSClientStep z:\tups\integ\scripts\tups_integ.ini Multiple_Unattended_Dialogs_ClientC_Setup
   615 
   616 // Run 3 concurrent clients with a Coordinator to ensure that the Clients are synchronised
   617 CONCURRENT
   618 RUN_TEST_STEP 100 TUPSInteg_1 UPSCoordinatorStep z:\tups\integ\scripts\tups_integ.ini Multiple_Unattended_Dialogs_Coordinator
   619 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini Multiple_Unattended_Dialogs_ClientA
   620 RUN_TEST_STEP 100 TUPSInteg_2 UPSClientStep z:\tups\integ\scripts\tups_integ.ini Multiple_Unattended_Dialogs_ClientB
   621 RUN_TEST_STEP 100 TUPSInteg_3 UPSClientStep z:\tups\integ\scripts\tups_integ.ini Multiple_Unattended_Dialogs_ClientC
   622 CONSECUTIVE
   623 
   624 // Database Management Checks
   625 RUN_TEST_STEP 100 TUPSInteg_1 UPSDbManagementStep z:\tups\integ\scripts\tups_integ.ini Multiple_Unattended_Dialogs_dbManagementcheck
   626 
   627 END_TESTCASE SEC-UPS-INTEG-B012
   628 
   629 
   630 //********************** SEC-UPS-C : DIALOG SERIALISATION SPECIFIC TESTS  **********************
   631 
   632 
   633 //! @SYMTestCaseID 	SEC-UPS-C001
   634 //! @SYMTestCaseDesc 	Dialog serialisation
   635 //!                     (Dialog_Serialisation)
   636 //!		
   637 //! @SYMPREQ 		PREQ1262
   638 //! @SYMREQ  		REQ7472
   639 //!
   640 //! @SYMTestPriority 	Critical
   641 //! @SYMTestStatus   	Implemented
   642 //! @SYMTestActions 	Preconditions:
   643 //!			• For each of the services There is an appropriate policy, policy evaluator and dialog creator that matches the UID of the service //!			offered by the “system server”.
   644 //!
   645 //!			Test Actions:
   646 //!			• Launch 3 “test client”  (A ,B & C) in turns, these Clients requests use of a system server.  System server should request prompt of //!			security dialog to UPS. Make sure that requests for the 3 security dialog are made before acting in the first dialog that is expected //!			to be displayed.
   647 //!			• For first security dialog to be displayed (client A) select “always”.
   648 //!			• Check that client A can access intended service.
   649 //!			• For second security dialog to be displayed (client B) select “only this session”.
   650 //!			• Check that client B can access intended service.
   651 //!			• For third security dialog to be displayed (client C) select “never”.
   652 //!			• Check that client C can NOT access intended service.
   653 //!			• Shut down clients and servers.
   654 //!			• Launch client A again, check that it can access test service and UPS is issuing silent acceptance.
   655 //!			• Launch client C again, check that it can access test service and UPS is issuing silent denial.
   656 //!
   657 //!
   658 //! @SYMTestExpectedResults 	• User prompt service dialogs are displayed correctly, and only 1 dialog at any time.
   659 //!				• Information displayed about the client is complete (see Appendix A).
   660 //!				• Clients A & C can access test service.
   661 //!				• Client B can not access test service.
   662 //!				•Decision DB is updated correctly with the Always decision. 
   663 //!
   664 //! @SYMTestType CIT
   665 
   666 START_TESTCASE SEC-UPS-C001
   667 
   668 // Delete Existing Database
   669 RUN_TEST_STEP 100 TUPSInteg_1 UtilsCloseUps
   670 RUN_UTILS DeleteFile c:\private\10283558\database\ups.db
   671 
   672 // Run 3 concurrent clients with a Coordinator to ensure that the Clients are synchronised
   673 CONCURRENT
   674 RUN_TEST_STEP 100 TUPSInteg_1 UPSCoordinatorStep z:\tups\integ\scripts\tups_integ.ini Dialog_Serialisation_Coordinator
   675 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini Dialog_Serialisation_clientA
   676 RUN_TEST_STEP 100 TUPSInteg_2 UPSClientStep z:\tups\integ\scripts\tups_integ.ini Dialog_Serialisation_clientB
   677 RUN_TEST_STEP 100 TUPSInteg_3 UPSClientStep z:\tups\integ\scripts\tups_integ.ini Dialog_Serialisation_clientC
   678 CONSECUTIVE
   679 
   680 // Silent acceptance checking for Client A
   681 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini Dialog_Serialisation_clientA_DecisionCheck
   682 
   683 // Silent denial checking for Client C
   684 RUN_TEST_STEP 100 TUPSInteg_3 UPSClientStep z:\tups\integ\scripts\tups_integ.ini Dialog_Serialisation_clientC_DecisionCheck
   685 
   686 // Database Management Checks
   687 RUN_TEST_STEP 100 TUPSInteg_1 UPSDbManagementStep z:\tups\integ\scripts\tups_integ.ini Dialog_Serialisation_dbManagementcheck
   688 
   689 END_TESTCASE SEC-UPS-C001
   690 
   691 
   692 //! @SYMTestCaseID 	SEC-UPS-INTEG-C005
   693 //! @SYMTestCaseDesc 	To ensure that a cancellation of a user prompt dialog (cancel button) does not affect 
   694 //!			adversatively the behaviour of the UPS.
   695 //!                     (single_dialog_cancellation)
   696 //!		
   697 //! @SYMPREQ 		PREQ1262
   698 //! @SYMREQ  		REQ7427 
   699 //!
   700 //! @SYMTestPriority 	Critical
   701 //! @SYMTestStatus   	Implemented
   702 //! @SYMTestActions 	Preconditions:
   703 //!			• There is an appropriate policy, policy evaluator and dialog creator that matches the UID of 		
   704 //!			the service offered by the “system server”.
   705 //!
   706 //!			Test Actions:
   707 //!			• Launch a “test client A” which requests use of a system server.
   708 //!			• System server asks for a user prompt to the UPS.
   709 //!			• When security dialog is displayed, cancel request made from system server to UPS, this should 
   710 //!			cause cancellation of notifier and therefore cancellation of security dialog.
   711 //!			• Close test client A.
   712 //!			• Launch test client B which tries to use the same test service.
   713 //!			• System server requests security dialog.
   714 //!			• When dialog is displayed select “always”
   715 //!			• Check that client B can use test service.
   716 //!
   717 //! @SYMTestExpectedResults
   718 //!                     • User prompt service dialogs is displayed correctly.
   719 //!			• Cancellation of security dialog does not cause UPS malfunction.
   720 //!			• Decision DB is upgraded with new decision for test client B.
   721 //!
   722 //! @SYMTestType CIT	 
   723 //!			 
   724 
   725 
   726 START_TESTCASE SEC-UPS-INTEG-C005
   727 
   728 // Delete Existing Database
   729 RUN_TEST_STEP 100 TUPSInteg_1 UtilsCloseUps
   730 RUN_UTILS DeleteFile c:\private\10283558\database\ups.db
   731 
   732 // Client A is run concurrently with a Coordinator so that the request can be cancelled once the Dialog Creator has been invoked
   733 CONCURRENT
   734 RUN_TEST_STEP 100 TUPSInteg_1 UPSCoordinatorStep z:\tups\integ\scripts\tups_integ.ini single_dialog_cancellation_Coordinator
   735 RUN_TEST_STEP 100 TUPSInteg_minor CancelPrompt z:\tups\integ\scripts\tups_integ.ini single_dialog_cancellation_ClientA
   736 CONSECUTIVE
   737 
   738 // Client B makes an attempt to access the same service as Client A
   739 RUN_TEST_STEP 100 TUPSInteg_minor SimpleRequest z:\tups\integ\scripts\tups_integ.ini single_dialog_cancellation_ClientB
   740 
   741 // Database Management Checks
   742 RUN_TEST_STEP 100 TUPSInteg_1 UPSDbManagementStep z:\tups\integ\scripts\tups_integ.ini single_dialog_cancellation_dbManagementCheck
   743 
   744 END_TESTCASE SEC-UPS-INTEG-C005
   745 
   746 
   747 
   748 //! @SYMTestCaseID 	SEC-UPS-INTEG-C006
   749 //! @SYMTestCaseDesc 	Cancellation of first dialog from a queue of pending security dialogs.
   750 //!                     (cancellation_first_dialog)
   751 //!		
   752 //! @SYMPREQ 		PREQ1262
   753 //! @SYMREQ  		REQ7431 REQ7432 
   754 //!
   755 //! @SYMTestPriority 	Critical
   756 //! @SYMTestStatus   	Implemented
   757 //! @SYMTestActions 	Preconditions:
   758 //!			• For each of the services there is an appropriate policy, policy evaluator and dialog creator that matches the UID of the service //!			offered by the “system server”.
   759 //!			
   760 //!			Test Actions:
   761 //!			• Launch 3 “test client” in turns (A,B & C), these Clients try to use of a test service in system server.
   762 //!			• Make sure system server has request security dialog for all clients before acting in any security dialog. 
   763 //!			• Once user prompt is displayed for client A, induce system server to cancel request to UPS for client A, this should cause security //!			dialog for client A to be removed from screen. 
   764 //!			• Security dialog for client B should appear on screen select “never” and check that application can NOT use intended service.
   765 //!			• Security dialog for client C should appear on screen select “always” and check that application can use intended service.
   766 //!
   767 //! @SYMTestExpectedResults • Decision DB is upgraded with new decisions for Clients B (“never”) and C (“always”) 
   768 //!			• UPS does not malfunction after cancellation of dialog for Client A.
   769 //!
   770 //! @SYMTestType CIT	 
   771 //!			 
   772 
   773 
   774 START_TESTCASE SEC-UPS-INTEG-C006
   775 
   776 // Delete Existing Database
   777 RUN_TEST_STEP 100 TUPSInteg_1 UtilsCloseUps
   778 RUN_UTILS DeleteFile c:\private\10283558\database\ups.db
   779 
   780 // Client A, B and C are run concurrently with a Coordinator so that the first dialog (Client A) can be cancelled once all of the service requests
   781 // have been invoked
   782 CONCURRENT
   783 RUN_TEST_STEP 100 TUPSInteg_1 UPSCoordinatorStep z:\tups\integ\scripts\tups_integ.ini cancellation_first_dialog_Coordinator
   784 RUN_TEST_STEP 100 TUPSInteg_minor CancelPrompt z:\tups\integ\scripts\tups_integ.ini cancellation_first_dialog_ClientA_cancel
   785 RUN_TEST_STEP 100 TUPSInteg_2 UPSClientStep z:\tups\integ\scripts\tups_integ.ini cancellation_first_dialog_ClientB
   786 RUN_TEST_STEP 100 TUPSInteg_3 UPSClientStep z:\tups\integ\scripts\tups_integ.ini cancellation_first_dialog_ClientC
   787 CONSECUTIVE
   788 
   789 // Database Management Checks
   790 RUN_TEST_STEP 100 TUPSInteg_1 UPSDbManagementStep z:\tups\integ\scripts\tups_integ.ini cancellation_first_dialog_dbManagementCheck
   791 
   792 END_TESTCASE SEC-UPS-INTEG-C006
   793 
   794 
   795 
   796 //! @SYMTestCaseID 	SEC-UPS-INTEG-C007
   797 //! @SYMTestCaseDesc 	Cancellation of last dialog from a queue of pending security dialogs.
   798 //!                     (cancellation_last_dialog)
   799 //!		
   800 //! @SYMPREQ 		PREQ1262
   801 //! @SYMREQ  		REQ7431 REQ7432 
   802 //!
   803 //! @SYMTestPriority 	Critical
   804 //! @SYMTestStatus   	Implemented
   805 //! @SYMTestActions 	Preconditions:
   806 //!			• For each of the services there is an appropriate policy, policy evaluator and dialog creator that matches the UID of the service //!			offered by the “system server”.
   807 //!
   808 //!			Test Actions:
   809 //!			• Launch 3 “test client” in turns (A, B & C), these Clients try to use of a test service in system server.
   810 //!			• Make sure system server has request security dialog for all clients before acting in any security dialog. 
   811 //!			• Security dialog for client A should appear on screen select “always” and check that application can use intended service.
   812 //!			• Security dialog for client B should appear on screen select “never” and check that application can NOT use intended service.
   813 //!			• Once user prompt is displayed for client C, induce system server to cancel request to UPS for client C, this should cause security //!			dialog for client C to be removed from screen. 
   814 //!			• In new session ask client A to try to access test service, UPS should grant silent acceptance and client A should have access to //!			test service.
   815 //!			• In new session ask client B to try to access test service, UPS should grant silent denial and client B should NOT  have access to //!			test service.
   816 //!	
   817 //! @SYMTestExpectedResults • Decision DB is upgraded with new decisions for Clients B (“never”) and 
   818 //!			      A (“always”).
   819 //!			    • UPS does not malfunction after cancellation of dialog for Client C.		
   820 //! @SYMTestType CIT
   821 //!	
   822 
   823 
   824 START_TESTCASE SEC-UPS-INTEG-C007
   825 
   826 // Delete Existing Database
   827 RUN_TEST_STEP 100 TUPSInteg_1 UtilsCloseUps
   828 RUN_UTILS DeleteFile c:\private\10283558\database\ups.db
   829 
   830 // Client A, B and C are run concurrently with a Coordinator so that the last dialog (Client C) can be cancelled once all of the service requests
   831 // have been invoked
   832 CONCURRENT
   833 RUN_TEST_STEP 100 TUPSInteg_1 UPSCoordinatorStep z:\tups\integ\scripts\tups_integ.ini cancellation_last_dialog_Coordinator
   834 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini cancellation_last_dialog_ClientA
   835 RUN_TEST_STEP 100 TUPSInteg_2 UPSClientStep z:\tups\integ\scripts\tups_integ.ini cancellation_last_dialog_ClientB
   836 RUN_TEST_STEP 100 TUPSInteg_minor CancelPrompt z:\tups\integ\scripts\tups_integ.ini cancellation_last_dialog_ClientC_cancel
   837 CONSECUTIVE
   838 
   839 // Database Management Checks
   840 RUN_TEST_STEP 100 TUPSInteg_1 UPSDbManagementStep z:\tups\integ\scripts\tups_integ.ini cancellation_last_dialog_dbManagementCheck
   841 
   842 END_TESTCASE SEC-UPS-INTEG-C007
   843 
   844 
   845 
   846 //! @SYMTestCaseID 	SEC-UPS-INTEG-C008
   847 //! @SYMTestCaseDesc 	Cancellation of middle position dialog from a queue of pending security dialogs.
   848 //!                     (cancellation_middle_dialog)
   849 //!		
   850 //! @SYMPREQ 		PREQ1262
   851 //! @SYMREQ  		REQ7431 REQ7432 
   852 //!
   853 //! @SYMTestPriority 	Critical
   854 //! @SYMTestStatus   	Implemented
   855 //! @SYMTestActions 	Preconditions:
   856 //!			• For each of the services there is an appropriate policy, policy evaluator and dialog creator that matches the UID of the service //!			offered by the “system server”.
   857 //!
   858 //!			Test Actions:
   859 //!			• Launch 3 “test client” in turns (A, B & C), these Clients try to use of a test service in system server.
   860 //!			• Make sure system server has request security dialog for all clients before acting in any security dialog. 
   861 //!			• Security dialog for client A should appear on screen select “always” and check that application can use intended service.
   862 //!			• Once user prompt is displayed for client B, induce system server to cancel request to UPS for client B, this should cause security //!			dialog for client B to be removed from screen. 
   863 //!			• Security dialog for client C should appear on screen select “Always” and check that client can use intended service.
   864 //!			• In new session ask client A to try to access test service, UPS should grant silent acceptance and client A should have access to //!			test service.
   865 //!			• In new session ask client C to try to access test service, UPS should grant silent acceptance and client B should have access to //!			test service.
   866 //!	
   867 //! @SYMTestExpectedResults • Decision DB is upgraded with 2 new “Always” decisions for Clients A & C.
   868 //!		            • UPS does not malfunction after cancellation of dialog for Client B.
   869 //!		
   870 //! @SYMTestType CIT	
   871 
   872 
   873 START_TESTCASE SEC-UPS-INTEG-C008
   874 
   875 // Delete Existing Database
   876 RUN_TEST_STEP 100 TUPSInteg_1 UtilsCloseUps
   877 RUN_UTILS DeleteFile c:\private\10283558\database\ups.db
   878 
   879 // Client A, B and C are run concurrently with a Coordinator so that the middle dialog (Client B) can be cancelled once all of the service requests
   880 // have been invoked
   881 CONCURRENT
   882 RUN_TEST_STEP 100 TUPSInteg_1 UPSCoordinatorStep z:\tups\integ\scripts\tups_integ.ini cancellation_middle_dialog_Coordinator
   883 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini cancellation_middle_dialog_ClientA
   884 RUN_TEST_STEP 100 TUPSInteg_minor CancelPrompt z:\tups\integ\scripts\tups_integ.ini cancellation_middle_dialog_ClientB_cancel
   885 RUN_TEST_STEP 100 TUPSInteg_3 UPSClientStep z:\tups\integ\scripts\tups_integ.ini cancellation_middle_dialog_ClientC
   886 CONSECUTIVE
   887 
   888 // Database Management Checks
   889 RUN_TEST_STEP 100 TUPSInteg_1 UPSDbManagementStep z:\tups\integ\scripts\tups_integ.ini cancellation_middle_dialog_dbManagementCheck
   890 
   891 END_TESTCASE SEC-UPS-INTEG-C008
   892 
   893 
   894 //! @SYMTestCaseID 	SEC-UPS-INTEG-C009
   895 //! @SYMTestCaseDesc 	Cancellation of request whilst Policy Evaluator is Generating Fingerprints
   896 //!                     (cancellation_during_fingerprint_generation)
   897 //!		
   898 //! @SYMPREQ 		PREQ1262
   899 //! @SYMREQ 		REQ7431 REQ7432 
   900 //!
   901 //! @SYMTestPriority	Critical
   902 //! @SYMTestStatus	Implemented
   903 //! @SYMTestActions	
   904 //!	Preconditions:
   905 //!		•  For each of the services there is an appropriate policy, policy evaluator and 
   906 //!		   dialog creator that matches the UID of the service offered by the “system server”.
   907 //!     Test Actions:
   908 //!            •  Launch 3 “test client” in turns (A, B & C), these Clients try to use of a test 
   909 //!               service in system server.
   910 //!	       •  Make sure system server has request security dialog for all clients to UPS before 
   911 //!		  acting in any security dialog. At this stage client A should be hold with security 
   912 //!		  dialog open (on display), client B need to be hold while its request is at 
   913 //!		  “GenerateFingerPrints” stage, client C can be hold at display queuing stage.
   914 //!	       •  Once all clients have reached stages described above cancel request from client B, 
   915 //!		  consecutively let other two clients requests (A & C) run normally to competition. 
   916 //!	       •  Check that request for A and C can be served normally by UPS.
   917 //!	       •  Check that request for client B received a “KerrCancel” from UPS.
   918 //!
   919 //! @SYMTestExpectedResults  •	Decisions for client A and C are correctly stored in decision DB.
   920 //!    			     •	No decision was stored for client B.
   921 //!			
   922 //! @SYMTestType CIT	 
   923 
   924 START_TESTCASE SEC-UPS-INTEG-C009
   925 
   926 // Delete Existing Database
   927 RUN_TEST_STEP 100 TUPSInteg_1 UtilsCloseUps
   928 RUN_UTILS DeleteFile c:\private\10283558\database\ups.db
   929 
   930 // Client A, B and C are run concurrently with a Coordinator so that the middle dialog (Client B) can be cancelled whilst the policy evaluator is generating 
   931 // fingerprints
   932 CONCURRENT
   933 RUN_TEST_STEP 100 TUPSInteg_1 UPSCoordinatorStep z:\tups\integ\scripts\tups_integ.ini cancellation_during_fingerprint_generation_Coordinator
   934 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini cancellation_during_fingerprint_generation_ClientA
   935 RUN_TEST_STEP 100 TUPSInteg_minor CancelPrompt z:\tups\integ\scripts\tups_integ.ini cancellation_during_fingerprint_generation_ClientB_cancel
   936 RUN_TEST_STEP 100 TUPSInteg_3 UPSClientStep z:\tups\integ\scripts\tups_integ.ini cancellation_during_fingerprint_generation_ClientC
   937 CONSECUTIVE
   938 
   939 // Database Management Checks
   940 RUN_TEST_STEP 100 TUPSInteg_1 UPSDbManagementStep z:\tups\integ\scripts\tups_integ.ini cancellation_during_fingerprint_generation_dbManagementCheck
   941 
   942 RUN_TEST_STEP 100 TUPSInteg_1 UPSDbManagementStep z:\tups\integ\scripts\tups_integ.ini count_2
   943 
   944 END_TESTCASE SEC-UPS-INTEG-C009
   945 
   946 
   947 //! @SYMTestCaseID 	SEC-UPS-INTEG-C010
   948 //! @SYMTestCaseDesc 	Cancellation of request whilst Dialog Creator is Preparing a Dialog
   949 //!                     (cancellation_during_prepare_dialog)
   950 //!		
   951 //! @SYMPREQ 		PREQ1262
   952 //! @SYMREQ 		REQ7431 REQ7432 
   953 //!
   954 //! @SYMTestPriority	Critical
   955 //! @SYMTestStatus	Implemented
   956 //! @SYMTestActions	
   957 //!	Preconditions:
   958 //!		•  For each of the services there is an appropriate policy, policy evaluator and 
   959 //!		   dialog creator that matches the UID of the service offered by the “system server”.
   960 //!     Test Actions:
   961 //!            •  Launch 3 “test client” in turns (A, B & C), these Clients try to use of a test 
   962 //!               service in system server.
   963 //!	       •  Make sure system server has request security dialog for all clients to UPS before 
   964 //!		  acting in any security dialog. At this stage client A should be hold with security 
   965 //!		  dialog open (on display), client B need to be hold while its request is at 
   966 //!		  “PrepareDialog” stage, client C can be hold at display queuing stage.
   967 //!	       •  Once all clients have reached stages described above cancel request from client B, 
   968 //!		  consecutively let other two clients requests (A & C) run normally to competition. 
   969 //!	       •  Check that request for A and C can be served normally by UPS.
   970 //!	       •  Check that request for client B received a “KerrCancel” from UPS.
   971 //!
   972 //! @SYMTestExpectedResults  •	Decisions for client A and C are correctly stored in decision DB.
   973 //!    			     •	No decision was stored for client B.
   974 //!			
   975 //! @SYMTestType CIT	 
   976 
   977 
   978 
   979 START_TESTCASE SEC-UPS-INTEG-C010
   980 
   981 // Delete Existing Database
   982 RUN_TEST_STEP 100 TUPSInteg_1 UtilsCloseUps
   983 RUN_UTILS DeleteFile c:\private\10283558\database\ups.db
   984 
   985 // Client A, B and C are run concurrently with a Coordinator so that the middle dialog (Client B) can be cancelled whilst the dialog creator is preparing
   986 // a dialog
   987 CONCURRENT
   988 RUN_TEST_STEP 100 TUPSInteg_1 UPSCoordinatorStep z:\tups\integ\scripts\tups_integ.ini cancellation_during_prepare_dialog_Coordinator
   989 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini cancellation_during_prepare_dialog_ClientA
   990 RUN_TEST_STEP 100 TUPSInteg_minor CancelPrompt z:\tups\integ\scripts\tups_integ.ini cancellation_during_prepare_dialog_ClientB_cancel
   991 RUN_TEST_STEP 100 TUPSInteg_3 UPSClientStep z:\tups\integ\scripts\tups_integ.ini cancellation_during_prepare_dialog_ClientC
   992 CONSECUTIVE
   993 
   994 // Database Management Checks
   995 RUN_TEST_STEP 100 TUPSInteg_1 UPSDbManagementStep z:\tups\integ\scripts\tups_integ.ini cancellation_during_prepare_dialog_dbManagementCheck
   996 
   997 RUN_TEST_STEP 100 TUPSInteg_1 UPSDbManagementStep z:\tups\integ\scripts\tups_integ.ini count_2
   998 
   999 END_TESTCASE SEC-UPS-INTEG-C010
  1000 
  1001 
  1002 //********************** SEC-UPS-D : DECISION DATABASE SPECIFIC TESTS  **********************
  1003 
  1004 
  1005 //! @SYMTestCaseID SEC-UPS-INTEG-D003
  1006 //! @SYMTestCaseDesc Deletion of decision DB after DB corruption
  1007 //!                  (BD_corruption)
  1008 //!		
  1009 //! @SYMPREQ PREQ1262
  1010 //! @SYMREQ REQ0
  1011 //!
  1012 //! @SYMTestPriority Critical
  1013 //! @SYMTestStatus   Implemented
  1014 //! @SYMTestActions 	Preconditions:
  1015 //!			• For each of the services there is an appropriate policy, policy evaluator and 
  1016 //!	   		  dialog creator that matches the UID of the service offered by the “system server”.
  1017 //!			
  1018 //!			Test Actions:
  1019 //!			• Launch 2 “test client” in turns (A & B) these Clients try to use of a system server.
  1020 //!			• System server asks for a user prompt to the UPS for each of the Clients.
  1021 //!			• For the first 2 test clients (A & B) select “Always” option. 
  1022 //!			• Check that “test client” A & B can now use the intended service from the system server. 
  1023 //!			• Close client, system servers and UPS
  1024 //!			• Change some bytes in decision DB file that will be interpreted as DB corruption. 
  1025 //!     		• Launch again test clients A & B,  as the decision DB is expected to have been deleted, 
  1026 //!	                  it is expected that 2 user prompts will be displayed again for A & B.
  1027 //!			• Select “Never” for A and “always” for B.
  1028 //!			• Check that A can access intended service and B can NOT.
  1029 //! @SYMTestExpectedResults • The decision DB is deleted after corruption and replaced with new one.
  1030 //!			    • A  new DB is created with “”Never” decision for client A and “Always” decision for client B. 
  1031 //!			    • Corruption of decision DB does not cause failure in UPS.
  1032 //! @SYMTestType CIT
  1033 
  1034 START_TESTCASE SEC-UPS-INTEG-D003
  1035 // First attempt of corruption
  1036 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini BD_corruption_adddecisions
  1037 RUN_TEST_STEP 100 TUPSInteg_1 UtilsCloseUps
  1038 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini BD_corruption_checkdecisions
  1039 RUN_TEST_STEP 100 TUPSInteg_1 UtilsCloseUps
  1040 // replaces database with corrupted database
  1041 RUN_UTILS CopyFile z:\tups\integ\corrupted_db_integ\ups_corrupted1.db c:\private\10283558\database\ups.db
  1042 RUN_UTILS MakeReadWrite c:\private\10283558\database\ups.db
  1043 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini BD_corruption_adddecisions
  1044 RUN_TEST_STEP 100 TUPSInteg_1 UtilsCloseUps
  1045 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini BD_corruption_checkdecisions
  1046 RUN_TEST_STEP 100 TUPSInteg_1 UtilsCloseUps
  1047 
  1048 // second attempt of corruption
  1049 RUN_UTILS DeleteFile c:\private\10283558\database\ups.db
  1050 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini BD_corruption_adddecisions
  1051 RUN_TEST_STEP 100 TUPSInteg_1 UtilsCloseUps
  1052 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini BD_corruption_checkdecisions
  1053 RUN_TEST_STEP 100 TUPSInteg_1 UtilsCloseUps
  1054 // replaces database with corrupted database
  1055 RUN_UTILS CopyFile z:\tups\integ\corrupted_db_integ\ups_corrupted2.db c:\private\10283558\database\ups.db
  1056 // The database file is deliberately left as read only (DEF122590).
  1057 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini BD_corruption_adddecisions
  1058 RUN_TEST_STEP 100 TUPSInteg_1 UtilsCloseUps
  1059 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini BD_corruption_checkdecisions
  1060 END_TESTCASE SEC-UPS-INTEG-D003
  1061 
  1062 
  1063 //! @SYMTestCaseID 	SEC-UPS-D004
  1064 //! @SYMTestCaseDesc 	Removal of single decision from DB by user operation. 
  1065 //!                     (remove_single_db_decision)
  1066 //!		
  1067 //! @SYMPREQ 		PREQ1262
  1068 //! @SYMREQ  		REQ7379
  1069 //!
  1070 //! @SYMTestPriority 	Critical
  1071 //! @SYMTestStatus   	Implemented
  1072 //! @SYMTestActions 	Preconditions:
  1073 //!			• For each of the services There is an appropriate policy, policy evaluator and dialog creator that matches the UID 	//!			of the service offered by the “system server”.
  1074 //!
  1075 //!			Test Actions:
  1076 //!			• Populate decision DB for 3 test clients (A, B, C) with “Never” decisions for 3 Clients.
  1077 //!			• Remove individual decision for Client B from DB using decision DB management API.  
  1078 //!			• Launch test clients (A, B, C) which should try to use service from system server. 
  1079 //!			• System server requests UPS for security for user security prompting, at this point UPS should give silent denial 	//!			for Client A & C, but should prompt user security dialog for Client B.  
  1080 //!			• Select “Always” for test client B when security dialog is displayed.
  1081 //!			• Check that Client B can now use the intended service.
  1082 //!
  1083 //! @SYMTestExpectedResults	• Only decision for test client B changes; final state of decision DB should show decisions for A & C as 
  1084 //!				“never”, decision for C as “Always”.
  1085 //!				• Test client B is granted access to intended service.
  1086 //!
  1087 //! @SYMTestType 	CIT
  1088 
  1089 
  1090 START_TESTCASE SEC-UPS-D004
  1091 
  1092 // Delete Existing Database
  1093 RUN_TEST_STEP 100 TUPSInteg_1 UtilsCloseUps
  1094 RUN_UTILS DeleteFile c:\private\10283558\database\ups.db
  1095 
  1096 // * STAGE 1 - CONSECUTIVE REMOVAL OF DECISIONS FROM DATABASE
  1097 
  1098 // Populate decisions in the database and close off sessions
  1099 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini remove_single_db_decision_setup_clientA
  1100 RUN_TEST_STEP 100 TUPSInteg_2 UPSClientStep z:\tups\integ\scripts\tups_integ.ini remove_single_db_decision_setup_clientB
  1101 RUN_TEST_STEP 100 TUPSInteg_3 UPSClientStep z:\tups\integ\scripts\tups_integ.ini remove_single_db_decision_setup_clientC
  1102 
  1103 // Initial check on the decisions for denial from UPS
  1104 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini remove_single_db_decision_initialCheck_clientA
  1105 RUN_TEST_STEP 100 TUPSInteg_2 UPSClientStep z:\tups\integ\scripts\tups_integ.ini remove_single_db_decision_initialCheck_clientB
  1106 RUN_TEST_STEP 100 TUPSInteg_3 UPSClientStep z:\tups\integ\scripts\tups_integ.ini remove_single_db_decision_initialCheck_clientC
  1107 
  1108 // Initial Database Management Record Check and Count
  1109 RUN_TEST_STEP 100 TUPSInteg_1 UPSDbManagementStep z:\tups\integ\scripts\tups_integ.ini remove_single_db_decision_initialDBCheck
  1110 
  1111 // Remove database decisions for client B using the UPS DB Management API
  1112 RUN_TEST_STEP 100 TUPSInteg_1 UPSDbManagementStep z:\tups\integ\scripts\tups_integ.ini remove_single_db_decision_removeDecision_clientB
  1113 
  1114 // UPS DB Management checking on records and Execute Decision Count
  1115 RUN_TEST_STEP 100 TUPSInteg_1 UPSDbManagementStep z:\tups\integ\scripts\tups_integ.ini remove_single_db_decision_postClientRemovalDBCheck
  1116 
  1117 // Remove database decisions for Policy Evaluator 2 using the UPS DB Management API
  1118 RUN_TEST_STEP 100 TUPSInteg_1 UPSDbManagementStep z:\tups\integ\scripts\tups_integ.ini remove_single_db_decision_removeDecision_evaluator2
  1119 
  1120 // UPS DB Management checking on records and Execute Decision Count
  1121 RUN_TEST_STEP 100 TUPSInteg_1 UPSDbManagementStep z:\tups\integ\scripts\tups_integ.ini remove_single_db_decision_postEvaluatorRemovalDBCheck
  1122 
  1123 // Relaunch clients checking that clients A & C requesting PE 1 or 3 return denials and others require a User Prompt of which
  1124 // Always is selected
  1125 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini remove_single_db_decision_checkAndRepopulate_clientA
  1126 RUN_TEST_STEP 100 TUPSInteg_2 UPSClientStep z:\tups\integ\scripts\tups_integ.ini remove_single_db_decision_checkAndRepopulate_clientB
  1127 RUN_TEST_STEP 100 TUPSInteg_3 UPSClientStep z:\tups\integ\scripts\tups_integ.ini remove_single_db_decision_checkAndRepopulate_clientC
  1128 
  1129 // Final check on the decisions from UPS
  1130 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini remove_single_db_decision_finalCheck_clientA
  1131 RUN_TEST_STEP 100 TUPSInteg_2 UPSClientStep z:\tups\integ\scripts\tups_integ.ini remove_single_db_decision_finalCheck_clientB
  1132 RUN_TEST_STEP 100 TUPSInteg_3 UPSClientStep z:\tups\integ\scripts\tups_integ.ini remove_single_db_decision_finalCheck_clientC
  1133 
  1134 // Final Stage of UPS DB Management checking on records and Execute Decision Count
  1135 RUN_TEST_STEP 100 TUPSInteg_1 UPSDbManagementStep z:\tups\integ\scripts\tups_integ.ini remove_single_db_decision_finalDBCheck
  1136 
  1137 
  1138 // * STAGE 2 - CONCURRENT OPERATIONS ON UPS WHILST REMOVING DECISIONS FROM DATABASE
  1139 
  1140 // Delete Existing Database
  1141 RUN_TEST_STEP 100 TUPSInteg_1 UtilsCloseUps
  1142 RUN_UTILS DeleteFile c:\private\10283558\database\ups.db
  1143 
  1144 // populate decision database with sample inital values.
  1145 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini populate_sample
  1146 RUN_TEST_STEP 100 TUPSInteg_2 UPSClientStep z:\tups\integ\scripts\tups_integ.ini populate_sample2
  1147 RUN_TEST_STEP 100 TUPSInteg_3 UPSClientStep z:\tups\integ\scripts\tups_integ.ini populate_sample2
  1148 
  1149 // Perform initial checking on sample decisions
  1150 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini check_sample
  1151 RUN_TEST_STEP 100 TUPSInteg_2 UPSClientStep z:\tups\integ\scripts\tups_integ.ini check_sample2
  1152 RUN_TEST_STEP 100 TUPSInteg_3 UPSClientStep z:\tups\integ\scripts\tups_integ.ini check_sample2
  1153 
  1154 // Concurrently check the decisions of clients B & C whilst remove select decisions from the Database for Client A
  1155 CONCURRENT
  1156 RUN_TEST_STEP 100 TUPSInteg_1 UPSDbManagementStep z:\tups\integ\scripts\tups_integ.ini remove_decisions_concurrent_clientA
  1157 RUN_TEST_STEP 100 TUPSInteg_2 UPSClientStep z:\tups\integ\scripts\tups_integ.ini check_sample2
  1158 RUN_TEST_STEP 100 TUPSInteg_3 UPSClientStep z:\tups\integ\scripts\tups_integ.ini check_sample2
  1159 CONSECUTIVE
  1160 
  1161 // UPS DB Management checking on records and Execute Decision Count
  1162 RUN_TEST_STEP 100 TUPSInteg_1 UPSDbManagementStep z:\tups\integ\scripts\tups_integ.ini remove_decisions_concurrent_dbCheck 
  1163 
  1164 END_TESTCASE SEC-UPS-D004
  1165 
  1166 
  1167 //********************** SEC-UPS-E : SECURITY POLICIES AND POLICY EVALUATOR PLUG-INS  **********************
  1168 //! @SYMTestCaseID SEC-UPS-INTEG-E001
  1169 //! @SYMTestCaseDesc To ensure that when a single bit is set in the “options” no security
  1170 //!		     dialog will be prompted to user. 
  1171 //!                  (single_bit_set)
  1172 //!		
  1173 //! @SYMPREQ PREQ1262
  1174 //! @SYMREQ REQ7391, REQ7392, REQ7433  
  1175 //! @SYMTestPriority Critical
  1176 //! @SYMTestStatus   Implemented
  1177 //! @SYMTestActions 	Test A: Set only ‘EYes’ bit to true in test policy for“test client”.
  1178 //!			Induce UPS invocation by using a “test client”
  1179 //!			Check if test client can access intended service.
  1180 //!		    	Test B:  Set only ‘ENo’ bit to true in test policy for“test client”.
  1181 //!			Induce UPS invocation by using a “test client”
  1182 //!			Check if test client can access intended service.
  1183 //! 		   	Test C: Set only ‘ESession’ bit to true in test policy for“test client”.
  1184 //!			Induce UPS invocation by using a “test client”
  1185 //!			Check if test client can access intended service.
  1186 //! 			Test D: Set only ‘EAlways’ bit to true in test policy for“test client”.
  1187 //!			Induce UPS invocation by using a “test client”
  1188 //!			Check if test client can access intended service.
  1189 //! 			Test E:	Set only ‘ENever’ bit to true in test policy for“test client”.
  1190 //!			Induce UPS invocation by using a “test client”
  1191 //!			Check if test client can access intended service.
  1192 //!
  1193 //! @SYMTestExpectedResults 	Only for tests A, C & D the test service will be able to access 
  1194 //!				intended service.
  1195 //!	 			For all of the tests (A to E), no decision is stored in decision DB.
  1196 //!				No security dialog is displayed (all decisions are silent).
  1197 //!
  1198 //! @SYMTestType CIT
  1199 //
  1200 START_TESTCASE SEC-UPS-INTEG-E001
  1201 RUN_TEST_STEP 100 TUPSInteg_2 UPSClientStep z:\tups\integ\scripts\tups_integ.ini single_bit_set
  1202 RUN_TEST_STEP 100 TUPSInteg_3 UPSClientStep z:\tups\integ\scripts\tups_integ.ini single_bit_set_b
  1203 END_TESTCASE SEC-UPS-INTEG-E001
  1204 
  1205 
  1206 //! @SYMTestCaseID SEC-UPS-INTEG-E002
  1207 //! @SYMTestCaseDesc To ensure that a default policy evaluator will be invoked if a service
  1208 //!                  requested do not match any existing policy in the phone 
  1209 //!                  (no_matching_policy)
  1210 //!		
  1211 //! @SYMPREQ PREQ1262
  1212 //! @SYMREQ REQ0
  1213 //! @SYMTestPriority Critical
  1214 //! @SYMTestStatus   Implemented
  1215 //! @SYMTestActions 	Preconditions: There is not matching policy for the test client to 
  1216 //!                     be used for this test case.
  1217 //!                     Test Actions:  
  1218 //!                     - Launch test client which tries to access test service, system server 
  1219 //!                     should invoke UPS.
  1220 //!             	- A “Yes” or “No” dialog should be displayed select “YES
  1221 //!			Check that access is granted to test service. 
  1222 //!			- Launch again same test client, a “Yes” or “Not” dialog should be displayed 
  1223 //!			select “No”. 
  1224 //!			- Check that access is NOT granted to test service. 
  1225 //!			- Launch again same test client, a “Yes” or “Not” dialog should be displayed 
  1226 //!                     select “Yes”. 
  1227 //!			-  Check that access is granted to test service. 
  1228 //!
  1229 //! @SYMTestExpectedResults 	Yes” or “No” dialog is displayed every time that test client 
  1230 //!				request service access.
  1231 //!
  1232 //! @SYMTestType CIT
  1233 //
  1234 START_TESTCASE SEC-UPS-INTEG-E002
  1235 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep Z:\tups\integ\scripts\tups_integ.ini no_matching_policy
  1236 END_TESTCASE SEC-UPS-INTEG-E002
  1237 
  1238 
  1239 //! @SYMTestCaseID SEC-UPS-INTEG-E004
  1240 //! @SYMTestCaseDesc To ensure that UPS will return an appropriate error if the policy 
  1241 //!                  evaluator set in the “policy evaluator” field is not present in the phone 
  1242 //!                  (missing_policy_evaluator)
  1243 //!		
  1244 //! @SYMPREQ PREQ1262
  1245 //! @SYMREQ REQ7444  
  1246 //! @SYMTestPriority Critical
  1247 //! @SYMTestStatus   Implemented
  1248 //! @SYMTestActions 	Preconditions there is an appropriate policy, policy evaluator
  1249 //!                    and dialog creator that matches the UID of the service offered by the 
  1250 //!                    “system server”. However the policy evaluator referred in the “policy 
  1251 //!                    evaluator UID field” is not present in the phone. 
  1252 //! 		       Actions:  Launch test client which tries to use test service, system server should invoke UPS.
  1253 //!                    UPS should return KErrUpsMissingPolicyEvaluator to system server.
  1254 //!
  1255 //! @SYMTestExpectedResults System server receives KErrUpsMissingPolicyEvaluator 
  1256 //!				and test client can not use intended service
  1257 //!
  1258 //! @SYMTestType CIT
  1259 //
  1260 START_TESTCASE SEC-UPS-INTEG-E004
  1261 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini missing_policy_evaluator
  1262 END_TESTCASE SEC-UPS-INTEG-E004
  1263 
  1264 
  1265 //! @SYMTestCaseID SEC-UPS-INTEG-E006
  1266 //! @SYMTestCaseDesc To ensure that UPS will return appropriate error if dialog creator referred 
  1267 //!                  by “Dialog creator UID” field in policy is not present in phone
  1268 //!                  (missing_dialog_creator)
  1269 //!		
  1270 //! @SYMPREQ PREQ1262
  1271 //! @SYMREQ REQ7444  
  1272 //! @SYMTestPriority Critical
  1273 //! @SYMTestStatus   Implemented
  1274 //! @SYMTestActions  preconditions There is an appropriate policy, policy evaluator that matches 
  1275 //!                  the UID of the service offered by the “system server”. However the dialog 
  1276 //!                  creator referred in the “Dialog creator UID field” is not present in the phone.
  1277 //!                  Launch test client which tries to access test service, system server should 
  1278 //!		     invoke UPS. Launch test client which tries to use test service, system server 
  1279 //!                  should invoke UPS.
  1280 //!
  1281 //! @SYMTestExpectedResults System server receives KErrUpsMissingDialogCreator
  1282 //!				and test client can not use intended service
  1283 //!
  1284 //! @SYMTestType CIT
  1285 //
  1286 START_TESTCASE SEC-UPS-INTEG-E006
  1287 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini missing_dialog_creator
  1288 END_TESTCASE SEC-UPS-INTEG-E006
  1289 
  1290 //! @SYMTestCaseID SEC-UPS-INTEG-E007
  1291 //! @SYMTestCaseDesc Matching destination by wild card, asterisk symbols – limited range.
  1292 //!                  (asterisk_limited)
  1293 //!		
  1294 //! @SYMPREQ PREQ1262
  1295 //! @SYMREQ REQ0
  1296 //!
  1297 //! @SYMTestPriority Critical
  1298 //! @SYMTestStatus   Implemented
  1299 //! @SYMTestActions 	Preconditions: 
  1300 //!			• There is an appropriate policy, policy evaluator and dialog creator 
  1301 //!			that matches the UID of the service offered by the “system server”. 
  1302 //!			The value for “destination” in policy file contains asterisk.
  1303 //!			Test Actions:  
  1304 //!			• Launch test client A which tries to access test service. The service 
  1305 //!			requested by this Client is a phone connection to a 0900 number. 
  1306 //!			(The policy associated to this service states that all 0900* should be 
  1307 //!			prompted for user decision)
  1308 //! 			• System server asks for a user prompt to the UPS.
  1309 //!			• When UPS prompts user, select the “Always” option. Check that Client 
  1310 //!			A can access intended service.
  1311 //!			• Launch Client A in a new session, check that Client A receives a silent 
  1312 //!			acceptance and can access the intended service.
  1313 //!			• Launch test client B which tries to access test service. The service 
  1314 //!			  requested by this Client is an internet connection to a “.RU” address. 
  1315 //!     		(The policy associated to this service states that all “.RU” addresses 
  1316 //!			should be blocked).
  1317 //!			• System server asks for a user prompt to the UPS.
  1318 //!			• UPS should reply with a silent denial. Check that Client B can not 
  1319 //!			access intended service.
  1320 //!
  1321 //! @SYMTestExpectedResults 	• An “Always” decision is stored in decision DB for Client A. 
  1322 //!				• Client A can access intended service.
  1323 //!				• No decision is stored for Client B in decision DB.
  1324 //!				• Client B can NOT access intended service.
  1325 //! @SYMTestType CIT
  1326 
  1327 START_TESTCASE SEC-UPS-INTEG-E007
  1328 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini asterisk_limited
  1329 END_TESTCASE SEC-UPS-INTEG-E007
  1330 
  1331 
  1332 //! @SYMTestCaseID SEC-UPS-INTEG-E008
  1333 //! @SYMTestCaseDesc Matching destination by wild card, asterisk symbols – All option.
  1334 //!                  (asterisk_all)
  1335 //!		
  1336 //! @SYMPREQ PREQ1262
  1337 //! @SYMREQ REQ0
  1338 //!
  1339 //! @SYMTestPriority Critical
  1340 //! @SYMTestStatus   Implemented
  1341 //! @SYMTestActions 	Preconditions: 
  1342 //!			•  There is an appropriate policy, policy evaluator and dialog creator
  1343 //!			  that matches the UID of the service offered by the “system server”. 
  1344 //!			  The value for “destination” in policy file contains asterisk.
  1345 //!			Test Actions:  
  1346 //!			• Launch test client A with which tries to access test service. 
  1347 //!			The service requested by this Client is a phone connection to a 0500 number. 
  1348 //!			(The policy associated to this service states that all destinations should be prompted 
  1349 //!			for user decision, “*” in destination)
  1350 //!			• System server asks for a user prompt to the UPS.
  1351 //!			• When UPS prompts user, select the “Always” option. Check that Client A can 
  1352 //!			  access intended service.
  1353 //!			• Launch Client A in a new session, check that Client A receives a silent acceptance 
  1354 //!			  and can access the intended service.
  1355 //!			• Launch test client B which tries to access test service. The service requested by this 
  1356 //!			  Client is an internet connection to a “.RU” address. (The policy associated to this service 
  1357 //!			  states that all “.RU” addresses should be blocked).
  1358 //!			• System server asks for a user prompt to the UPS.
  1359 //!			• UPS should reply with a silent denial. Check that Client B can not access intended service.
  1360 //!
  1361 //!
  1362 //! @SYMTestExpectedResults 	• An “Always” decision is stored in decision DB for Client A. 
  1363 //!				• Client A can access intended service.
  1364 //!				• No decision is stored for Client B in decision DB.
  1365 //!				• Client B can NOT access intended service.
  1366 //! @SYMTestType CIT
  1367 
  1368 START_TESTCASE SEC-UPS-INTEG-E008
  1369 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini asterisk_all
  1370 RUN_TEST_STEP 100 TUPSInteg_2 UPSClientStep z:\tups\integ\scripts\tups_integ.ini asterisk_all_b
  1371 END_TESTCASE SEC-UPS-INTEG-E008
  1372 
  1373 
  1374 //! @SYMTestCaseID SEC-UPS-INTEG-E009
  1375 //! @SYMTestCaseDesc 	Matching destination by wild card, question mark symbols.
  1376 //!                     (question_mark_card)
  1377 //!		
  1378 //! @SYMPREQ PREQ1262
  1379 //! @SYMREQ REQ0
  1380 //!
  1381 //! @SYMTestPriority Critical
  1382 //! @SYMTestStatus   Implemented
  1383 //! @SYMTestActions 	Preconditions: 
  1384 //!			• There is an appropriate policy, policy evaluator and dialog creator that 
  1385 //!                       matches the UID of the service offered by the “system server”. The value 
  1386 //!			  for “destination” in policy file contains question mark symbols.
  1387 //!			Test Actions: 
  1388 //!			• Launch test client A which tries to access test service. The service requested
  1389 //!			  by this Client is a phone connection to a 0900 number. (The policy associated to 
  1390 //!			  this service states that all 0?00 should be prompted for user decision)
  1391 //!			• System server asks for a user prompt to the UPS.
  1392 //!			• When UPS prompts user, select the “Always” option. Check that Client A can access
  1393 //!		          intended service.
  1394 //!			• Launch Client A in a new session, check that Client A receives a silent acceptance 
  1395 //!			  and can access the intended service.
  1396 //!			• Launch test client B which tries to access test service. The service requested by 
  1397 //!			  this Client is an phone call to 118 500. (The policy associated to this service states 
  1398 //!			  that all 118??? Phone numbers should be blocked).
  1399 //!			• System server asks for a user prompt to the UPS.
  1400 //!			• UPS should reply with a silent denial. Check that Client B can not access intended 
  1401 //!			  service.
  1402 //!			
  1403 //!
  1404 //! @SYMTestExpectedResults 	• An “Always” decision is stored in decision DB for Client A. 
  1405 //!				• Client A can access intended service.
  1406 //!                             • No decision is stored for Client B in decision DB.
  1407 //!				• Client B can NOT access intended service.
  1408 //! @SYMTestType CIT
  1409 
  1410 START_TESTCASE SEC-UPS-INTEG-E009
  1411 RUN_TEST_STEP 100 TUPSInteg_2 UPSClientStep z:\tups\integ\scripts\tups_integ.ini question_mark_card
  1412 END_TESTCASE SEC-UPS-INTEG-E009
  1413 
  1414 
  1415 //! @SYMTestCaseID SEC-INTEG-UPS-E024
  1416 //! @SYMTestCaseDesc Security Policy Authorisation - EAlwaysCheck  
  1417 //!                  (alwayscheck_authoristion)
  1418 //!		
  1419 //! @SYMPREQ PREQ1262
  1420 //! @SYMREQ REQ7389
  1421 //! @SYMTestPriority Critical
  1422 //! @SYMTestStatus   Implemented
  1423 //! @SYMTestActions  
  1424 //!		Preconditions:
  1425 //!		• Policy file related to test service to be used has property “authorisationPolicy” set
  1426 //!		  to “EAlwaysCheck”.
  1427 //!		Test Actions:
  1428 //!		    •  Request use of the service that matches policy file mentioned in “preconditions”. 
  1429 //!		       Test system server should invoke UPS.
  1430 //!		    •  Use different values for “aServerCheckOk” parameter in “Authorise” methods (ETrue 
  1431 //!		       and EFalse)
  1432 //!	            •  Check that UPS invokes correct policy evaluator and dialog creator as set in policy 
  1433 //!		       file. 
  1434 //!
  1435 //! @SYMTestExpectedResults  
  1436 //!	            • All new requests made to UPS for test service will cause a user prompt from UPS.   
  1437 //!
  1438 //! @SYMTestType CIT
  1439 
  1440 START_TESTCASE SEC-INTEG-UPS-E024
  1441 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini alwayscheck_platsec_true
  1442 
  1443 // Delete Existing Database
  1444 RUN_TEST_STEP 100 TUPSInteg_1 UtilsCloseUps
  1445 RUN_UTILS DeleteFile c:\private\10283558\database\ups.db
  1446 
  1447 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini alwayscheck_platsec_false
  1448 END_TESTCASE SEC-INTEG-UPS-E024
  1449 
  1450 
  1451 //! @SYMTestCaseID SEC-INTEG-UPS-E025
  1452 //! @SYMTestCaseDesc Security Policy Authorisation - ECheckPostManufacture  
  1453 //!                  (checkpostmanufacture_authoristion)
  1454 //!		
  1455 //! @SYMPREQ PREQ1262
  1456 //! @SYMREQ REQ7389
  1457 //! @SYMTestPriority Critical
  1458 //! @SYMTestStatus   Implemented
  1459 //! @SYMTestActions  Preconditions:
  1460 //!			• Policy file related to test service to be used has property “authorisationPolicy” 
  1461 //!	                  set to “ECheckPostManufacture”.
  1462 //!		     Test Actions:  
  1463 //!			• Request use of the service that matches policy file mentioned in “preconditions”. 
  1464 //!			  Test system server should invoke UPS.
  1465 //!			• Use different values for “aServerCheckOk” parameter in “Authorise” methods (ETrue 
  1466 //!			  and EFalse).
  1467 //!			• Use different types of applications to request the same service including: applications
  1468 //!			  with protected SID on Z drive, unprotected SID on Z drive, protected SID on C drive and 
  1469 //!			  unprotected SID on C drive.  
  1470 //!
  1471 //! @SYMTestExpectedResults  Only requests made from applications with protected SID running from Z drive having 
  1472 //!			     passed system server checks should receive immediate access approval, any other type 
  1473 //!			     should cause a security user prompt. 
  1474 //!
  1475 //! @SYMTestType CIT
  1476 
  1477 START_TESTCASE SEC-INTEG-UPS-E025
  1478 
  1479 // Delete Existing Database
  1480 RUN_TEST_STEP 100 TUPSInteg_1 UtilsCloseUps
  1481 RUN_UTILS DeleteFile c:\private\10283558\database\ups.db
  1482 
  1483 // CLIENT WITH PROTECTED SID ON Z
  1484 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini checkpostmanufacture_platsec_true_zdrive_protect
  1485 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini checkpostmanufacture_platsec_false_zdrive_protect
  1486 
  1487 
  1488 // CLIENT WITH UNPROTECTED SID ON Z
  1489 RUN_TEST_STEP 100 TUPSInteg_unprotected UPSClientStep z:\tups\integ\scripts\tups_integ.ini checkpostmanufacture_platsec_true_zdrive_unprotect
  1490 RUN_TEST_STEP 100 TUPSInteg_unprotected UPSClientStep z:\tups\integ\scripts\tups_integ.ini checkpostmanufacture_platsec_false_zdrive_unprotect
  1491 
  1492 
  1493 // CLIENT WITH PROTECTED SID ON C
  1494 RUN_TEST_STEP 100 TUPSInteg_4 UPSClientStep z:\tups\integ\scripts\tups_integ.ini checkpostmanufacture_platsec_true_cdrive_protect
  1495 
  1496 // Delete Existing Database
  1497 RUN_TEST_STEP 100 TUPSInteg_1 UtilsCloseUps
  1498 RUN_UTILS DeleteFile c:\private\10283558\database\ups.db
  1499 
  1500 RUN_TEST_STEP 100 TUPSInteg_4 UPSClientStep z:\tups\integ\scripts\tups_integ.ini checkpostmanufacture_platsec_false_cdrive_protect
  1501 
  1502 
  1503 // CLIENT WITH UNPROTECTED SID ON C
  1504 RUN_TEST_STEP 100 TUPSInteg_2 UPSClientStep z:\tups\integ\scripts\tups_integ.ini checkpostmanufacture_platsec_true_cdrive_unprotect
  1505 RUN_TEST_STEP 100 TUPSInteg_2 UPSClientStep z:\tups\integ\scripts\tups_integ.ini checkpostmanufacture_platsec_false_cdrive_unprotect
  1506 
  1507 END_TESTCASE SEC-INTEG-UPS-E025
  1508 
  1509 
  1510 //! @SYMTestCaseID SEC-INTEG-UPS-E026
  1511 //! @SYMTestCaseDesc Security Policy Authorisation - ECheckUnprotectedSids
  1512 //!                  (checkunprotectedsids_authoristion)
  1513 //!		
  1514 //! @SYMPREQ PREQ1262
  1515 //! @SYMREQ REQ7389
  1516 //! @SYMTestPriority Critical
  1517 //! @SYMTestStatus   Implemented
  1518 //! @SYMTestActions  
  1519 //!      Preconditions:
  1520 //!	   •  Policy file related to test service to be used has property “authorisationPolicy” 
  1521 //!	      set to “ECheckUnprotectedSids”.
  1522 //!	 Test Actions: 
  1523 //!	   •  Request use of the service that matches policy file mentioned in “preconditions”. 
  1524 //!	      Test system server should invoke UPS.
  1525 //!	   •  Use different values for “aServerCheckOk” parameter in “Authorise” methods (ETrue 
  1526 //!	      and EFalse).
  1527 //! 	   •  Use different types of applications to request the same service including: 
  1528 //!	      applications with protected SID on Z drive, unprotected SID on Z drive, protected 
  1529 //!	      SID on C drive and unprotected SID on C drive. 
  1530 //!
  1531 //! @SYMTestExpectedResults  
  1532 //!        • Any request for tests services made from clients with protected SID should receive 
  1533 //!	     immediate silent approval from UPS.
  1534 //!	   • Request for tests services made from clients with unprotected SID should cause user 
  1535 //!	     security dialog from UPS.
  1536 //!
  1537 //! @SYMTestType CIT
  1538 
  1539 START_TESTCASE SEC-INTEG-UPS-E026
  1540 
  1541 // Delete Existing Database
  1542 RUN_TEST_STEP 100 TUPSInteg_1 UtilsCloseUps
  1543 RUN_UTILS DeleteFile c:\private\10283558\database\ups.db
  1544 
  1545 // CLIENT WITH PROTECTED SID ON Z
  1546 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini checkunprotectedsids_platsec_true_zdrive_protect
  1547 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini checkunprotectedsids_platsec_false_zdrive_protect
  1548 
  1549 // CLIENT WITH UNPROTECTED SID ON Z
  1550 RUN_TEST_STEP 100 TUPSInteg_unprotected UPSClientStep z:\tups\integ\scripts\tups_integ.ini checkunprotectedsids_platsec_true_zdrive_unprotect
  1551 RUN_TEST_STEP 100 TUPSInteg_unprotected UPSClientStep z:\tups\integ\scripts\tups_integ.ini checkunprotectedsids_platsec_false_zdrive_unprotect
  1552 
  1553 // CLIENT WITH PROTECTED SID ON C
  1554 RUN_TEST_STEP 100 TUPSInteg_4 UPSClientStep z:\tups\integ\scripts\tups_integ.ini checkunprotectedsids_platsec_true_cdrive_protect
  1555 RUN_TEST_STEP 100 TUPSInteg_4 UPSClientStep z:\tups\integ\scripts\tups_integ.ini checkunprotectedsids_platsec_false_cdrive_protect
  1556 
  1557 // CLIENT WITH UNPROTECTED SID ON C
  1558 RUN_TEST_STEP 100 TUPSInteg_2 UPSClientStep z:\tups\integ\scripts\tups_integ.ini checkunprotectedsids_platsec_true_cdrive_unprotect
  1559 RUN_TEST_STEP 100 TUPSInteg_2 UPSClientStep z:\tups\integ\scripts\tups_integ.ini checkunprotectedsids_platsec_false_cdrive_unprotect
  1560 
  1561 END_TESTCASE SEC-INTEG-UPS-E026
  1562 
  1563 
  1564 //! @SYMTestCaseID SEC-INTEG-UPS-E027
  1565 //! @SYMTestCaseDesc Security Policy Authorisation - ECheckIfFailed 
  1566 //!                  (checkiffailed_authoristion)
  1567 //!		
  1568 //! @SYMPREQ PREQ1262
  1569 //! @SYMREQ REQ7389
  1570 //! @SYMTestPriority Critical
  1571 //! @SYMTestStatus   Implemented
  1572 //! @SYMTestActions  
  1573 //!		Preconditions:
  1574 //!		• Policy file related to test service to be used has property 
  1575 //!		“authorisationPolicy” set to “ECheckIfFailed”.
  1576 //!		Test Actions:     
  1577 //!		• Request use of the service that matches policy file mentioned in 
  1578 //!		  “preconditions”. Test system server should invoke UPS.
  1579 //!		• Use different values for “aServerCheckOk” parameter in “Authorise” 
  1580 //!		  request (ETrue and EFalse).
  1581 //! @SYMTestExpectedResults  
  1582 //!		• Only requests made with “aServerCheckOk” parameter set to Efalse should cause
  1583 //!		  UPS to display user security dialog, otherwise UPS should return silent approval. 
  1584 //!
  1585 //! @SYMTestType CIT
  1586 
  1587 START_TESTCASE SEC-INTEG-UPS-E027
  1588 
  1589 // Delete Existing Database
  1590 RUN_TEST_STEP 100 TUPSInteg_1 UtilsCloseUps
  1591 RUN_UTILS DeleteFile c:\private\10283558\database\ups.db
  1592 
  1593 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini checkiffailed_platsec_true
  1594 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini checkiffailed_platsec_false
  1595 END_TESTCASE SEC-INTEG-UPS-E027
  1596 
  1597 
  1598 //! @SYMTestCaseID SEC-INTEG-UPS-E028
  1599 //! @SYMTestCaseDesc Security Policy Authorisation - ENeverCheck 
  1600 //!                  (nevercheck_authoristion)
  1601 //!		
  1602 //! @SYMPREQ PREQ1262
  1603 //! @SYMREQ REQ7389
  1604 //! @SYMTestPriority Critical
  1605 //! @SYMTestStatus   Implemented
  1606 //! @SYMTestActions  
  1607 //!    Preconditions:
  1608 //!    •  Policy file related to test service to be used has property “authorisationPolicy” set 
  1609 //!	  to “ENeverCheck”.
  1610 //!   Test Actions: 
  1611 //!    •  Request use of the service that matches policy file mentioned in “preconditions”. Test 
  1612 //!	  system server should invoke UPS.
  1613 //!    •  Use different values for “aServerCheckOk” parameter in “Authorise” request (ETrue and 
  1614 //!	  EFalse).
  1615 //!
  1616 //! @SYMTestExpectedResults  
  1617 //!    •  UPS shouldn’t display any security dialog, UPS should return silent acceptance server 
  1618 //!	  checks passed, UPS should return silent denial server checks failed.  
  1619 //!
  1620 //! @SYMTestType CIT
  1621 
  1622 START_TESTCASE SEC-INTEG-UPS-E028
  1623 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini nevercheck_platsec_true
  1624 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini nevercheck_platsec_false
  1625 END_TESTCASE SEC-INTEG-UPS-E028
  1626 
  1627 
  1628 //! @SYMTestCaseID SEC-INTEG-UPS-E029
  1629 //! @SYMTestCaseDesc System server with no policy files        
  1630 //!                  (no_policy_files_server)
  1631 //!		
  1632 //! @SYMPREQ PREQ1262
  1633 //! @SYMREQ REQ7427
  1634 //!
  1635 //! @SYMTestPriority Critical
  1636 //! @SYMTestStatus   Implemented
  1637 //! @SYMTestActions 	Preconditions:
  1638 //!			• There is NO policy file at all related to the system server been used for test purpose
  1639 //!
  1640 //!			Test Actions:
  1641 //!			• Launch “test clients” which tries to use of system servers. System server should request UPS for
  1642 //!			  user security dialog. Set plat sec check to ETrue in request to UPS.
  1643 //!			• Launch “test clients” which tries to use of system servers. System server should request UPS for
  1644 //!			  user security dialog. Set plat sec check to EFalse in request to UPS. 
  1645 //!
  1646 //! @SYMTestExpectedResults 	• System server shuold receive a EDecisionYes for first request 
  1647 //!				• System server shuold receive a EDecisionNo for second request 
  1648 //!
  1649 //! @SYMTestType CIT
  1650 
  1651 START_TESTCASE SEC-INTEG-UPS-E029
  1652 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini no_policy_files_server
  1653 END_TESTCASE SEC-INTEG-UPS-E029
  1654 
  1655 
  1656 //! @SYMTestCaseID SEC-INTEG-UPS-E030
  1657 //! @SYMTestCaseDesc Option session returned for always decision stored.
  1658 //!                  (session_overwrites_always)
  1659 //!       
  1660 //!
  1661 //! @SYMTestPurpose  To check that if a policy includes the “session” option for an “always” decision already stored,
  1662 //!                  then UPS will reply with “ESession” every time this decision is queried		
  1663 //!
  1664 //! @SYMPREQ 
  1665 //!
  1666 //! @SYMTestPriority Critical
  1667 //! @SYMTestStatus   Implemented
  1668 //! @SYMTestActions 	Preconditions:
  1669 //!			• The UPS policy stated for the test service to be used allows at least the options “ESession” 
  1670 //!			  and “EAlways”
  1671 //!
  1672 //!			Test Actions:
  1673 //!			• Launch “test client” which tries to connect to a system server and use service.
  1674 //!			• System server asks for a user prompt to the UPS.
  1675 //!			• When UPS prompts user, select the “Always” option.
  1676 //!			• Check that UPS returned “ESession” to system server.
  1677 //!			• In a new session request the same service and destination, check that UPS returns an “ESession” 
  1678 //!			  silent reply to system server. Check that the correct policy evaluator was invoked but no dialog 
  1679 //!			  creator was invoked.
  1680 //!
  1681 //!
  1682 //! @SYMTestExpectedResults 	• UPS returns “ESession” even if an “Always” decision was selected by the use.
  1683 //!				• A new “Always” decision was added to decision DB.
  1684 //!
  1685 //! @SYMTestType CIT
  1686 
  1687 START_TESTCASE SEC-INTEG-UPS-E030
  1688 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini session_overwrites_always
  1689 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini session_overwrites_always_b
  1690 END_TESTCASE SEC-INTEG-UPS-E030
  1691 
  1692 
  1693 //! @SYMTestCaseID 	SEC-UPS-E031
  1694 //! @SYMTestCaseDesc 	To check that UPS can handle client entities of a max length of 32 bytes
  1695 //!                     (client_entity)
  1696 //!		
  1697 //! @SYMPREQ 		PREQ1262
  1698 //! @SYMREQ  		REQ7374
  1699 //!
  1700 //! @SYMTestPriority 	Critical
  1701 //! @SYMTestStatus   	Implemented
  1702 //! @SYMTestActions 	Preconditions:
  1703 //!			• Policy evaluator used for test can populate “CClientEntity” object at will.
  1704 //!			• Appropriate policy file, policy evaluator and dialog creator are present in phone for test service 
  1705 //!			to be requested
  1706 //!			
  1707 //!			Test Actions:                
  1708 //!			• Make request to ups for security user prompt for some arbitrary destinations. For these destination
  1709 //!			instruct policy evaluator to create different CClientEntity lengths including:
  1710 //!			- 0 bytes.
  1711 //!			- 1 bytes.
  1712 //!			- 32 bytes.
  1713 //!			- 33 bytes.
  1714 //!
  1715 //!			• For the previous requests select “Always” or “Never” when security dialog is displayed.
  1716 //!
  1717 //! @SYMTestExpectedResults	• For client entities of length 0, 1 or 32 bytes a corresponding decision is expected to be 
  1718 //!				created in decision database. The client entity value is reported correctly in DB.
  1719 //!				
  1720 //!				• For CClientEntity of 33 bytes length, the constructor is expected to return 
  1721 //!				KErrUpsBadClientEntityLength and no decision is created in database.
  1722 //!
  1723 //! @SYMTestType 	CIT
  1724 
  1725 START_TESTCASE SEC-UPS-E031
  1726 
  1727 // Delete Existing Database
  1728 RUN_TEST_STEP 100 TUPSInteg_1 UtilsCloseUps
  1729 RUN_UTILS DeleteFile c:\private\10283558\database\ups.db
  1730 
  1731 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini client_Entity
  1732 
  1733 END_TESTCASE SEC-UPS-E031
  1734 
  1735 
  1736 //! @SYMTestCaseID 	SEC-UPS-E032
  1737 //! @SYMTestCaseDesc 	Force prompt – decision removed
  1738 //!                     (force_prompt_decision_removed)
  1739 //!		
  1740 //! @SYMPREQ 		PREQ1262
  1741 //! @SYMREQ  		REQ0
  1742 //!
  1743 //! @SYMTestPriority 	Critical
  1744 //! @SYMTestStatus   	Implemented
  1745 //! @SYMTestActions 	Preconditions:
  1746 //!			• There is an appropriate policy file for the test service to be use. 
  1747 //!			• Policy evaluator has the ability to force prompt at run time. Policy evaluator increases by 
  1748 //!			one the value of “evaluator info” every time that a security dialog is prompted for a particular 
  1749 //!			decision in the DB.
  1750 //!
  1751 //!			Test Actions:                
  1752 //!			• Part 1: Test client A has two pre-stored decision as “Always”. 
  1753 //!			• Instruct client A to request access to test service that matches its pre-stored decisions,
  1754 //!			instruct policy evaluator to force prompt new security dialog for these decisions.
  1755 //!			• When new security dialogs appear select “yes” for one of the pre-stored decisions and select 
  1756 //!			“no” for the other decision”.
  1757 //!			• Check that both pre-stored decision for client A were removed from DB. 
  1758 //!
  1759 //!			• Part 2: Test client B has two pre-stored decision as “Never”. 
  1760 //!			• Instruct client B to request access to test service that matches its pre-stored decisions, 
  1761 //!			instruct policy evaluator to force prompt new security dialog for these decisions.
  1762 //!			• When new security dialogs appear select “yes” for one of the pre-stored decisions and select 
  1763 //!			“no” for the other decision”.
  1764 //!			• Check that both pre-stored decision for client B were removed from DB. 
  1765 //!
  1766 //! @SYMTestExpectedResults	• Decisions in database where updated correctly in DB.
  1767 //!				• “client info” field was increased by two at the end of test. 
  1768 //!
  1769 //! @SYMTestType 	CIT
  1770 
  1771 
  1772 START_TESTCASE SEC-UPS-E032
  1773 
  1774 //* PART 1
  1775 
  1776 // Delete Existing Database
  1777 RUN_TEST_STEP 100 TUPSInteg_1 UtilsCloseUps
  1778 RUN_UTILS DeleteFile c:\private\10283558\database\ups.db
  1779 
  1780 // Client A setup of pre-stored decisions
  1781 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini force_prompt_decision_removed_clientA_setup
  1782 
  1783 // Initial check to ensure that DB decision acceptance is issued by UPS  
  1784 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini force_prompt_decision_removed_clientA_initialCheck
  1785 
  1786 // Check decision database state before force prompting
  1787 RUN_TEST_STEP 100 TUPSInteg_1 UPSDbManagementStep z:\tups\integ\scripts\tups_integ.ini force_prompt_decision_removed_clientA_intitalDbCheck
  1788 
  1789 // Force the dialog prompt on the Decisions stored about Client A in the Database
  1790 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini force_prompt_decision_removed_clientA_forcePrompt
  1791 
  1792 // Check that decisions have been removed and that new options can be chosen
  1793 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini force_prompt_decision_removed_clientA_noDecisionCheck
  1794 
  1795 // Check for No Decisions using Database Management Step
  1796 RUN_TEST_STEP 100 TUPSInteg_1 UPSDbManagementStep z:\tups\integ\scripts\tups_integ.ini force_prompt_decision_removed_clientA_dbManagementCheck
  1797 
  1798 
  1799 // * PART 2
  1800 
  1801 // Client B setup of pre-stored decisions
  1802 RUN_TEST_STEP 100 TUPSInteg_2 UPSClientStep z:\tups\integ\scripts\tups_integ.ini force_prompt_decision_removed_clientB_setup
  1803 
  1804 // Initial check to ensure that DB decision denial is issued by UPS  
  1805 RUN_TEST_STEP 100 TUPSInteg_2 UPSClientStep z:\tups\integ\scripts\tups_integ.ini force_prompt_decision_removed_clientB_initialCheck
  1806 
  1807 // Check decision database state before force prompting
  1808 RUN_TEST_STEP 100 TUPSInteg_1 UPSDbManagementStep z:\tups\integ\scripts\tups_integ.ini force_prompt_decision_removed_clientB_intitalDbCheck
  1809 
  1810 // Force the dialog prompt on the Decisions stored about Client B in the Database
  1811 RUN_TEST_STEP 100 TUPSInteg_2 UPSClientStep z:\tups\integ\scripts\tups_integ.ini force_prompt_decision_removed_clientB_forcePrompt
  1812 
  1813 // Check that decisions have been removed and that new options can be chosen
  1814 RUN_TEST_STEP 100 TUPSInteg_2 UPSClientStep z:\tups\integ\scripts\tups_integ.ini force_prompt_decision_removed_clientB_noDecisionCheck
  1815 
  1816 // Check for No Decisions using Database Management Step
  1817 RUN_TEST_STEP 100 TUPSInteg_1 UPSDbManagementStep z:\tups\integ\scripts\tups_integ.ini force_prompt_decision_removed_clientB_dbManagementCheck
  1818 
  1819 END_TESTCASE SEC-UPS-E032
  1820 
  1821 
  1822 //**************************************************************************************************************
  1823 
  1824 
  1825 //! @SYMTestCaseID  	SEC-UPS-E033
  1826 //! @SYMTestCaseDesc 	Force prompt – multiple fingerprints- record overwritten
  1827 //!                     (force_prompt_multifingerprint_overwriterecord)
  1828 //!		
  1829 //! @SYMPREQ 		PREQ1262
  1830 //! @SYMREQ  		REQ7409 REQ7403
  1831 //!
  1832 //! @SYMTestPriority 	Critical
  1833 //! @SYMTestStatus   	Implemented
  1834 //! @SYMTestActions 	Preconditions:
  1835 //!			• There is an appropriate policy file for the test service to be use. 
  1836 //!			• Policy evaluator has the ability to force prompt at run time. Policy evaluator increases by one
  1837 //!			the value of “evaluator info” every time that a security dialog is prompted for a particular 
  1838 //!			decision in the DB.
  1839 //!			• Policy evaluator generates 3 fingerprints FP1, FP2 & FP3 which are checked by UPS in decision DB
  1840 //!			in that order (FP1 would be the first match if all 3 fingerprints exist in decision DB.
  1841 //!
  1842 //!			Test Actions:
  1843 //!			• Part 1: Test client A has 3 pre-stored decision as “Always” matching FP1, FP2 & FP3. 
  1844 //!			• Instruct client A to request access to test service that matches FP1. Test system server should 
  1845 //!			invoke UPS for decision check. When policy evaluator is invoked instruct this one to generate FP1,
  1846 //!			FP2 & FP3.
  1847 //!			• At dialog display stage select “never” for fingerprint FP3.
  1848 //!			• Check that finger print FP1 was removed from DB, FP2 remain unchanged, FP3 was replaced with a 
  1849 //!			Never Decision
  1850 //!			• “Evaluator info is increased by 1.
  1851 //!
  1852 //!			• Part 2: Reset test so it remains in original conditions (3 “always” decisions for FP1, FP2 & FP3
  1853 //!			in decision DB).
  1854 //!			• Instruct client A to request access to test service that matches FP1. Test system server should 
  1855 //!			invoke UPS for decision check. When policy evaluator is invoked instruct this one to generate FP1, 
  1856 //!			FP2 &FP3.
  1857 //!			• At dialog display stage select “always” for fingerprint FP3.
  1858 //!			• Check that finger print FP1 was removed from DB, FP2 & FP3 remain unchanged. 
  1859 //!			• “Evaluator info is increased by 1.
  1860 //!
  1861 //! @SYMTestExpectedResults	• First matching fingerprint FP1 is deleted from DB as this one is not selected by user in 
  1862 //!				dialog creator stage.
  1863 //!				• FP3 is replaced with a “never” decision in case 1 but remains unchanged for case 2 
  1864 //!				(“always” decision)
  1865 //!				• Evaluator info is increased by one in both cases.	
  1866 //!
  1867 //! @SYMTestType 	CIT
  1868 
  1869 
  1870 START_TESTCASE SEC-UPS-E033
  1871 
  1872 // Delete Existing Database
  1873 RUN_TEST_STEP 100 TUPSInteg_1 UtilsCloseUps
  1874 RUN_UTILS DeleteFile c:\private\10283558\database\ups.db
  1875 
  1876 //* PART 1
  1877 
  1878 // Client setup of pre-stored 'ALWAYS' decisions using the 3 different fingerprints
  1879 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini force_prompt_multifingerprint_overwriterecord_setup
  1880 
  1881 // Initial check to ensure that DB decisions stored for the 3 fingerprints return the expected result 
  1882 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini force_prompt_multifingerprint_overwriterecord_initialCheck
  1883 
  1884 // Check decision database state before force prompting
  1885 RUN_TEST_STEP 100 TUPSInteg_1 UPSDbManagementStep z:\tups\integ\scripts\tups_integ.ini force_prompt_multifingerprint_overwriterecord_initialDbCheck
  1886 
  1887 // Force the dialog prompt on decision FingerPrint 1, and 'NEVER' decision selected for FingerPrint 3 chosen at Dialog
  1888 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini force_prompt_multifingerprint_overwriterecord_forcePrompt_part1
  1889 
  1890 // Check that decisions within DB have been altered/removed/added as necessary using Database Management Step
  1891 RUN_TEST_STEP 100 TUPSInteg_1 UPSDbManagementStep z:\tups\integ\scripts\tups_integ.ini force_prompt_multifingerprint_overwriterecord_dbManagementCheck_part1
  1892 
  1893 // Delete Existing Database
  1894 RUN_TEST_STEP 100 TUPSInteg_1 UtilsCloseUps
  1895 RUN_UTILS DeleteFile c:\private\10283558\database\ups.db
  1896 
  1897 
  1898 //* PART 2
  1899 
  1900 // Client setup of pre-stored 'ALWAYS' decisions using the 3 different fingerprints
  1901 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini force_prompt_multifingerprint_overwriterecord_setup
  1902 
  1903 // Initial check to ensure that DB decisions stored for the 3 fingerprints return the expected result  
  1904 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini force_prompt_multifingerprint_overwriterecord_initialCheck
  1905 
  1906 // Check decision database state before force prompting
  1907 RUN_TEST_STEP 100 TUPSInteg_1 UPSDbManagementStep z:\tups\integ\scripts\tups_integ.ini force_prompt_multifingerprint_overwriterecord_initialDbCheck
  1908 
  1909 // Force the dialog prompt on decision FingerPrint 1, and 'ALWAYS' decision selected for FingerPrint 3 chosen at Dialog
  1910 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini force_prompt_multifingerprint_overwriterecord_forcePrompt_part2
  1911 
  1912 // Check that decisions within DB have been altered/removed/added as necessary using the Database Management Step
  1913 RUN_TEST_STEP 100 TUPSInteg_1 UPSDbManagementStep z:\tups\integ\scripts\tups_integ.ini force_prompt_multifingerprint_overwriterecord_dbManagementCheck_part2
  1914 
  1915 END_TESTCASE SEC-UPS-E033
  1916 
  1917 
  1918 //! @SYMTestCaseID 	SEC-UPS-E034
  1919 //! @SYMTestCaseDesc 	Force prompt – multiple fingerprints - new record
  1920 //!                     (force_prompt_multifingerprint_newrecord)
  1921 //!		
  1922 //! @SYMPREQ 		PREQ1262
  1923 //! @SYMREQ  		REQ7409 REQ7403
  1924 //!
  1925 //! @SYMTestPriority 	Critical
  1926 //! @SYMTestStatus   	Implemented
  1927 //! @SYMTestActions 	Preconditions:
  1928 //!			• There is an appropriate policy file for the test service to be use. 
  1929 //!			• Policy evaluator has the ability to force prompt at run time. Policy evaluator increases by one 
  1930 //!			the value of “evaluator info” every time that a security dialog is prompted for a particular
  1931 //!			decision in the DB.
  1932 //!			• Policy evaluator generates 3 fingerprints FP1, FP2 & FP3 which are checked by UPS in decision DB
  1933 //!			in that order (FP1 would be the first match if all 3 fingerprints exist in decision DB.
  1934 //!
  1935 //!			Test Actions:                
  1936 //!			• Part 1: Test client A has 2 pre-stored decision as “Always” matching FP1 & FP2. 
  1937 //!			• Instruct client A to request access to test service that matches FP1. Test system server should 
  1938 //!			invoke UPS for decision check. When policy evaluator is invoked instruct this one to generate FP1,
  1939 //!			FP2 &FP3.
  1940 //!			• At dialog display stage select “never” for fingerprint FP3.
  1941 //!			• Check that finger print FP1 was removed from DB, FP2 remain unchanged,  new FP3 is created in
  1942 //!			decision DB (with never decision). 
  1943 //!			• “Evaluator info is increased by 1.
  1944 //!			
  1945 //!			• Part 2: Reset test so it remains in original conditions (2 “always” decisions for FP1& FP2).
  1946 //!			• Instruct client A to request access to test service that matches FP1. Test system server should 
  1947 //!			invoke UPS for decision check. When policy evaluator is invoked instruct this one to generate FP1,
  1948 //!			FP2 &FP3.
  1949 //!			• At dialog display stage select “always” for fingerprint FP3.
  1950 //!			• Check that finger print FP1 was removed from DB, FP2 remain unchanged,  new FP3 is created in 
  1951 //!			decision DB (with always decision). 
  1952 //!			• “Evaluator info is increased by 1.
  1953 //!
  1954 //! @SYMTestExpectedResults	• In both cases decision related to FP1 are removed from DB.
  1955 //!				• FP3 is created with a “never” decision in case 1 and with an “always” in cases 2.
  1956 //!				• Evaluator info is increased by one in both cases.
  1957 //!	
  1958 //!
  1959 //! @SYMTestType 	CIT
  1960 
  1961 
  1962 START_TESTCASE SEC-UPS-E034
  1963 
  1964 // Delete Existing Database
  1965 RUN_TEST_STEP 100 TUPSInteg_1 UtilsCloseUps
  1966 RUN_UTILS DeleteFile c:\private\10283558\database\ups.db
  1967 
  1968 //* PART 1
  1969 
  1970 // Client setup of pre-stored 'ALWAYS' decisions using 2 of the 3 fingerprints
  1971 RUN_TEST_STEP 100 TUPSInteg_2 UPSClientStep z:\tups\integ\scripts\tups_integ.ini force_prompt_multifingerprint_newrecord_setup
  1972 
  1973 // Initial check to ensure that DB decisions stored for the 2 fingerprints return the expected result
  1974 RUN_TEST_STEP 100 TUPSInteg_2 UPSClientStep z:\tups\integ\scripts\tups_integ.ini force_prompt_multifingerprint_newrecord_initialCheck
  1975 
  1976 // Check decision database state before force prompting
  1977 RUN_TEST_STEP 100 TUPSInteg_1 UPSDbManagementStep z:\tups\integ\scripts\tups_integ.ini force_prompt_multifingerprint_newrecord_intitalDbCheck
  1978 
  1979 // Force the dialog prompt on decision FingerPrint 1, and 'NEVER' decision selected for FingerPrint 3 chosen at Dialog
  1980 RUN_TEST_STEP 100 TUPSInteg_2 UPSClientStep z:\tups\integ\scripts\tups_integ.ini force_prompt_multifingerprint_newrecord_forcePrompt_part1
  1981 
  1982 // Check that decisions within DB have been altered/removed/added as necessary using the Database Management Step
  1983 RUN_TEST_STEP 100 TUPSInteg_1 UPSDbManagementStep z:\tups\integ\scripts\tups_integ.ini force_prompt_multifingerprint_newrecord_dbManagementCheck_part1
  1984 
  1985 // Delete Existing Database
  1986 RUN_TEST_STEP 100 TUPSInteg_1 UtilsCloseUps
  1987 RUN_UTILS DeleteFile c:\private\10283558\database\ups.db
  1988 
  1989 
  1990 //* PART 2
  1991 
  1992 // Client setup of pre-stored 'ALWAYS' decisions using 2 of the 3 fingerprints
  1993 RUN_TEST_STEP 100 TUPSInteg_2 UPSClientStep z:\tups\integ\scripts\tups_integ.ini force_prompt_multifingerprint_newrecord_setup
  1994 
  1995 // Initial check to ensure that DB decisions stored for the 2 fingerprints return the expected result
  1996 RUN_TEST_STEP 100 TUPSInteg_2 UPSClientStep z:\tups\integ\scripts\tups_integ.ini force_prompt_multifingerprint_newrecord_initialCheck
  1997 
  1998 // Check decision database state before force prompting
  1999 RUN_TEST_STEP 100 TUPSInteg_1 UPSDbManagementStep z:\tups\integ\scripts\tups_integ.ini force_prompt_multifingerprint_newrecord_intitalDbCheck
  2000 
  2001 // Force the dialog prompt on decision FingerPrint 1, and 'ALWAYS' decision selected for FingerPrint 3 chosen at Dialog
  2002 RUN_TEST_STEP 100 TUPSInteg_2 UPSClientStep z:\tups\integ\scripts\tups_integ.ini force_prompt_multifingerprint_newrecord_forcePrompt_part2
  2003 
  2004 // Check that decisions within DB have been altered/removed/added as necessary using the Database Management Step
  2005 RUN_TEST_STEP 100 TUPSInteg_1 UPSDbManagementStep z:\tups\integ\scripts\tups_integ.ini force_prompt_multifingerprint_newrecord_dbManagementCheck_part2
  2006 
  2007 
  2008 END_TESTCASE SEC-UPS-E034
  2009 
  2010 
  2011 //! @SYMTestCaseID 	SEC-UPS-E035
  2012 //! @SYMTestCaseDesc 	Invocation of Default Symbian policy evaluator
  2013 //!                     (invoke_default_policy_evaluator)
  2014 //!		
  2015 //! @SYMPREQ 		PREQ1262
  2016 //! @SYMREQ  		
  2017 //!
  2018 //! @SYMTestPriority 	Critical
  2019 //! @SYMTestStatus   	Implemented
  2020 //! @SYMTestActions 	
  2021 //!
  2022 //! @SYMTestExpectedResults	Preconditions:
  2023 //!				• There is an appropriate policy file for the test service to be use, but in the header of 
  2024 //!				the policy file there is NO mention of policy evaluator. 
  2025 //!				• Note: It is expected that the Symbian policy evaluator will generate a NULL value 
  2026 //!				fingerprint. 
  2027 //!				• Dialog creator specified by policy evaluator is present. 
  2028 //!
  2029 //!				Test Actions:                
  2030 //!				• Case 1: Request service to test system server, this one is expected to invoke UPS.
  2031 //!				• Check that Symbian default policy evaluator was invoked. 
  2032 //!				• When security dialog is invoked select “Always”.
  2033 //!				• Check that decision is stored correctly.
  2034 //!
  2035 //!				• Case 2: Request service to test system server, this one is expected to invoke UPS.
  2036 //!				• Check that Symbian default policy evaluator was invoked. 
  2037 //!				• When security dialog is invoked select “never”.
  2038 //!				• Check that decision is stored correctly.
  2039 //!
  2040 //!				• Extra Checking: Use dumpupsdb.exe tool to export and re-import UPS database, check 
  2041 //!				consistency of imported database.
  2042 //!
  2043 //! @SYMTestExpectedResults	• Two new decisions where created: 1 “never” and 1 ”always” which are expected to have NULL 
  2044 //!				value fingerprints.
  2045 //!				• Decision database with null value fingerprint can be exported and re-imported correctly.
  2046 //!
  2047 //! @SYMTestType 	CIT
  2048 
  2049 START_TESTCASE SEC-UPS-E035
  2050 
  2051 // Delete Existing Database
  2052 RUN_TEST_STEP 100 TUPSInteg_1 UtilsCloseUps
  2053 RUN_UTILS DeleteFile c:\private\10283558\database\ups.db
  2054 
  2055 // Case 1:
  2056 
  2057 // Client call to UPS invoking the defualt policy evaluator and selecting 'ALWAYS' from the dialog 
  2058 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini invoke_default_policy_evaluator_Always
  2059 
  2060 // Initial check to ensure that DB contains an ALWAYS decision for the client with a NULL fingerprint
  2061 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini invoke_default_policy_evaluator_Alaways_initalCheck
  2062 
  2063 // Database Management Checking to ensure that each value in the decision is what is expected
  2064 RUN_TEST_STEP 100 TUPSInteg_1 UPSDbManagementStep z:\tups\integ\scripts\tups_integ.ini invoke_default_policy_evaluator_Alaways_dbManagementCheck
  2065 
  2066 
  2067 // Case 2:
  2068 
  2069 // Client call to UPS invoking the defualt policy evaluator and selecting 'NEVER' from the dialog 
  2070 RUN_TEST_STEP 100 TUPSInteg_2 UPSClientStep z:\tups\integ\scripts\tups_integ.ini invoke_default_policy_evaluator_Never
  2071 
  2072 // Initial check to ensure that DB contains an additional NEVER decision for the client with a NULL fingerprint
  2073 RUN_TEST_STEP 100 TUPSInteg_2 UPSClientStep z:\tups\integ\scripts\tups_integ.ini invoke_default_policy_evaluator_Never_initalCheck
  2074 
  2075 // Database Management Checking to ensure that each value in the decision is what is expected
  2076 RUN_TEST_STEP 100 TUPSInteg_1 UPSDbManagementStep z:\tups\integ\scripts\tups_integ.ini invoke_default_policy_evaluator_Never_dbManagementCheck
  2077 
  2078 
  2079 // Database Import/Export Checking:
  2080 
  2081 // Shutdown UPS Server
  2082 RUN_TEST_STEP 100 TUPSInteg_1 UtilsCloseUps
  2083 
  2084 // Dump contents of the database
  2085 RUN_PROGRAM dumpupsdb.exe -e -db \private\10283558\database\ups.db -f c:\exportdb.db -s
  2086 
  2087 // Delete Existing UPS Database
  2088 RUN_UTILS DeleteFile c:\private\10283558\database\ups.db
  2089 
  2090 // Reimport Database Contents
  2091 RUN_PROGRAM dumpupsdb.exe -i -db \private\10283558\database\ups.db -f c:\exportdb.db -s
  2092 
  2093 // Delete Temporary Export File
  2094 RUN_UTILS DeleteFile c:\exportdb.db
  2095 
  2096 // Re Check the NULL fingerprint Decisions Imported into the Database
  2097 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini invoke_default_policy_evaluator_Alaways_initalCheck
  2098 RUN_TEST_STEP 100 TUPSInteg_2 UPSClientStep z:\tups\integ\scripts\tups_integ.ini invoke_default_policy_evaluator_Never_initalCheck
  2099 
  2100 // Final Datbase Management Check to ensure that the values of the Decision are still as expected
  2101 RUN_TEST_STEP 100 TUPSInteg_1 UPSDbManagementStep z:\tups\integ\scripts\tups_integ.ini invoke_default_policy_evaluator_Never_dbManagementCheck
  2102 
  2103 END_TESTCASE SEC-UPS-E035
  2104 
  2105 //! @SYMTestCaseID SEC-INTEG-UPS-E036
  2106 //! @SYMTestCaseDesc System Server Security
  2107 //!                  (System_Server_Security)
  2108 //!		
  2109 //! @SYMPREQ PREQ1262
  2110 //! @SYMREQ REQ7408
  2111 //! @SYMTestPriority Critical
  2112 //! @SYMTestStatus   Implemented
  2113 //! @SYMTestActions   
  2114 //!		     Preconditions:
  2115 //!			• There is an appropriate policy file in the phone that uses SystemServerSecurity
  2116 //!			  property set with different values for individual policies including 
  2117 //!			  ESystemServerSecurityPassedOrFailed, ESystemServerSecurityFailed and 
  2118 //!			  ESystemServerSecurityPassed. 
  2119 //!		     Test Actions:     
  2120 //!			• Case 1: Request set services to a test system server to ensure that an individual
  2121 //!			  policy set with ESystemServerSecurityPassedOrFailed is invoked, use different 
  2122 //!		          values for platSecPass parameter in authorize request. 
  2123 //!  			• Case 2: : Request set services to a test system server to ensure that an 
  2124 //!			  individual policy set with ESystemServerSecurityFailed  is invoked, use values 
  2125 //!			  for platSecPass parameter as EFalse in authorize request.   
  2126 //!			• Case 3: : Request set services to a test system server to ensure that an 
  2127 //!			  individual policy set with ESystemServerSecurityPassed is invoked, use values for 
  2128 //!			  platSecPass parameter as ETrue in authorize request. 
  2129 //!
  2130 //! @SYMTestExpectedResults  
  2131 //!			• On each case the appropriate individual policy is invoked. 
  2132 //!
  2133 //! @SYMTestType CIT
  2134 
  2135 START_TESTCASE SEC-INTEG-UPS-E036
  2136 
  2137 RUN_TEST_STEP 100 TUPSInteg_1 UtilsCloseUps
  2138 RUN_UTILS DeleteFile c:\private\10283558\database\ups.db
  2139 
  2140 // case 1
  2141 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini ESystemServerSecurityPassedOrFailed
  2142 // case 2
  2143 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini ESystemServerSecurityFailed 
  2144 // case 3
  2145 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini ESystemServerSecurityPassed
  2146 
  2147 RUN_TEST_STEP 100 TUPSInteg_1 UPSDbManagementStep z:\tups\integ\scripts\tups_integ.ini count_8
  2148 
  2149 END_TESTCASE SEC-INTEG-UPS-E036
  2150 
  2151 
  2152 
  2153 //********************** SEC-UPS-G : NEGATIVE TEST CASES  **********************
  2154 
  2155 //! @SYMTestCaseID SEC-UPS-INTEG-G004
  2156 //! @SYMTestCaseDesc Non ProtServ capability system server   
  2157 //!                  (no_protser_cap)
  2158 //!		
  2159 //! @SYMPREQ PREQ1262
  2160 //! @SYMREQ REQ7427
  2161 //!
  2162 //! @SYMTestPriority Critical
  2163 //! @SYMTestStatus   Implemented
  2164 //! @SYMTestActions 	Preconditions:
  2165 //!			•  There is an appropriate policy, policy evaluator and dialog creator that matches the UID of the
  2166 //!			service offered by the “system server”.
  2167 //!			•  The system server request prompt to UPS does NOT have ProtServ capability.
  2168 //!
  2169 //!			Test Actions:
  2170 //!			•  Launch “test client” which tries to connect to a system server and use service. 
  2171 //!			•  System server asks for a user prompt to the UPS (Authorise method).
  2172 //!			•  UPS should deny the request from system server. 
  2173 //!
  2174 //! @SYMTestExpectedResults 	• System server receives a KErrPermissionDenied from Ups. 
  2175 //!
  2176 //! @SYMTestType CIT
  2177 
  2178 START_TESTCASE SEC-UPS-INTEG-G004
  2179 RUN_TEST_STEP 100 TUPSInteg_1 NonProtServAuthorisation z:\tups\integ\scripts\tups_integ.ini no_protser_cap
  2180 // test variation: server has no capabilities but plat sec test passed
  2181 // Note: nop decision is stored or dialog prompted.
  2182 RUN_TEST_STEP 100 TUPSInteg_1 NonProtServAuthorisation z:\tups\integ\scripts\tups_integ.ini no_protser_cap_b
  2183 END_TESTCASE SEC-UPS-INTEG-G004
  2184 
  2185 
  2186 //! @SYMTestCaseID 	SEC-UPS-G007
  2187 //! @SYMTestCaseDesc 	Protected deletion and update of decisions.
  2188 //!                     (remove_update_capabilityChecking)
  2189 //!		
  2190 //! @SYMPREQ 		PREQ1262
  2191 //! @SYMREQ  		REQ7381
  2192 //!
  2193 //! @SYMTestPriority 	Critical
  2194 //! @SYMTestStatus   	Implemented
  2195 //! @SYMTestActions 	Preconditions:
  2196 //!			• Existence of test application 1 without AllFiles capabilities.
  2197 //!			• Existence of test application 2 without WriteDeviceData capabilities. 
  2198 //!			
  2199 //!			Test Actions:
  2200 //!			• Instruct test application 1 to attempt a record update in decision database using UpsManagement.
  2201 //!			• Instruct test application 2 to attempt a record delete in decision database using UpsManagement.
  2202 //!
  2203 //! @SYMTestExpectedResults	• Test application1 should not be able to update record.
  2204 //!				• Test application2 should not be able to delete record.
  2205 //!
  2206 //! @SYMTestType 	CIT
  2207 
  2208 
  2209 START_TESTCASE SEC-UPS-G007
  2210 
  2211 // Delete Existing Database
  2212 RUN_TEST_STEP 100 TUPSInteg_1 UtilsCloseUps
  2213 RUN_UTILS DeleteFile c:\private\10283558\database\ups.db
  2214 
  2215 // populate decision database with sample inital values.
  2216 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini populate_sample2
  2217 RUN_TEST_STEP 100 TUPSInteg_2 UPSClientStep z:\tups\integ\scripts\tups_integ.ini populate_sample2
  2218 RUN_TEST_STEP 100 TUPSInteg_3 UPSClientStep z:\tups\integ\scripts\tups_integ.ini populate_sample2
  2219 
  2220 // Perform initial checking on sample decisions
  2221 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini check_sample2
  2222 RUN_TEST_STEP 100 TUPSInteg_2 UPSClientStep z:\tups\integ\scripts\tups_integ.ini check_sample2
  2223 RUN_TEST_STEP 100 TUPSInteg_3 UPSClientStep z:\tups\integ\scripts\tups_integ.ini check_sample2
  2224 
  2225 // * STAGE 1 - UPDATE RECORD CAPABILITY TEST (AllFiles Required)
  2226 
  2227 // Perform attempt to update a decision "WITHOUT" the appropriate capabilities
  2228 RUN_TEST_STEP !Result=-46 100 TUPSInteg_writedevice UPSDbManagementStep z:\tups\integ\scripts\tups_integ.ini remove_update_capabilityChecking_Update
  2229 
  2230 // Run Database Management Checking for Unauthorised Update
  2231 RUN_TEST_STEP 100 TUPSInteg_1 UPSDbManagementStep z:\tups\integ\scripts\tups_integ.ini remove_update_capabilityChecking_unauthorisedUpdate_DBCheck
  2232 
  2233 // Perform attempt to update a decision "WITH" the appropriate capabilities 
  2234 RUN_TEST_STEP 100 TUPSInteg_allfiles_readdevice UPSDbManagementStep z:\tups\integ\scripts\tups_integ.ini remove_update_capabilityChecking_Update
  2235 
  2236 // Run Database Management Checking for authorised Update
  2237 RUN_TEST_STEP 100 TUPSInteg_1 UPSDbManagementStep z:\tups\integ\scripts\tups_integ.ini remove_update_capabilityChecking_authorisedUpdate_DBCheck
  2238 
  2239 
  2240 // * STAGE 2 - REMOVE RECORD CAPABILITY TEST (WriteDeviceData Required)
  2241 
  2242 // Perform attempt to remove a decision "WITHOUT" the appropriate capabilities
  2243 RUN_TEST_STEP !Result=-46 100 TUPSInteg_allfiles_readdevice UPSDbManagementStep z:\tups\integ\scripts\tups_integ.ini remove_update_capabilityChecking_Remove
  2244 
  2245 // Run Database Management Checking for Unauthorised Remove
  2246 RUN_TEST_STEP 100 TUPSInteg_1 UPSDbManagementStep z:\tups\integ\scripts\tups_integ.ini remove_update_capabilityChecking_unauthorisedRemove_DBCheck
  2247 
  2248 // Perform attempt to remove a decision "WITH" the appropriate capabilities 
  2249 RUN_TEST_STEP 100 TUPSInteg_writedevice UPSDbManagementStep z:\tups\integ\scripts\tups_integ.ini remove_update_capabilityChecking_Remove
  2250 
  2251 // Run Database Management Checking for authorised Remove
  2252 RUN_TEST_STEP 100 TUPSInteg_1 UPSDbManagementStep z:\tups\integ\scripts\tups_integ.ini remove_update_capabilityChecking_authorisedRemove_DBCheck
  2253 
  2254 END_TESTCASE SEC-UPS-G007
  2255 
  2256 
  2257 //! @SYMTestCaseID SEC-UPS-INTEG-G008
  2258 //! @SYMTestCaseDesc Policy Evaluator Leaving
  2259 //!                  (policy_evaluator_leave)
  2260 //!		
  2261 //! @SYMPREQ PREQ1262
  2262 //! @SYMREQ REQ7427
  2263 //! @SYMTestPriority Critical
  2264 //! @SYMTestStatus   Implemented
  2265 //! @SYMTestActions 	Preconditions:
  2266 //!			• There is an appropriate policy, policy evaluator and dialog creator that matches the UID of the 	
  2267 //!			service offered by the “system server”.
  2268 //!			• Test Client doesn’t have any decision stored in DB related to service about to be used by test 	
  2269 //!			client.
  2270 //!			
  2271 //!			Test Actions:
  2272 //!			• Launch “test clients” which tries to use of system servers. System server should request UPS for 
  2273 //!			user security dialog.
  2274 //!			• When UPS invokes policy evaluator, induce a “leave” in policy evaluator. 
  2275 //!			• UPS should process this leave from policy evaluator and reply with a silent denial to system 		
  2276 //!			server.
  2277 //!
  2278 //! @SYMTestExpectedResults 	• System server receives a silent denial from UPS.  
  2279 //!
  2280 //! @SYMTestType CIT
  2281 
  2282 //Delete Current Database
  2283 RUN_TEST_STEP 100 TUPSInteg_1 UtilsCloseUps
  2284 RUN_UTILS DeleteFile c:\private\10283558\database\ups.db
  2285 
  2286 START_TESTCASE SEC-UPS-INTEG-G008
  2287 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini policyevaluator_leave_session
  2288 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini policyevaluator_leave_always
  2289 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini policyevaluator_leave_never
  2290 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini policyevaluator_leave_yes
  2291 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini policyevaluator_leave_no
  2292 
  2293 CONCURRENT
  2294 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini policyevaluator_leaving_concurrent
  2295 RUN_TEST_STEP 100 TUPSInteg_2 UPSClientStep z:\tups\integ\scripts\tups_integ.ini policyevaluator_always_concurrent
  2296 RUN_TEST_STEP 100 TUPSInteg_3 UPSClientStep z:\tups\integ\scripts\tups_integ.ini policyevaluator_never_concurrent
  2297 CONSECUTIVE 
  2298 
  2299 END_TESTCASE SEC-UPS-INTEG-G008
  2300 
  2301 
  2302 //! @SYMTestCaseID SEC-UPS-INTEG-G009
  2303 //! @SYMTestCaseDesc Dialog Creator Leaving         
  2304 //!                  (dialog_creator_leave)
  2305 //!		
  2306 //! @SYMPREQ PREQ1262
  2307 //! @SYMREQ REQ7427
  2308 //!
  2309 //! @SYMTestPriority Critical
  2310 //! @SYMTestStatus   Implemented
  2311 //! @SYMTestActions 	Preconditions:
  2312 //!			• There is an appropriate policy, policy evaluator and dialog creator that matches the UID of the 	
  2313 //!			service offered by the “system server”.
  2314 //!			• Test Client doesn’t have any decision stored in DB related to service about to be used by test 	
  2315 //!			client.
  2316 //!
  2317 //!			Test Actions:
  2318 //!			• Launch “test clients” which tries to use of system servers. System server should request UPS for 	
  2319 //!			user security dialog.
  2320 //!			• When UPS invokes dialog, induce a “leave” in dialog creator. 
  2321 //!			• UPS should process this leave from policy evaluator and reply with a silent denial to system 		
  2322 //!			server.
  2323 //!
  2324 //! @SYMTestExpectedResults 	• System server receives a silent denial from UPS. 
  2325 //!
  2326 //! @SYMTestType CIT
  2327 
  2328 START_TESTCASE SEC-UPS-INTEG-G009
  2329 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini dialogcreator_leave_session
  2330 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini dialogcreator_leave_always
  2331 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini dialogcreator_leave_never
  2332 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini dialogcreator_leave_yes
  2333 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini dialogcreator_leave_no
  2334 
  2335 CONCURRENT
  2336 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini dialogcreator_leaving_concurrent
  2337 RUN_TEST_STEP 100 TUPSInteg_2 UPSClientStep z:\tups\integ\scripts\tups_integ.ini dialogcreator_always_concurrent
  2338 RUN_TEST_STEP 100 TUPSInteg_3 UPSClientStep z:\tups\integ\scripts\tups_integ.ini dialogcreator_never_concurrent
  2339 CONSECUTIVE
  2340 
  2341 END_TESTCASE SEC-UPS-INTEG-G009
  2342 
  2343 
  2344 //! @SYMTestCaseID 	SEC-UPS-G010
  2345 //! @SYMTestCaseDesc 	Protected reading of decisions
  2346 //!                     (readDecision_capabilityChecking)
  2347 //!		
  2348 //! @SYMPREQ 		PREQ1262
  2349 //! @SYMREQ  		REQ7492
  2350 //!
  2351 //! @SYMTestPriority 	Critical
  2352 //! @SYMTestStatus   	Implemented
  2353 //! @SYMTestActions 	Preconditions:
  2354 //!			• There are some previous decisions stored in decision data base.
  2355 //!			• Test application does not have ReadDeviceData but it has WriteDeviceData capabilities. 
  2356 //!
  2357 //!			Test Actions:
  2358 //!			• Try to use test application with not ReadDeviceData capabilities to read existing entry from decision DB.
  2359 //!
  2360 //! @SYMTestExpectedResults	• Reading of entry fails, test application is returned error.	
  2361 //!
  2362 //! @SYMTestType 	CIT
  2363 
  2364 
  2365 START_TESTCASE SEC-UPS-G010
  2366 
  2367 // Delete Existing Database
  2368 RUN_TEST_STEP 100 TUPSInteg_1 UtilsCloseUps
  2369 RUN_UTILS DeleteFile c:\private\10283558\database\ups.db
  2370 
  2371 // populate decision database with sample inital values.
  2372 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini populate_sample2
  2373 RUN_TEST_STEP 100 TUPSInteg_2 UPSClientStep z:\tups\integ\scripts\tups_integ.ini populate_sample2
  2374 RUN_TEST_STEP 100 TUPSInteg_3 UPSClientStep z:\tups\integ\scripts\tups_integ.ini populate_sample2
  2375 
  2376 // Perform initial checking on sample decisions
  2377 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini check_sample2
  2378 RUN_TEST_STEP 100 TUPSInteg_2 UPSClientStep z:\tups\integ\scripts\tups_integ.ini check_sample2
  2379 RUN_TEST_STEP 100 TUPSInteg_3 UPSClientStep z:\tups\integ\scripts\tups_integ.ini check_sample2
  2380 
  2381 // Perform attempt to read a decision "WITHOUT" the appropriate capabilities
  2382 RUN_TEST_STEP !Result=-46 100 TUPSInteg_writedevice UPSDbManagementStep z:\tups\integ\scripts\tups_integ.ini readDecision_capabilityChecking_dbRead
  2383 
  2384 // Perform attempt to update a decision "WITH" the appropriate capabilities 
  2385 RUN_TEST_STEP 100 TUPSInteg_readdevice UPSDbManagementStep z:\tups\integ\scripts\tups_integ.ini readDecision_capabilityChecking_dbRead
  2386 
  2387 END_TESTCASE SEC-UPS-G010
  2388 
  2389 
  2390 
  2391 //********************** SEC-UPS-H : MISCELLANEOUS  **********************
  2392 
  2393 //! @SYMTestCaseID SEC-UPS-INTEG-H010
  2394 //! @SYMTestCaseDesc Simple request cancelation        
  2395 //!                  (simple_cancel)
  2396 //!		
  2397 //! @SYMPREQ PREQ1262
  2398 //! @SYMREQ REQ7427
  2399 //!
  2400 //! @SYMTestPriority Critical
  2401 //! @SYMTestStatus   Implemented
  2402 //! @SYMTestActions 	Preconditions:
  2403 //!			• There is an appropriate policy, policy evaluator and dialog creator that matches the UID of the
  2404 //!			  service offered by the “system server”.
  2405 //!			• Test Client doesn’t have any decision stored in DB related to service about to be used by test
  2406 //!			  client.
  2407 //!
  2408 //!			Test Actions:
  2409 //!			• Launch “test clients” which tries to use of system servers. System server should request UPS for
  2410 //!			  user security dialog.
  2411 //!			• When server requests UPS authorisation, cancel the request using CancelPrompt method. 
  2412 //!
  2413 //! @SYMTestExpectedResults 	• System server receives a KErrCancel from Ups. 
  2414 //!
  2415 //! @SYMTestType CIT
  2416 
  2417 START_TESTCASE SEC-UPS-INTEG-H010
  2418 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini simple_cancel
  2419 END_TESTCASE SEC-UPS-INTEG-H010
  2420 
  2421 
  2422 //! @SYMTestCaseID 	SEC-UPS-H011
  2423 //! @SYMTestCaseDesc 	Reversible decision DB export by dumpupsdb
  2424 //!                     (Export_Import_DBDumpTool)
  2425 //!		
  2426 //! @SYMPREQ 		PREQ1262
  2427 //! @SYMREQ  		REQ7443 REQ7442
  2428 //!
  2429 //! @SYMTestPriority 	Critical
  2430 //! @SYMTestStatus   	Implemented
  2431 //! @SYMTestActions 	Test Actions:
  2432 //!			• Populate decision database with a reasonable number of decisions.
  2433 //!			• Check correct behaviour of UPS with this decision DB.
  2434 //!			• Stop UPS server running and use “dumpupsdb.exe” to export database to temporary file.
  2435 //!			• Using dumpupsdb.exe” re-import this temporary file into the decision DB (ups.db). 
  2436 //!			• Check that re-imported decision database contains the same records that the original and UPS 
  2437 //!			behaves normally when using it.
  2438 //!
  2439 //! @SYMTestExpectedResults	• There is no functional difference between the original decision database and the 
  2440 //!				re-imported one.
  2441 //!
  2442 //! @SYMTestType 	CIT
  2443 
  2444 START_TESTCASE SEC-UPS-H011
  2445 
  2446 // Delete Existing Database
  2447 RUN_TEST_STEP 100 TUPSInteg_1 UtilsCloseUps
  2448 RUN_UTILS DeleteFile c:\private\10283558\database\ups.db
  2449 
  2450 // Run the initial data entry step to populate the database with entries
  2451 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini Export_Import_DBDumpTool_Setup
  2452 
  2453 // Check the newly created Decisions within the UPS Database
  2454 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini Export_Import_DBDumpTool_Verify
  2455 
  2456 // Shutdown UPS Server
  2457 RUN_TEST_STEP 100 TUPSInteg_1 UtilsCloseUps
  2458 
  2459 // Dump contents of the database
  2460 RUN_PROGRAM dumpupsdb.exe -e -db \private\10283558\database\ups.db -f c:\exportdb.db -s
  2461 RUN_PROGRAM dumpupsdb.exe -e -db \private\10283558\database\ups.db -f c:\exportdba.txt -s
  2462 
  2463 // Delete Existing UPS Database
  2464 RUN_UTILS DeleteFile c:\private\10283558\database\ups.db
  2465 
  2466 // Reimport Database Contents
  2467 RUN_PROGRAM dumpupsdb.exe -i -db \private\10283558\database\ups.db -f c:\exportdb.db -s
  2468 RUN_PROGRAM dumpupsdb.exe -e -db \private\10283558\database\ups.db -f c:\exportdbb.txt -s
  2469 
  2470 // Delete Temporary Export File
  2471 RUN_UTILS DeleteFile c:\exportdb.db
  2472 
  2473 // Rerun service requests using Reimported Database
  2474 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini Export_Import_DBDumpTool_Verify
  2475 
  2476 /////////// repeats same test sequence with (-b) flag in dumpupsdb.exe 
  2477 
  2478 // Delete Existing Database
  2479 RUN_TEST_STEP 100 TUPSInteg_1 UtilsCloseUps
  2480 RUN_UTILS DeleteFile c:\private\10283558\database\ups.db
  2481 
  2482 // Run the initial data entry step to populate the database with entries
  2483 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini Export_Import_DBDumpTool_Setup
  2484 
  2485 // Check the newly created Decisions within the UPS Database
  2486 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini Export_Import_DBDumpTool_Verify
  2487 
  2488 // Shutdown UPS Server
  2489 RUN_TEST_STEP 100 TUPSInteg_1 UtilsCloseUps
  2490 
  2491 // Dump contents of the database
  2492 RUN_PROGRAM dumpupsdb.exe -e -db \private\10283558\database\ups.db -f c:\exportdb.db -s -b
  2493 
  2494 // Delete Existing UPS Database
  2495 RUN_UTILS DeleteFile c:\private\10283558\database\ups.db
  2496 
  2497 // Reimport Database Contents
  2498 RUN_PROGRAM dumpupsdb.exe -i -db \private\10283558\database\ups.db -f c:\exportdb.db -s -b
  2499 
  2500 // Delete Temporary Export File
  2501 RUN_UTILS DeleteFile c:\exportdb.db
  2502 
  2503 // Rerun service requests using Reimported Database
  2504 RUN_TEST_STEP 100 TUPSInteg_1 UPSClientStep z:\tups\integ\scripts\tups_integ.ini Export_Import_DBDumpTool_Verify
  2505 
  2506 END_TESTCASE SEC-UPS-H011
  2507 
  2508 
  2509 //! @SYMTestCaseID SEC-UPS-INTEG-H012
  2510 //! @SYMTestCaseDesc UPS sub-session in different thread
  2511 //!                  (ups_session_shared)
  2512 //!		
  2513 //! @SYMPREQ PREQ1262
  2514 //! @SYMREQ REQ7446
  2515 //! @SYMTestPriority Critical
  2516 //! @SYMTestStatus   Implemented
  2517 //! @SYMTestActions 	Test Actions:
  2518 //!			• Open an UPS session from a test server.
  2519 //!			• Create a new thread and share UPS session with this new thread.
  2520 //!			• From this new thread create a sub-session to ups, request authorisation to UPS 
  2521 //!		          using this sub-session.
  2522 //!			• Check that UPS behaves like normal and the appropriate decision is stored in DB. 
  2523 //!
  2524 //! @SYMTestExpectedResults  • Authorize method for UPS can be used successfully for thread different that 
  2525 //!			       the one owning the UPS session.
  2526 //!
  2527 //! @SYMTestType CIT
  2528 
  2529 START_TESTCASE SEC-UPS-INTEG-H012
  2530 // Shutdown UPS Server
  2531 RUN_TEST_STEP 100 TUPSInteg_1 UtilsCloseUps
  2532 
  2533 // Delete Existing UPS Database
  2534 RUN_UTILS DeleteFile c:\private\10283558\database\ups.db
  2535 
  2536 RUN_TEST_STEP 100 TUPSInteg_minor Multithread z:\tups\integ\scripts\tups_integ.ini ups_session_shared
  2537 RUN_TEST_STEP 100 TUPSInteg_1 UPSDbManagementStep z:\tups\integ\scripts\tups_integ.ini count_2
  2538 
  2539 // Shutdown UPS Server
  2540 RUN_TEST_STEP 100 TUPSInteg_1 UtilsCloseUps
  2541 
  2542 // Dump contents of the database
  2543 RUN_PROGRAM dumpupsdb.exe -e -db \private\10283558\database\ups.db -f c:\multithread.db -s -b
  2544 END_TESTCASE SEC-UPS-INTEG-H012
  2545 
  2546 
  2547 //! @SYMTestCaseID SEC-UPS-MISC-0002
  2548 //! @SYMTestCaseDesc Clears off properties previously set for policy evaluators and dialog creators.
  2549 
  2550 START_TESTCASE SEC-UPS-MISC-0002
  2551 RUN_TEST_STEP 100 TUPSInteg_1 PropertyStep z:\tups\integ\scripts\tups_properties.ini PropertiesToDestroy
  2552 END_TESTCASE SEC-UPS-MISC-0002
  2553 
  2554 
  2555 PRINT Complete_TUPS_Tests