Commit 663529a3 authored by Yann Garcia's avatar Yann Garcia
Browse files

Review of TTCN-3 implementation & templates of all emergency TPs for the SIP part

parent 7e5795ab
Loading
Loading
Loading
Loading
+234 −26
Original line number Original line Diff line number Diff line
@@ -193,9 +193,8 @@ module AtsImsIot_TP_behavior_MW_IS {
        /**
        /**
         * @desc Verify that the I-CSCF successfully processes a first registration (Successful).
         * @desc Verify that the I-CSCF successfully processes a first registration (Successful).
         * Initial conditions with {
         * Initial conditions with {
         *     the UE_A entity isAttachedTo the EPC_A and
         *     the UE_A entity isEmergencyAttachedTo the EPC_A and
         *     the UE_A entity isNotRegisteredTo the IMS_A and
         *     the UE_A entity not isRegisteredTo the IMS_A
         *     the UE_B entity isNotRegisteredTo the IMS_B
         * }
         * }
         * 
         * 
         * Expected behaviour
         * Expected behaviour
@@ -206,7 +205,7 @@ module AtsImsIot_TP_behavior_MW_IS {
         *                 To indicating value PX_UE_A_SIP_URI,
         *                 To indicating value PX_UE_A_SIP_URI,
         *                 CallId indicating value PX_UE_A_CALLID,
         *                 CallId indicating value PX_UE_A_CALLID,
         *                 Via indicating value PX_UE_A_VIA,
         *                 Via indicating value PX_UE_A_VIA,
         *                 ;
         *                 Contact indicating value "sos";
         *             from the IMS_P_CSCF_A entity
         *             from the IMS_P_CSCF_A entity
         *         }
         *         }
         *         then {
         *         then {
@@ -236,7 +235,7 @@ module AtsImsIot_TP_behavior_MW_IS {
                                                         in boolean p_checkMessage := false
                                                         in boolean p_checkMessage := false
                                                         ) runs on ImsTestCoordinator {
                                                         ) runs on ImsTestCoordinator {
            if (isvalue(p_monitorCompRef)){
            if (isvalue(p_monitorCompRef)){
                var ImsUserInfo v_userInfoA := f_getSipUserId(PX_EUT_A);
                var ImsUserInfo v_userInfoA := f_getSipUserId(PX_EUT_A_EMERGENCY);
                var SipMessage v_sip;
                var SipMessage v_sip;
                
                
                // Check the first REGISTER
                // Check the first REGISTER
@@ -282,7 +281,7 @@ module AtsImsIot_TP_behavior_MW_IS {
                                                                                                )) 
                                                                                                )) 
                                                        },
                                                        },
                                                        {0, omit},
                                                        {0, omit},
                                                        "TP_MW_ICSCF_REGISTER_01 - 401 Unauthorized",
                                                        "TP_MW_ICSCF_ECO_REGISTER_01 - 401 Unauthorized",
                                                        false,
                                                        false,
                                                        p_checkMessage
                                                        p_checkMessage
                                                        )
                                                        )
@@ -400,12 +399,58 @@ module AtsImsIot_TP_behavior_MW_IS {
            }
            }
        } // End of function f_mtc_check_TP_MW_ICSCF_REGISTER_02
        } // End of function f_mtc_check_TP_MW_ICSCF_REGISTER_02
        
        
        /**
         * @desc Verify that the I-CSCF successfully processes a full registration (Successful).
         * Initial conditions with {
         *     the UE_A entity isEmergencyAttachedTo the EPC_A and
         *     the UE_A entity not isRegisteredTo the IMS_A and
         *     the UE_A entity hasAchievedFirstREGISTER
         * }
         * 
         * Expected behaviour
         *     ensure that {
         *         when {
         *             the IMS_I_CSCF_A entity receives a REGISTER containing
         *                 From indicating value PX_UE_A_SIP_URI,
         *                 To indicating value PX_UE_A_SIP_URI,
         *                 CallId indicating value PX_UE_A_CALLID,
         *                 Via indicating value PX_UE_A_VIA,
         *                 Authorization containing
         *                     Authentication_Scheme indicating value PX_TO_BE_DEFINED,
         *                     Authentication_URI indicating value PX_TO_BE_DEFINED,
         *                     Realm indicating value PX_UE_A_REALM,
         *                     Algorithm indicating value PX_UE_A_AUTH_ALG,
         *                     Nonce indicating value "not empty",
         *                     qop indicating value "auth";,
         *                 Contact indicating value "sos";
         *             from the IMS_P_CSCF_A entity
         *         }
         *         then {
         *             the IMS_I_CSCF_A entity sends an 401_Unauthorized containing
         *                 From indicating value PX_UE_A_SIP_URI,
         *                 To indicating value PX_UE_A_SIP_URI,
         *                 CallId indicating value PX_UE_A_CALLID,
         *                 Via indicating value PX_UE_A_VIA,
         *                 AuthenticationInfo,
         *                 PAccessNetworkInfo,
         *                 PAssociatedURI indicating value PX_UE_A_SIP_URI,
         *                 PChargingVector,
         *                     orig_ioi_parameter 
         *                         indicating value "Operator Identifier Of ImsA" ,
         *                     term_ioi_parameter 
         *                         indicating value "Operator Identifier Of ImsB";,
         *                 Path,
         *                 ServiceRoute;
         *             to the IMS_S_CSCF_A entity
         *         }
         *     }
         */
        function f_mtc_check_TP_MW_ICSCF_ECO_REGISTER_02(
        function f_mtc_check_TP_MW_ICSCF_ECO_REGISTER_02(
                                                         in SipInterfaceMonitor p_monitorCompRef,
                                                         in SipInterfaceMonitor p_monitorCompRef,
                                                         in boolean p_checkMessage := false
                                                         in boolean p_checkMessage := false
                                                         ) runs on ImsTestCoordinator {
                                                         ) runs on ImsTestCoordinator {
            if (isvalue(p_monitorCompRef)){
            if (isvalue(p_monitorCompRef)){
                var ImsUserInfo v_userInfoA := f_getSipUserId(PX_EUT_A);
                var ImsUserInfo v_userInfoA := f_getSipUserId(PX_EUT_A_EMERGENCY);
                var SipMessage v_sip;
                var SipMessage v_sip;
                
                
                // Check the first REGISTER
                // Check the first REGISTER
@@ -559,9 +604,9 @@ module AtsImsIot_TP_behavior_MW_IS {
        /**
        /**
         * @desc Verify that the I-CSCF successfully processes a invalid first registration (Unsuccessful).
         * @desc Verify that the I-CSCF successfully processes a invalid first registration (Unsuccessful).
         * Initial conditions with {
         * Initial conditions with {
         *     the UE_A entity isAttachedTo the EPC_A and
         *     the UE_A entity isEmergencyAttachedTo the EPC_A and
         *     the UE_A entity isNotRegisteredTo the IMS_A and
         *     the UE_A entity isNotRegisteredTo the IMS_A and
         *     the UE_B entity isNotRegisteredTo the IMS_B
         *     the UE_A entity hasAchievedFirstREGISTER
         * }
         * }
         * 
         * 
         * Expected behaviour
         * Expected behaviour
@@ -572,20 +617,11 @@ module AtsImsIot_TP_behavior_MW_IS {
         *             To indicating value PX_UE_A_SIP_URI,
         *             To indicating value PX_UE_A_SIP_URI,
         *             CallId indicating value PX_UE_A_CALLID,
         *             CallId indicating value PX_UE_A_CALLID,
         *             Via indicating value PX_UE_A_VIA,
         *             Via indicating value PX_UE_A_VIA,
         *             Authorization containing
         *             Authorization indicating value "invalid credentials";
         *                 Authentication_Schema indicating value PX_TO_BE_DEFINED,
         *                 Authentication_URI indicating value PX_TO_BE_DEFINED,
         *                 Username indicating value PX_UE_A_INVALID_USERNAME,
         *                 Realm indicating value PX_UE_A_REALM,
         *                 Algorithm indicating value PX_UE_A_AUTH_ALG,
         *                 Nonce indicating value "not empty",
         *                 qop indicating value "auth",
         *             not SecurityClient
         *             ;;
         *         from the IMS_P_CSCF_A entity
         *         from the IMS_P_CSCF_A entity
         *     }
         *     }
         *     then {
         *     then {
         *         the IMS_I_CSCF_A entity sends an 404_NotFound containing
         *         the IMS_I_CSCF_A entity sends an 403_Forbiden containing
         *             From indicating value PX_UE_A_SIP_URI,
         *             From indicating value PX_UE_A_SIP_URI,
         *             To indicating value PX_UE_A_SIP_URI,
         *             To indicating value PX_UE_A_SIP_URI,
         *             CallId indicating value PX_UE_A_CALLID
         *             CallId indicating value PX_UE_A_CALLID
@@ -599,7 +635,7 @@ module AtsImsIot_TP_behavior_MW_IS {
                                                         in boolean p_checkMessage := true
                                                         in boolean p_checkMessage := true
                                                         ) runs on ImsTestCoordinator {
                                                         ) runs on ImsTestCoordinator {
            if (isvalue(p_monitorCompRef)){
            if (isvalue(p_monitorCompRef)){
                var ImsUserInfo v_userInfoA := f_getSipUserId(PX_EUT_A); // User removed from HSS
                var ImsUserInfo v_userInfoA := f_getSipUserId(PX_EUT_A_EMERGENCY); // User removed from HSS
                var SipMessage v_sip;
                var SipMessage v_sip;
                
                
                // Check the first REGISTER
                // Check the first REGISTER
@@ -610,7 +646,7 @@ module AtsImsIot_TP_behavior_MW_IS {
                                                                          mw_TP_MW_ICSCF_ECO_REGISTER_03(
                                                                          mw_TP_MW_ICSCF_ECO_REGISTER_03(
                                                                                                         mw_From_AddrUnion_SipUrl(omit, v_userInfoA.publicId, v_userInfoA.domain),
                                                                                                         mw_From_AddrUnion_SipUrl(omit, v_userInfoA.publicId, v_userInfoA.domain),
                                                                                                         mw_To_AddrUnion_SipUrl(omit, v_userInfoA.publicId, v_userInfoA.domain),
                                                                                                         mw_To_AddrUnion_SipUrl(omit, v_userInfoA.publicId, v_userInfoA.domain),
                                                                                                         mw_Authorization_other/*(mw_credentialIntegrityYes)*/
                                                                                                         mw_Authorization_other/*(mw_credentialIntegrityYes)*/ // FIXME indicating value "Invalid credentials"
                                                                                                         )
                                                                                                         )
                                                                          )
                                                                          )
                                                        },
                                                        },
@@ -618,7 +654,7 @@ module AtsImsIot_TP_behavior_MW_IS {
                                                            mw_SipRequest(mw_REGISTER_Request_Base)
                                                            mw_SipRequest(mw_REGISTER_Request_Base)
                                                        },
                                                        },
                                                        {0, omit},
                                                        {0, omit},
                                                        "TP_MW_ICSCF_REGISTER_03 - First request",
                                                        "TP_MW_ICSCF_ECO_REGISTER_03 - First request",
                                                        true,
                                                        true,
                                                        p_checkMessage
                                                        p_checkMessage
                                                        )
                                                        )
@@ -629,11 +665,11 @@ module AtsImsIot_TP_behavior_MW_IS {
                if (not(isbound(v_sip))) {
                if (not(isbound(v_sip))) {
                    return;
                    return;
                }
                }
                // Check REGISTER 404 Not Found response
                // Check REGISTER 403 Forbidden response
                p_monitorCompRef.start(
                p_monitorCompRef.start(
                                       f_Iot_Sip_receive(
                                       f_Iot_Sip_receive(
                                                        { 
                                                        { 
                                                            mw_SipResponse(mw_404NotFound(v_sip.request.msgHeader.cSeq, mw_WwwAuthenticate)),
                                                            mw_SipResponse(mw_403Forbidden(v_sip.request.msgHeader.cSeq, mw_WwwAuthenticate)),
                                                            mw_SipResponse(mw_480TemporaryUnavailable(-, v_sip.request.msgHeader.cSeq, mw_WwwAuthenticate))
                                                            mw_SipResponse(mw_480TemporaryUnavailable(-, v_sip.request.msgHeader.cSeq, mw_WwwAuthenticate))
                                                        },
                                                        },
                                                        {
                                                        {
@@ -643,7 +679,7 @@ module AtsImsIot_TP_behavior_MW_IS {
                                                                                                )) 
                                                                                                )) 
                                                        },
                                                        },
                                                        {0, omit},
                                                        {0, omit},
                                                        "TP_MW_ICSCF_REGISTER_03 - 404 Not Found",
                                                        "TP_MW_ICSCF_REGISTER_04 - 403 Firbidden",
                                                        false,
                                                        false,
                                                        p_checkMessage
                                                        p_checkMessage
                                                        )
                                                        )
@@ -652,6 +688,178 @@ module AtsImsIot_TP_behavior_MW_IS {
            }
            }
        } // End of function f_mtc_check_TP_MW_ICSCF_ECO_REGISTER_03
        } // End of function f_mtc_check_TP_MW_ICSCF_ECO_REGISTER_03
        
        
        /**
         * @desc Verify that the I-CSCF processes an invalid first registration in visited network and sends 403 response (Unsuccessful).
         * Initial conditions with {
         *     the UE_A entity isEmergencyAttachedTo the EPC_A and
         *     the UE_A entity isNotRegisteredTo the IMS_B
         * }
         * 
         * Expected behaviour
         * ensure that {
         *     when {
         *         the IMS_I_CSCF_A entity receives a REGISTER containing
         *             From indicating value PX_UE_A_SIP_URI,
         *             To indicating value PX_UE_A_SIP_URI,
         *             CallId indicating value PX_UE_A_CALLID,
         *             Via indicating value PX_UE_A_VIA,
         *             Authorization indicating value "invalid credentials";
         *         from the IMS_P_CSCF_A entity
         *     }
         *     then {
         *         the IMS_I_CSCF_A entity sends an 403_Forbiden containing
         *             From indicating value PX_UE_A_SIP_URI,
         *             To indicating value PX_UE_A_SIP_URI,
         *             CallId indicating value PX_UE_A_CALLID
         *             ;
         *         to the IMS_P_CSCF_A entity
         *         }
         *     }
         */
        function f_mtc_check_TP_MW_ICSCF_ECO_REGISTER_04(
                                                         in SipInterfaceMonitor p_monitorCompRef,
                                                         in boolean p_checkMessage := true
                                                         ) runs on ImsTestCoordinator {
            if (isvalue(p_monitorCompRef)){
                var ImsUserInfo v_userInfoA := f_getSipUserId(PX_EUT_A_EMERGENCY); // User removed from HSS
                var SipMessage v_sip;
                
                // Check the first REGISTER
                p_monitorCompRef.start(
                                       f_Iot_Sip_receive(
                                                        {
                                                            mw_SipRequest(
                                                                          mw_TP_MW_ICSCF_ECO_REGISTER_03(
                                                                                                         mw_From_AddrUnion_SipUrl(omit, v_userInfoA.publicId, v_userInfoA.domain),
                                                                                                         mw_To_AddrUnion_SipUrl(omit, v_userInfoA.publicId, v_userInfoA.domain),
                                                                                                         mw_Authorization_other/*(mw_credentialIntegrityYes)*/ // FIXME indicating value "Invalid credentials"
                                                                                                         )
                                                                          )
                                                        },
                                                        { 
                                                            mw_SipRequest(mw_REGISTER_Request_Base)
                                                        },
                                                        {0, omit},
                                                        "TP_MW_ICSCF_ECO_REGISTER_04 - First request",
                                                        true,
                                                        p_checkMessage
                                                        )
                                       );
                p_monitorCompRef.done;
                // Retrieve messge
                f_getSipMsgFromMonitor(p_monitorCompRef, v_sip);
                if (not(isbound(v_sip))) {
                    return;
                }
                // Check REGISTER 402 Forbidden response
                p_monitorCompRef.start(
                                       f_Iot_Sip_receive(
                                                        { 
                                                            mw_SipResponse(mw_403Forbidden(v_sip.request.msgHeader.cSeq, mw_WwwAuthenticate)),
                                                            mw_SipResponse(mw_480TemporaryUnavailable(-, v_sip.request.msgHeader.cSeq, mw_WwwAuthenticate))
                                                        },
                                                        {
                                                            mw_SipResponse(mw_Response_4xx_Base(
                                                                                                v_sip.request.msgHeader.callId,
                                                                                                v_sip.request.msgHeader.cSeq
                                                                                                )) 
                                                        },
                                                        {0, omit},
                                                        "TP_MW_ICSCF_REGISTER_04 - 403 Firbidden",
                                                        false,
                                                        p_checkMessage
                                                        )
                                       );
                p_monitorCompRef.done;
            }
        } // End of function f_mtc_check_TP_MW_ICSCF_ECO_REGISTER_04
        
        /**
         * @desc Verify that the I-CSCF processes an invalid first registration without SecurityClient header in visited network(GIBA supported) and sends 420 response (Unsuccessful).
         * Initial conditions with {
         *     the UE_A entity isEmergencyAttachedTo the EPC_A and
         *     the UE_A entity isNotRegisteredTo the IMS_B
         * }
         * 
         * Expected behaviour
         * ensure that {
         *     when {
         *         the IMS_I_CSCF_A entity receives a REGISTER containing
         *             From indicating value PX_UE_A_SIP_URI,
         *             To indicating value PX_UE_A_SIP_URI,
         *             CallId indicating value PX_UE_A_CALLID,
         *             Via indicating value PX_UE_A_VIA,
         *             Authorization indicating value "invalid credentials";
         *         from the IMS_P_CSCF_A entity
         *     }
         *     then {
         *         the IMS_I_CSCF_A entity sends an 420_BadExtension containing
         *             From indicating value PX_UE_A_SIP_URI,
         *             To indicating value PX_UE_A_SIP_URI,
         *             CallId indicating value PX_UE_A_CALLID
         *             ;
         *         to the IMS_P_CSCF_A entity
         *         }
         *     }
         */
        function f_mtc_check_TP_MW_ICSCF_ECO_REGISTER_05(
                                                         in SipInterfaceMonitor p_monitorCompRef,
                                                         in boolean p_checkMessage := true
                                                         ) runs on ImsTestCoordinator {
            if (isvalue(p_monitorCompRef)){
                var ImsUserInfo v_userInfoA := f_getSipUserId(PX_EUT_A_EMERGENCY); // User removed from HSS
                var SipMessage v_sip;
                
                // Check the first REGISTER
                p_monitorCompRef.start(
                                       f_Iot_Sip_receive(
                                                        {
                                                            mw_SipRequest(
                                                                          mw_TP_MW_ICSCF_ECO_REGISTER_03(
                                                                                                         mw_From_AddrUnion_SipUrl(omit, v_userInfoA.publicId, v_userInfoA.domain),
                                                                                                         mw_To_AddrUnion_SipUrl(omit, v_userInfoA.publicId, v_userInfoA.domain),
                                                                                                         mw_Authorization_other/*(mw_credentialIntegrityYes)*/ // FIXME indicating value "Invalid credentials"
                                                                                                         )
                                                                          )
                                                        },
                                                        { 
                                                            mw_SipRequest(mw_REGISTER_Request_Base)
                                                        },
                                                        {0, omit},
                                                        "TP_MW_ICSCF_ECO_REGISTER_05 - First request",
                                                        true,
                                                        p_checkMessage
                                                        )
                                       );
                p_monitorCompRef.done;
                // Retrieve messge
                f_getSipMsgFromMonitor(p_monitorCompRef, v_sip);
                if (not(isbound(v_sip))) {
                    return;
                }
                // Check REGISTER 420 Bad Extension response
                p_monitorCompRef.start(
                                       f_Iot_Sip_receive(
                                                        { 
                                                            mw_SipResponse(mw_420BadExtension(v_sip.request.msgHeader.cSeq, mw_WwwAuthenticate)),
                                                            mw_SipResponse(mw_480TemporaryUnavailable(-, v_sip.request.msgHeader.cSeq, mw_WwwAuthenticate))
                                                        },
                                                        {
                                                            mw_SipResponse(mw_Response_4xx_Base(
                                                                                                v_sip.request.msgHeader.callId,
                                                                                                v_sip.request.msgHeader.cSeq
                                                                                                )) 
                                                        },
                                                        {0, omit},
                                                        "TP_MW_ICSCF_REGISTER_04 - 403 Firbidden",
                                                        false,
                                                        p_checkMessage
                                                        )
                                       );
                p_monitorCompRef.done;
            }
        } // End of function f_mtc_check_TP_MW_ICSCF_ECO_REGISTER_05
        
        function f_mtc_check_TP_MW_ICSCF_REGISTER_04( // FIXME RMI To be reviewed
        function f_mtc_check_TP_MW_ICSCF_REGISTER_04( // FIXME RMI To be reviewed
                                                     in SipInterfaceMonitor p_monitorCompRef,
                                                     in SipInterfaceMonitor p_monitorCompRef,
                                                     in boolean p_checkMessage := true
                                                     in boolean p_checkMessage := true
+103 −20

File changed.

Preview size limit exceeded, changes collapsed.