lynxis lazus has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/39261?usp=email )
(
17 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: SGSN: Remove unsupported acl test cases ......................................................................
SGSN: Remove unsupported acl test cases
The functionality for ACL based authentication (only use the IMSI, but don't request information from the HLR) will be removed from the SGSN.
Change-Id: I1506324300fe3864069706d5b05860e7b44cd895 --- M sgsn/SGSN_Tests.ttcn M sgsn/expected-results.xml 2 files changed, 0 insertions(+), 181 deletions(-)
Approvals: fixeria: Looks good to me, but someone else must approve pespin: Looks good to me, but someone else must approve daniel: Looks good to me, approved Jenkins Builder: Verified
diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn index 721b24b..f0eab7d 100644 --- a/sgsn/SGSN_Tests.ttcn +++ b/sgsn/SGSN_Tests.ttcn @@ -864,70 +864,6 @@ f_cleanup(); }
-/* Attempt of GPRS ATTACH in 'accept all' mode */ -private function f_TC_attach_accept_all(charstring id) runs on BSSGP_ConnHdlr { - var PDU_L3_SGSN_MS l3_mt; - var RoutingAreaIdentificationV old_ra := f_random_RAI(); - - g_pars.net.expect_auth := false; - - f_send_l3(ts_GMM_ATTACH_REQ(f_mi_get_lv(), old_ra, false, false, omit, omit)); - f_gmm_auth(); - BSSGP[0].receive(tr_GMM_ATTACH_ACCEPT('001'B, ?, ?)) -> value l3_mt { - f_process_attach_accept(l3_mt.msgs.gprs_mm.attachAccept); - } - f_send_l3(ts_GMM_ATTACH_COMPL); - setverdict(pass); -} -testcase TC_attach_accept_all() runs on test_CT { - var BSSGP_ConnHdlr vc_conn; - f_init(); - f_sleep(1.0); - f_vty_config(SGSNVTY, "sgsn", "auth-policy accept-all"); - vc_conn := f_start_handler(refers(f_TC_attach_accept_all), testcasename(), g_gb, 8); - vc_conn.done; - f_cleanup(); -} - -/* Attempt of GPRS ATTACH in 'accept all' mode */ -private function f_TC_attach_closed_foreign(charstring id) runs on BSSGP_ConnHdlr { - var RoutingAreaIdentificationV old_ra := f_random_RAI(); - - /* Simulate a foreign IMSI */ - g_pars.imsi := '001010123456789'H; - f_bssgp_client_register(g_pars.imsi, g_pars.tlli); - - g_pars.net.expect_auth := false; - - f_send_l3(ts_GMM_ATTACH_REQ(f_mi_get_lv(), old_ra, false, false, omit, omit)); - alt { - [] as_mm_identity(); - [] BSSGP[0].receive(tr_GMM_ATTACH_REJECT('07'O)) { - setverdict(pass); - } - [] BSSGP[0].receive(tr_GMM_ATTACH_REJECT(?)) { - setverdict(pass); - } - [] BSSGP[0].receive(tr_GMM_ATTACH_ACCEPT(*, *, *)) { - setverdict(fail); - mtc.stop; - } - } -} -testcase TC_attach_closed() runs on test_CT { - var BSSGP_ConnHdlr vc_conn; - f_init(); - f_sleep(1.0); - f_vty_config(SGSNVTY, "sgsn", "auth-policy closed"); - /* test with foreign IMSI: Must Reject */ - vc_conn := f_start_handler(refers(f_TC_attach_closed_foreign), testcasename(), g_gb, 9); - vc_conn.done; - /* test with home IMSI: Must Accept */ - vc_conn := f_start_handler(refers(f_TC_attach_accept_all), testcasename(), g_gb, 10); - vc_conn.done; - f_cleanup(); -} - /* Routing Area Update from Unknown TLLI -> REJECT */ private function f_TC_rau_unknown(charstring id) runs on BSSGP_ConnHdlr { var RoutingAreaIdentificationV old_ra := f_random_RAI(); @@ -1709,28 +1645,6 @@ f_cleanup(); }
-private function f_TC_attach_detach_check_subscriber_list(charstring id) runs on BSSGP_ConnHdlr { - f_TC_attach(id); - f_detach_mo(c_GMM_DTT_MO_GPRS, true, true); -} - -testcase TC_attach_detach_check_subscriber_list() runs on test_CT { - /* MS <-> SGSN: Attach - * MS -> SGSN: Detach Req (Power off) - * VTY -> SGSN: Check if MS is NOT in subscriber cache - */ - var BSSGP_ConnHdlr vc_conn; - var integer id := 33; - var charstring imsi := hex2str(f_gen_imsi(id)); - - f_init(); - vc_conn := f_start_handler(refers(f_TC_attach_detach_check_subscriber_list), testcasename(), g_gb, id); - vc_conn.done; - - f_vty_transceive_not_match(SGSNVTY, "show subscriber cache", pattern "* IMSI: {imsi}*"); - f_cleanup(); -} - /* Attempt an attach, but loose the Identification Request (IMSI) */ private function f_TC_attach_no_imsi_response(charstring id) runs on BSSGP_ConnHdlr { var integer count_req := 0; @@ -1780,91 +1694,6 @@ f_cleanup(); }
-private function f_sgsn_vty_destroy_subscriber_imsi(TELNETasp_PT pt, charstring imsi) { - f_vty_transceive(pt, "update-subscriber imsi " & imsi & " destroy"); -} - -testcase TC_attach_check_subscriber_list() runs on test_CT { - /* MS <-> SGSN: Attach - * VTY -> SGSN: Check if MS is in subscriber cache - */ - var BSSGP_ConnHdlr vc_conn; - var integer id := 34; - var charstring imsi := hex2str(f_gen_imsi(id)); - - f_init(); - f_sleep(1.0); - vc_conn := f_start_handler(refers(f_TC_attach), testcasename(), g_gb, id); - vc_conn.done; - - f_vty_transceive_match(SGSNVTY, "show subscriber cache", pattern "* IMSI: {imsi}*"); - f_sgsn_vty_destroy_subscriber_imsi(SGSNVTY, imsi); - f_cleanup(); -} - -private function f_TC_attach_closed_imsi_added(charstring id) runs on BSSGP_ConnHdlr { - var RoutingAreaIdentificationV old_ra := f_random_RAI(); - var PDU_L3_SGSN_MS l3_mt; - - /* unregister the old IMSI */ - f_bssgp_client_unregister(g_pars.imsi); - /* Simulate a foreign IMSI */ - g_pars.imsi := '001010123456700'H; - f_bssgp_client_register(g_pars.imsi, g_pars.tlli); - - /* there is no auth */ - g_pars.net.expect_auth := false; - - f_send_l3(ts_GMM_ATTACH_REQ(f_mi_get_lv(), old_ra, false, false, omit, omit)); - f_gmm_auth(); - alt { - [] BSSGP[0].receive(tr_GMM_ATTACH_REJECT(?)) { - setverdict(fail, "Received unexpected GMM Attach REJECT"); - mtc.stop; - } - [] BSSGP[0].receive(tr_GMM_ATTACH_ACCEPT(*, *, *)) -> value l3_mt { - f_process_attach_accept(l3_mt.msgs.gprs_mm.attachAccept); - f_send_l3(ts_GMM_ATTACH_COMPL); - setverdict(pass); - } - } -} - -private function f_TC_attach_closed_add_vty(charstring id) runs on BSSGP_ConnHdlr { - - f_TC_attach_closed_foreign(id); - f_TC_attach_closed_imsi_added(id); - -} - - -testcase TC_attach_closed_add_vty() runs on test_CT { - /* VTY-> SGSN: policy close - * MS -> SGSN: Attach Request - * MS <- SGSN: Identity Request IMSI - * MS -> SGSN: Identity Response IMSI - * MS <- SGSN: Attach Reject - * VTY-> SGSN: policy imsi-acl add IMSI - * MS -> SGSN: Attach Request - * MS <- SGSN: Identity Request IMSI - * MS -> SGSN: Identity Response IMSI - * MS <- SGSN: Identity Request IMEI - * MS -> SGSN: Identity Response IMEI - * MS <- SGSN: Attach Accept - */ - var BSSGP_ConnHdlr vc_conn; - f_init(); - f_sleep(1.0); - f_vty_config(SGSNVTY, "sgsn", "auth-policy closed"); - f_vty_config(SGSNVTY, "sgsn", "imsi-acl del 001010123456789"); - f_vty_config(SGSNVTY, "sgsn", "imsi-acl del 001010123456700"); - f_vty_config(SGSNVTY, "sgsn", "imsi-acl add 001010123456700"); - /* test with foreign IMSI: Must Reject */ - vc_conn := f_start_handler(refers(f_TC_attach_closed_add_vty), testcasename(), g_gb, 9); - vc_conn.done; - f_cleanup(); -} - /* Attempt an attach, but never answer a Attach Complete */ private function f_TC_attach_check_complete_resend(charstring id) runs on BSSGP_ConnHdlr { var integer count_req := 0; @@ -3456,12 +3285,7 @@ execute( TC_attach_gsup_lu_timeout() ); execute( TC_attach_gsup_lu_reject() ); execute( TC_attach_combined() ); - execute( TC_attach_accept_all() ); - execute( TC_attach_closed() ); execute( TC_attach_no_imsi_response() ); - execute( TC_attach_closed_add_vty(), 20.0 ); - execute( TC_attach_check_subscriber_list(), 20.0 ); - execute( TC_attach_detach_check_subscriber_list(), 20.0 ); execute( TC_attach_check_complete_resend() ); execute( TC_hlr_location_cancel_request_update(), 20.0 ); execute( TC_hlr_location_cancel_request_withdraw(), 20.0 ); diff --git a/sgsn/expected-results.xml b/sgsn/expected-results.xml index 173d706..90bfafa 100644 --- a/sgsn/expected-results.xml +++ b/sgsn/expected-results.xml @@ -21,12 +21,7 @@ </failure> </testcase> <testcase classname='SGSN_Tests' name='TC_attach_combined' time='MASKED'/> - <testcase classname='SGSN_Tests' name='TC_attach_accept_all' time='MASKED'/> - <testcase classname='SGSN_Tests' name='TC_attach_closed' time='MASKED'/> <testcase classname='SGSN_Tests' name='TC_attach_no_imsi_response' time='MASKED'/> - <testcase classname='SGSN_Tests' name='TC_attach_closed_add_vty' time='MASKED'/> - <testcase classname='SGSN_Tests' name='TC_attach_check_subscriber_list' time='MASKED'/> - <testcase classname='SGSN_Tests' name='TC_attach_detach_check_subscriber_list' time='MASKED'/> <testcase classname='SGSN_Tests' name='TC_attach_check_complete_resend' time='MASKED'/> <testcase classname='SGSN_Tests' name='TC_hlr_location_cancel_request_update' time='MASKED'/> <testcase classname='SGSN_Tests' name='TC_hlr_location_cancel_request_withdraw' time='MASKED'/>