Commit c2b4dd9e authored by Yann Garcia's avatar Yann Garcia
Browse files

Implement & validate TC_5GNAS_AMF_IDN_REQ_01

parent f122b692
Loading
Loading
Loading
Loading
+4.05 KiB

File added.

No diff preview for this file type.

+256 B (6.41 KiB)

File changed.

No diff preview for this file type.

+7 −1
Changes for etc/Ats_NG_NAS/Ats_NG_NAS_AMF_open5gs.cfg_: 7 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ NG_NAS_Pics.PICS_NAS_A4_1_2_3_1 := false # open5gs: AUTHENTICATION REJECT on #26
NG_NAS_Pics.PICS_NAS_A4_1_2_4   := true  # open5gs re-authenticates on #71 ngKSI already in use (TC_5GNAS_AMF_AUT_REQ_05)
NG_NAS_Pics.PICS_NAS_A4_2_1     := true  # security mode control (TC_5GNAS_AMF_SEC_COM_01)
NG_NAS_Pics.PICS_NAS_A4_2       := true  # security mode control procedure (TC_5GNAS_AMF_SEC_ACC_01)
NG_NAS_Pics.PICS_NAS_A4_3       := true  # identification procedure (TC_5GNAS_AMF_IDN_REQ_01)

LibNGAP_Pics.PICS_OFFLINE_MODE := false # true to use offline mode with pcap files, false to use online mode with real network functions
LibNGAP_Pics.PICS_USE_OPEN5GS  := false # true to start open5gs, false to not start them
@@ -192,7 +193,12 @@ system.utHttpPort.params := "HTTP/TCP(server=127.0.0.1,port=12200,use_ssl=0,debu
# Verify that the IUT, upon receiving the NAS SECURITY MODE COMPLETE message after completing the NAS Authentication and Security procedure, successfully completes the registration process by accepting the registration
#NG_NAS_TestCases.TC_5GNAS_AMF_SEC_ACC_01
# Verify that the IUT, upon receiving the NAS SECURITY MODE REJECT Message after a failed NAS Authentication and security procedure, successfully aborts the registration process by rejecting the registration
NG_NAS_TestCases.TC_5GNAS_AMF_SEC_REJ_01
#NG_NAS_TestCases.TC_5GNAS_AMF_SEC_REJ_01
# Verify that the IUT initiates the identification procedure by sending an IDENTITY_REQUEST message with identity type set to SUCI when the IUT receives a REGISTRATION_REQUEST message containing a 5G-GUTI that is not known by the IUT
NG_NAS_TestCases.TC_5GNAS_AMF_IDN_REQ_01 
# Verify that the IUT does not retransmit a CONFIGURATION_UPDATE_COMMAND containing only NITZ-related information elements when the Configuration update indication IE is absent or indicates that acknowledgement is not requested
NG_NAS_TestCases.TC_5GNAS_AMF_CNF_COM_01 
# Verify that the IUT, upon receipt of a UL NAS TRANSPORT message containing a PDU SESSION ESTABLISHMENT REQUEST, sends a PDU_SESSION_RESOURCE_SETUP_REQUEST carrying a DL NAS TRANSPORT message with a PDU SESSION ESTABLISHMENT ACCEPT
#NG_NAS_TestCases.TC_5GNAS_AMF_DLN_ACC_01
#NG_NAS_TestCases.TC_5GNAS_AMF_REG_ACC_01
#NG_NAS_TestCases.TC_5GNAS_AMF_REG_ACC_02
+12 −0
Changes for ttcn/Ats_NG_NAS/NG_NAS_Pics.ttcn: 12 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -58,6 +58,18 @@ module NG_NAS_Pics {
         */
        modulepar boolean PICS_NAS_A4_2 := true;

        /**
         * @desc Does the IUT support the identification procedure? (TS 24.501 clause 5.4.3)
         * @see  ETSI TS 103 921-1 Table A.4 (PICS_NAS_A4_3)
         */
        modulepar boolean PICS_NAS_A4_3 := true;

        /**
         * @desc Does the IUT send CONFIGURATION UPDATE COMMAND messages to the UE? (TS 24.501 clause 5.4.4)
         * @see  ETSI TS 103 921-1 Table A.4 (PICS_NAS_A4_4_1)
         */
        modulepar boolean PICS_NAS_A4_4_1 := true;
   
    } // End of group PICS_

} // End of module NG_NAS_Pics
 No newline at end of file
+65 −0
Changes for ttcn/Ats_NG_NAS/NG_NAS_TCFunctions.ttcn: 65 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -631,6 +631,71 @@ module NG_NAS_TCFunctions {
                    log("*** " & __SCOPE__ & ": INFO: Postamble done. ***");
                } // End of function f_TC_5GNAS_AMF_SEC_REJ_01

                /**
                 * @desc Testcase function for TC_5GNAS_AMF_IDN_REQ_01
                 * @see  TP_5GNAS_AMF_IDN_REQ_01: an initial REGISTRATION REQUEST with a 5G-GUTI of the IUT (its PLMN, AMF region,
                 *       AMF set and AMF pointer) but a 5G-TMSI it never assigned (PX_UNASSIGNED_5G_TMSI) is answered by a plain
                 *       IDENTITY REQUEST for the SUCI (TS 24.501 clause 5.4.3.2, TS 23.502 clause 4.2.2.2.2 step 6).
                 */
                function f_TC_5GNAS_AMF_IDN_REQ_01() runs on aMF_NGNAS_NGAPComponent {
                    // Local variables
                    var NG_NAS_DL_Message_Type v_message;
                    var NG_NAS_GutiParameters_Type v_gutiParameters := {
                                                                         AMF_RegionId := PX_AMF_REGION_ID,
                                                                         AMF_SetId    := PX_AMF_SET_ID,
                                                                         AMF_Pointer  := PX_AMF_POINTER,
                                                                         NG_TMSI      := oct2bit(PX_UNASSIGNED_5G_TMSI)
                                                                         };

                    // Preamble: NG SETUP, the UE is not registered
                    f_NGNAS_amf_init();
                    if (PICS_OFFLINE_MODE) {
                        f_await_NGSetupRequest_await_NGSetupResponse_amf();
                    } else {
                        f_send_NGSetupRequest_await_NGSetupResponse();
                    }
                    f_selfOrClientSyncAndVerdict(c_prDone, f_getVerdict());
                    log("*** " & __SCOPE__ & ": INFO: Preamble done. ***");

                    // Test Body
                    // When: initial REGISTRATION REQUEST with the unknown 5G-GUTI (5GS mobile identity without IEI)
                    if (PICS_OFFLINE_MODE) {
                        f_await_registration_request();
                    } else {
                        f_send_registration_request(f_NG_GutiParameters2MobileIdentity(fl_NasNN_MCC2PlmnId(PX_NAS_MCC, PX_NAS_MNC), v_gutiParameters, omit));
                    }
                    // Then: IDENTITY REQUEST for the SUCI
                    f_recv_NGAP_PDU(
                                    mw_ngap_initMsg(
                                                    mw_n2_DownlinkNASTransport(
                                                                               ?,
                                                                               vc_RAN_UE_ID,
                                                                               ? // IdentityRequest
                    )));
                    // AMF_UE_NGAP_ID, for the release of the UE in the postamble
                    vc_AMF_UE_ID := vc_recvNGAP_PDU.initiatingMessage.value_.downlinkNASTransport.protocolIEs[0].value_.aMF_UE_NGAP_ID;
                    f_NASPDU_Get(vc_recvNGAP_PDU);
                    if (f_Check_5GAKA_NAS_DL_Message(vc_recvNAS_PDU, mw_NG_IDENTITY_REQUEST(tsc_IdType_NG_SUCI), vc_ng_nas_security_params_type, vc_previous_nas_count_dl, v_message, vc_inner_message)) {
                        log("*** " & __SCOPE__ & ": PASS: Expected NG_IDENTITY_REQUEST for the SUCI ***");
                        setverdict(pass);
                    } else if (f_Check_5GAKA_NAS_DL_Message(vc_recvNAS_PDU, mw_NG_AUTHENTICATION_REQUEST, vc_ng_nas_security_params_type, vc_previous_nas_count_dl, v_message, vc_inner_message)) {
                        setverdict(fail, "*** " & __SCOPE__ & ": FAIL: AUTHENTICATION REQUEST instead of IDENTITY REQUEST: the IUT did not identify the UE with the unknown 5G-GUTI ***");
                    } else {
                        setverdict(fail, "*** " & __SCOPE__ & ": FAIL: plain IDENTITY REQUEST for the SUCI expected ***");
                    }
                    f_selfOrClientSyncAndVerdict(c_tbDone, f_getVerdict());
                    log("*** " & __SCOPE__ & ": INFO: Testbody done. ***");

                    // Postamble: the IDENTITY REQUEST is left unanswered, release of the UE context
                    f_NG_NAS_amf_UE_ReleaseContext(false);
                    f_postamble_NGAP_AMF();
                    f_selfOrClientSyncAndVerdict(c_poDone, f_getVerdict());
                    log("*** " & __SCOPE__ & ": INFO: Postamble done. ***");
                } // End of function f_TC_5GNAS_AMF_IDN_REQ_01

                function f_TC_5GNAS_AMF_CNF_COM_01() runs on aMF_NGNAS_NGAPComponent {
                } // End of function f_TC_5GNAS_AMF_CNF_COM_01

            } // End of group /*5_4_2_*/Security_mode_control_procedure

            group /*5_4_5_*/NAS_transport_procedure {
Loading