Commit 73aa68d2 authored by pintar's avatar pintar
Browse files

Changes done due to week 4, 5 and 6 when validation against real SUT was done:

-some templates were adopted
-logs were introduced to help tester in case of verdict fail
-correct Origin-Host AVP and Destination-Host AVP values were set in awaiting message requests
-few issues were solved due to different values as specified in TSS/TP
-some test case postambles were changed and some deregistrations were removed due to already performed administrative deregistration
-introduction of new constants related to SIP-Authentication-Scheme values
-Test Cases TC_CX_HSS_ER_01 - 03 removed due to TSS/TP change - removed because of wrong interpretation of standard
parent e8e0210d
Loading
Loading
Loading
Loading
+177 −497

File changed.

Preview size limit exceeded, changes collapsed.

+1 −1
Original line number Diff line number Diff line
@@ -156,7 +156,7 @@ module DiameterCxDx_Dx_TCFunctions {
    
                f_send_MAR(m_MAR_Msg( 
                                vc_sessionId, 
                                m_MAR_withServerName(
                                m_MAR_basic(
                                    vc_originHost,
                                    vc_originRealm,
                                    vc_destinationRealm,
+16 −4
Original line number Diff line number Diff line
@@ -75,6 +75,9 @@
            vc_destinationHost := m_destinationHost(PX_DestinationHost);
            vc_destinationRealm := m_destinationRealm(PX_DestinationRealm);

            vc_destinationHost_IUT := m_destinationHost(PX_OriginHost);
            vc_destinationRealm_IUT := m_destinationRealm(PX_OriginRealm);

            vc_serverName := m_serverName(PX_ServerName);
            vc_publicIdentity := m_publicIdentity(PX_PublicIdentity);

@@ -115,6 +118,9 @@
            vc_destinationHost := m_destinationHost(PX_DestinationHost);
            vc_destinationRealm := m_destinationRealm(PX_DestinationRealm);

            vc_destinationHost_IUT := m_destinationHost(PX_OriginHost);
            vc_destinationRealm_IUT := m_destinationRealm(PX_OriginRealm);

            vc_publicIdentity := m_publicIdentity(PX_PublicIdentity);
            vc_visitedNetworkId := m_visitedNetworkId(char2oct(PX_VisitedNetworkId));
            
@@ -157,6 +163,9 @@
            vc_destinationHost := m_destinationHost(PX_DestinationHost);
            vc_destinationRealm := m_destinationRealm(PX_DestinationRealm);

            vc_destinationHost_IUT := m_destinationHost(PX_OriginHost);
            vc_destinationRealm_IUT := m_destinationRealm(PX_OriginRealm);

            vc_serverName := m_serverName(PX_ServerName);
            
            vc_publicIdentity := m_publicIdentity(PX_PublicIdentity);
@@ -200,6 +209,9 @@
            vc_destinationHost := m_destinationHost(PX_DestinationHost);
            vc_destinationRealm := m_destinationRealm(PX_DestinationRealm);

            vc_destinationHost_IUT := m_destinationHost(PX_OriginHost);
            vc_destinationRealm_IUT := m_destinationRealm(PX_OriginRealm);

            vc_hostIPAddress := valueof(f_IPV4or6_String2Address (PX_DIAMETER_DX_ETS_SLF_IPADDR));

            vc_send_hopid:=hex2int('00000100'H);
@@ -470,14 +482,14 @@
        function f_s_MAR_MAA (in Session_Id_AVP p_sessionId) runs on DiameterCx {
            f_send_MAR(m_MAR_Msg( 
                            p_sessionId, 
                            m_MAR_withServerName(
                            m_MAR_basic(
                                vc_originHost,
                                vc_originRealm,
                                vc_destinationRealm,
                                vc_userName,
                                vc_publicIdentity,
                                m_sIPNumberAuthItems(1),
                                m_sIPAuthDataItem_authScheme(m_sIPAuthenticationScheme("DIGEST")), //TODO: DIGEST_E or DIGEST_AKAv1_MD5_E need to be set
                                m_sIPAuthDataItem_authScheme(m_sIPAuthenticationScheme(c_SIP_Digest)), //At the moment DIGEST is set as default but may be also DIGEST_AKAv1_MD5
                                vc_serverName
                            )
            ));
@@ -504,7 +516,7 @@
                                vc_serverName,
                                m_serverAssignmentType(p_serverAssignmentType),
                                m_userDataAlreadyAvailable(USER_DATA_NOT_AVAILABLE_E),
                                omit,
                                omit,//vc_userName  - it is optional due to 129 229 6.1.3 but may be also set on value vc_userName 
                                v_publicIdentity
                            )
            ));
@@ -632,7 +644,7 @@
                            ?,
                            mw_experimentalResultCode(
                                ?, 
                                DIAMETER_FIRST_REGISTRATION_E
                                (DIAMETER_FIRST_REGISTRATION_E, DIAMETER_SUBSEQUENT_REGISTRATION_E)
            )))));
        } // End of function f_hssInitialRegistrationCx
        
+53 −57
Original line number Diff line number Diff line
@@ -34,6 +34,17 @@ module DiameterCxDx_Templates {
        extension "File:../xsd/CxData_Type_Rel10.xsd";
    }
    
    group DiameterConstants_CxDx{
        
        //SIP Authentication-Scheme AVP values due to 129 228 Table 6.3.2
        const UTF8String c_SIP_Digest := "SIP Digest";
        const UTF8String c_AKAv1      := "Digest-AKAv1-MD5";
        const UTF8String c_NASS       := "NASS-Bundled";
        const UTF8String c_GIBA       := "Early-IMS-Security";  //GPRS-IMS-Bundled Authentication
        const UTF8String c_Unknown    := "Unknown";
        
    }// end group DiameterConstants_CxDx
    
    group SubFields{
    } //end group SubFields

@@ -82,7 +93,7 @@ module DiameterCxDx_Templates {
                    experimental_Result_Code := m_experimentalResultCode(p_expResultCode)
                }
                                
                template Originating_Request_AVP m_originating_Request_AVP(in Originating_Request_Code p_aVP_Data := ORIGINATING
                template Originating_Request_AVP m_originating_Request(in Originating_Request_Code p_aVP_Data := ORIGINATING
                ) := {
                    aVP_Header := m_aVP_HeaderVid_Mbit1(c_originating_Request_AVP_Code, 4, c_vendId3gpp),
                    aVP_Data := p_aVP_Data
@@ -261,7 +272,7 @@ module DiameterCxDx_Templates {
                    }
                }
                
                template SIP_Auth_Data_Item_AVP m_sIPAuthDataItem_authScheme_sipAuthorization (template (value) SIP_Authentication_Scheme_AVP   p_sIP_Authentication_Scheme,
                template SIP_Auth_Data_Item_AVP m_sIPAuthDataItem_AKAv1 (template (value) SIP_Authentication_Scheme_AVP   p_sIP_Authentication_Scheme,
                                                                         template (value) SIP_Authorization_AVP           p_sIP_Authorization
                ) modifies m_sIPAuthDataItem_dummy := {
                    sIP_Auth_Data_Item_3GPP_AVP :={
@@ -302,6 +313,18 @@ module DiameterCxDx_Templates {
                        sIP_Authentication_Context  := p_sIP_Authentication_Context
                    }
                }
                
                template Integrity_Key_AVP m_integrityKey(octetstring p_avpData) := {
                    aVP_Header := m_aVP_HeaderVid_Mbit1(c_integrity_Key_AVP_Code, f_getOctetStringLength(p_avpData), c_vendId3gpp),
                    aVP_Data := p_avpData
                }
                
                template SIP_Authenticate_AVP m_sIPAuthenticate( octetstring p_avpData) := {
                    sIP_Authenticate_3GPP_AVP :={
                        aVP_Header  := m_aVP_HeaderVid_Mbit1(c_sIP_Authenticate_AVP_Code, f_getOctetStringLength(p_avpData), c_vendId3gpp),
                        aVP_Data    := p_avpData
                    }
                }
//                
//                template SIP_Auth_Data_Item_AVP m_sIPAuthDataItem (template (value) SIP_Authentication_Scheme_AVP   p_sIP_Authentication_Scheme,
//                                                                                               template (omit) SIP_Item_Number_AVP              p_sIP_Item_Number := omit,
@@ -998,10 +1021,11 @@ module DiameterCxDx_Templates {
            template (value) MAR_Body_AVP m_MAR_basic (template (value) Origin_Host_AVP           p_originHost,
                                                       template (value) Origin_Realm_AVP          p_originRealm,
                                                       template (value) Destination_Realm_AVP     p_destinationRealm,
                                                       template (omit) User_Name_AVP             p_userName,
                                                       template (omit) Public_Identity_AVP       p_publicIdentity,
                                                       template (omit) SIP_Number_Auth_Items_AVP p_SIPNumberAuthItems,
                                                       template (omit) SIP_Auth_Data_Item_AVP    p_SIPAuthDataItem)
                                                       template (value) User_Name_AVP             p_userName,
                                                       template (value) Public_Identity_AVP       p_publicIdentity,
                                                       template (value) SIP_Number_Auth_Items_AVP p_SIPNumberAuthItems,
                                                       template (value) SIP_Auth_Data_Item_AVP    p_SIPAuthDataItem,
                                                       template (value) Server_Name_AVP           p_serverName)
            modifies m_MAR_Body_dummy := {
                vendor_Specific_Application_Id := m_vendor_Specific_Appl_Id_Cx, //mandatory in TS 129 229
                auth_Application_Id := omit,                                    //not in TS 129 229
@@ -1018,7 +1042,7 @@ module DiameterCxDx_Templates {
                sIP_Server_URI := omit,
                sIP_Number_Auth_Items := p_SIPNumberAuthItems,  //required in TS129 229
                sIP_Auth_Data_Item := p_SIPAuthDataItem,        //required in TS129 229
                server_Name := omit,                            //only TS129 229
                server_Name := p_serverName,                    //only TS129 229
                failed := omit,                                 //only TS129 229
                proxy_Info := omit,
                route_Record := omit,
@@ -1499,18 +1523,6 @@ module DiameterCxDx_Templates {
                    public_Identity := p_publicIdentities
                }
                
                template (value) MAR_Body_AVP m_MAR_withServerName( template (value) Origin_Host_AVP           p_originHost,
                                                                    template (value) Origin_Realm_AVP          p_originRealm,
                                                                    template (value) Destination_Realm_AVP     p_destinationRealm,
                                                                    template (omit) User_Name_AVP             p_userName,
                                                                    template (omit) Public_Identity_AVP       p_publicIdentity,
                                                                    template (omit) SIP_Number_Auth_Items_AVP p_SIPNumberAuthItems,
                                                                    template (omit) SIP_Auth_Data_Item_AVP    p_SIPAuthDataItem,
                                                                    template (omit) Server_Name_AVP           p_serverName
                                                                  )
                modifies m_MAR_basic := {
                    server_Name := p_serverName
                }
                template (value) RTR_Body_AVP m_RTR_wo_VSAId (template (value) Origin_Host_AVP           p_originHost,
                                                              template (value) Origin_Realm_AVP          p_originRealm,
                                                              template (value) Destination_Host_AVP      p_destinationHost,
@@ -1601,26 +1613,12 @@ module DiameterCxDx_Templates {
                                                       template (present) User_Name_AVP             p_userName,
                                                       template (present) Deregistration_Reason_AVP p_deregistrationReason
                ) modifies mw_RTR_basic := {
                    vendor_Specific_Application_Id := mw_vendor_Specific_Appl_Id(   //mandatory in TS 129 229
                                                                                 m_vendorId(
                                                                                            c_vendId3gpp
                    )),
                    auth_Application_Id := *,                                       //not in TS 129 229
                    auth_Session_State := m_auth_Session_State_no_maintained,       //mandatory in TS 129 229
                    origin_Host := p_originHost,                                    //mandatory in TS 129 229
                    origin_Realm := p_originRealm,                                  //mandatory in TS 129 229
                    destination_Host := p_destinationHost,                          //mandatory in TS 129 229
                    sIP_Deregistration_Reason := *,                                 //not in TS 129 229
                    destination_Realm := p_destinationRealm,                        //mandatory in TS 129 229
                    user_Name := p_userName,                                        //mandatory in TS 129 229
                    sIP_AOR := *,                                                   //not in TS 129 229
                    associated_Identities := *,                                     //optional in TS 129 229
                    supported_Features := *,                                        //optional in TS129 229
                    public_Identity := *,                                           //optional TS129 229
                    deregistration_Reason := p_deregistrationReason,                //mandatory in TS129 229
                    proxy_Info := *,
                    route_Record := *,
                    aVP_Type := *
                    origin_Host           := p_originHost,
                    origin_Realm          := p_originRealm,
                    destination_Host      := p_destinationHost,
                    destination_Realm     := p_destinationRealm,
                    user_Name             := p_userName,
                    deregistration_Reason := p_deregistrationReason
                }
                
                template (present) RTR_Body_AVP mw_RTR_publicIdentity(
@@ -1632,7 +1630,13 @@ module DiameterCxDx_Templates {
                                                                      template (present) Deregistration_Reason_AVP p_deregistrationReason := ?,
                                                                      template (present) Public_Identity_AVPs      p_publicIdentity := ?
                ) modifies mw_RTR_basic := {
                    public_Identity := p_publicIdentity //optional TS129 229
                    origin_Host           := p_originHost,
                    origin_Realm          := p_originRealm,
                    destination_Host      := p_destinationHost,
                    destination_Realm     := p_destinationRealm,
                    user_Name             := p_userName,
                    deregistration_Reason := p_deregistrationReason,
                    public_Identity       := p_publicIdentity 
                }
                
                template (present) LIR_Body_AVP mw_LIR_authSessState (template (present) Auth_Session_State_AVP p_authSessionState) 
@@ -1665,6 +1669,11 @@ module DiameterCxDx_Templates {
                                                        template Charging_Information_AVP            p_charging_Information := omit,
                                                        template SIP_Auth_Data_Item_AVP              p_sIP_Auth_Data_Item := omit
                ) modifies mw_PPR_basic := {
                    origin_Host           := p_originHost,
                    origin_Realm          := p_originRealm,
                    destination_Host      := p_destinationHost,
                    destination_Realm     := p_destinationRealm,
                    user_Name             := p_userName,
                    user_Data             := p_userData,
                    charging_Information  := p_charging_Information,
                    sIP_Auth_Data_Item    := p_sIP_Auth_Data_Item
@@ -1805,19 +1814,6 @@ module DiameterCxDx_Templates {
                    sIP_Auth_Data_Item      := p_sIP_Auth_Data_Item
                }
                
                template MAA_Body_AVP mw_MAA_ResulExpreUsrnaSipauthSrvna (template Result_Code_AVP p_resultCode, 
                                                                          template Experimental_Result_AVP p_experimentalResult,
                                                                          template (present) User_Name_AVP p_user_Name := ?,
                                                                          template (present) SIP_Number_Auth_Items_AVP p_sIP_Number_Auth_Items := ?,
                                                                          template (present) MAA_Body_AVP.sIP_Auth_Data_Item p_sIP_Auth_Data_Item := ?,
                                                                          template (present) Server_Name_AVP p_server_Name := ?
                ) modifies mw_MAA_ResulExpre := {
                    user_Name               := p_user_Name,
                    sIP_Number_Auth_Items   := p_sIP_Number_Auth_Items,
                    sIP_Auth_Data_Item      := p_sIP_Auth_Data_Item,
                    server_Name             := p_server_Name
                }
                
            } // end group CxModified_answer_templates_receive
            
        } //end group CxModified_templates
+0 −186
Original line number Diff line number Diff line
@@ -4827,192 +4827,6 @@ module DiameterCxDx_TestCases
                
            } // group TP_HSSRole_MA
            
            group TP_HSSRole_ER {//Cx ER
            
                /**
                 * @desc    Verify that the IUT in case of registration error cases return appropriate response
                 * <pre>
                 * Pics Selection: PICS_HSS_IUT and PICS_DIGEST_AKAv1_MD5_AUTH_PROCS
                 * Initial conditions: 
                 *     with {
                 *        The user profile indicates an attached S-CSCF name
                 *     }
                 * Expected behaviour:
                 *     ensure that {
                 *        when {
                 *            the IUT receives a MA-Request
                 *                containing a Server-Name AVP
                 *                   indicating an S-CSCF name different than the previous one
                 *               containing a SIP-Number-Auth-Items AVP
                 *                   indicating the number of authentication vectors requested
                 *               containing a SIP-Auth-Data-Item AVP
                 *                   containing a SIP-Athentication-Scheme
                 *                       indicating “Digest-AKAv1-MD5”
                 *                   not containing SIP-Authentication-Context AVP
                 *        }
                 *        then {
                 *            the IUT sends a MA-Answer 
                 *                containing a Server-Name AVP
                 *                   indicating the new S-CSCF name
                 *               containing a SIP-Number-Auth-Items AVP
                 *                   indicating a set of authentication vectors
                 *               containing a SIP-Auth-Data-Item AVP
                 *                   containing SIP-Authentication-Scheme AVP
                 *                       indicating “Digest-AKAv1-MD5”
                 *                   containing SIP-Authenticate AVP
                 *                       containing AUTS parameter
                 *                   containing SIP-Authotization AVP
                 *                       indicating the expected response XRES
                 *                   containing Integrity-Key AVP
                 *                       indicating the integrity key
                 *               containing a Result-Code AVP
                 *                   indicating DIAMETER_SUCCESS
                 *               not containing an Experimental-Result AVP
                 *        }
                 *     }
                 * </pre>
                 * 
                 * @version    0.0.8
                 * @see        ETSI TS 103 289-2 TP_CX_HSS_ER_01
                 */
                testcase TC_CX_HSS_ER_01() runs on DiameterCx system TestAdapter {
                    // Local variables
                    var DiameterCx v_diameterComponent_hss;
                    
                    // Test control
                    if (not PICS_HSS_IUT or not PICS_DIGEST_AKAv1_MD5_AUTH_PROCS) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_HSS_IUT and PICS_DIGEST_AKAv1_MD5_AUTH_PROCS' required for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1CxUp_HSS(v_diameterComponent_hss);
                    
                    // Start
                    v_diameterComponent_hss.start(f_TC_CX_HSS_ER_01_I_S());
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClients(1, {c_prDone, c_tbDone, c_poDone});
                    
                    f_cf_1CxDown_HSS(v_diameterComponent_hss);
                } // End of TC_CX_HSS_ER_01
                
                /**
                 * @desc    Verify that the IUT in case of MA-Request reception including a new S-CSCF name, which is not the same as the previously assigned S-CSCF and IMS Restoration Procedure is supported than IUT shall send appropriate RT-Request to the old S-CSCF
                 * <pre>
                 * Pics Selection: PICS_HSS_IUT and PICS_DIGEST_AKAv1_MD5_AUTH_PROCS
                 * Initial conditions: 
                 *     with {
                 *        The user is successfully registered
                 *        The current S-CSCF is stopped
                 *        The user is also registered on the new S-CSCF
                 *        Initiate a Re-registration procedure
                 *     }
                 * Expected behaviour:
                 *     ensure that {
                 *        when {
                 *            the IUT receives a MA-Request from new S-CSCF
                 *                containing a Server-Name AVP
                 *                   indicating an S-CSCF name different than the previous one
                 *        }
                 *        then {
                 *            the IUT sends an RT-Request to old S-CSCF
                 *                containing a Destination-Host AVP
                 *                    indicating the previous S-CSCF name
                 *                containing a Deregistration-Reason AVP
                 *                    containing a Reason-Code AVP
                 *                         indicating NEW_SERVER_ASSIGNED
                 *            the IUT sends a MA-Answer 
                 *                containing a Server-Name AVP
                 *                    indicating the new S-CSCF name
                 *        }
                 *     }
                 * </pre>
                 * 
                 * @version    0.0.8
                 * @see        ETSI TS 103 289-2 TP_CX_HSS_ER_02
                 */
                testcase TC_CX_HSS_ER_02() runs on DiameterCx system TestAdapter {
                    // Local variables
                    var DiameterCx v_diameterComponent_hss;
                    
                    // Test control
                    if (not PICS_HSS_IUT or not PICS_DIGEST_AKAv1_MD5_AUTH_PROCS) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_HSS_IUT and PICS_DIGEST_AKAv1_MD5_AUTH_PROCS' required for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1CxUp_HSS(v_diameterComponent_hss);
                    
                    // Start
                    v_diameterComponent_hss.start(f_TC_CX_HSS_ER_02_I_S());
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClients(1, {c_prDone, c_tbDone, c_poDone});
                    
                    f_cf_1CxDown_HSS(v_diameterComponent_hss);
                } // End of TC_CX_HSS_ER_02
                
                /**
                 * @desc    Verify that the IUT in case of MA-Request reception including a new S-CSCF name, which is not the same as the previously assigned S-CSCF and IMS Restoration Procedure is not supported than IUT shall send appropriate RT-Request to the old S-CSCF.
                 * <pre>
                 * Pics Selection: Not PICS_HSS_IMS_RESTORATION_PROCS and PICS_HSS_IUT and PICS_DIGEST_AKAv1_MD5_AUTH_PROCS
                 * Initial conditions: 
                 *     with {
                 *        The user is successfully registered
                 *        The current S-CSCF is stopped
                 *        The user is also registered on the new S-CSCF
                 *        Initiate a Re-registration procedure
                 *     }
                 * Expected behaviour:
                 *     ensure that {
                 *        when {
                 *            the IUT receives a MA-Request
                 *                containing a Server-Name AVP
                 *                   indicating an S-CSCF name different than the previous one
                 *        }
                 *        then {
                 *            the IUT sends an RT-Request to old S-CSCF
                 *                containing a Destination-Host AVP
                 *                    indicating the previous S-CSCF name
                 *                containing a Deregistration-Reason AVP
                 *                    containing a Reason-Code AVP
                 *                         indicating NEW_SERVER_ASSIGNED
                 *            the IUT sends a MA-Answer 
                 *                containing a Server-Name AVP
                 *                    indicating the new S-CSCF name
                 *        }
                 *     }
                 * </pre>
                 * 
                 * @version    0.0.8
                 * @see        ETSI TS 103 289-2 TP_CX_HSS_ER_03
                 */
                testcase TC_CX_HSS_ER_03() runs on DiameterCx system TestAdapter {
                    // Local variables
                    var DiameterCx v_diameterComponent_hss;
                    
                    // Test control
                    if (PICS_HSS_IMS_RESTORATION_PROCS or not PICS_HSS_IUT or not PICS_DIGEST_AKAv1_MD5_AUTH_PROCS) {
                        log("*** " & __SCOPE__ & ": ERROR: 'Not PICS_HSS_IMS_RESTORATION_PROCS and PICS_HSS_IUT and PICS_DIGEST_AKAv1_MD5_AUTH_PROCS' required for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1CxUp_HSS(v_diameterComponent_hss);
                    
                    // Start
                    v_diameterComponent_hss.start(f_TC_CX_HSS_ER_03_I_S());
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClients(1, {c_prDone, c_tbDone, c_poDone});
                    
                    f_cf_1CxDown_HSS(v_diameterComponent_hss);
                } // End of TC_CX_HSS_ER_03
                
            } // group TP_HSSRole_EH
            
        } // group TP_HSSRole 
        
        group TP_CSCFRole{ // §5.2.1.2
Loading