Commit fba3bcf7 authored by YannGarcia's avatar YannGarcia
Browse files

Add Security TPs

parent fcc73497
Loading
Loading
Loading
Loading
+210 −46
Original line number Diff line number Diff line
@@ -15,17 +15,16 @@ Package CISE {
      TP Id "TP_CDM_NODE_PULL_REQ_BV_01"

      Test objective
        "Check that the IUT responds with an HTPP 200 OK Ackwnoledgment response when receiving a PullRequest from a known peer
        with a list of vessels in specified basin - no Ackwnoledgment required"
        "Check that the IUT responds with an HTPP 200 OK Acknowledgment response when receiving a PullRequest from a known peer with a list of vessels in specified basin - no Acknowledgment required"

      Reference 
        "ETSI GS CDM 004 Clause 5.4.2 Pull",
        "ETSI GS CDM 004 Clause 8.1.3 Pull (Request/Response)",
        "ETSI GS CDM 004 Clause 8.1.4 Pull Request Querying Mechanism"
        "ETSI GS CDM 004 [1] Clause 5.4.2 Pull",
        "ETSI GS CDM 004 [1] Clause 8.1.3 Pull (Request/Response)",
        "ETSI GS CDM 004 [1] Clause 8.1.4 Pull Request Querying Mechanism"

      Config Id Config_CISE_1

      PICS Selection PICS_IUT_NODE and PICS_CDM_SERVICE_VESSEL
      PICS Selection PICS_IUT_NODE and PICS_CDM_VESSEL_SERVICE

      Initial conditions  with {
        the IUT entity isInIdleState
@@ -139,19 +138,18 @@ Package CISE {
      TP Id "TP_CDM_NODE_PULL_DISC_BV_01"

      Test objective
        "Check that the IUT responds with an HTPP 200 OK Ackwnoledgment response when receiving a PullRequest discovery 
        with a list of vessels in specified basin - no Ackwnoledgment required"
        "Check that the IUT responds with an HTPP 200 OK Acknowledgment response when receiving a PullRequest discovery with a list of vessels in specified basin - no Acknowledgment required"

      Reference 
        "ETSI GS CDM 004 Clause 5.4.2 Pull",
        "ETSI GS CDM 004 Clause 5.5 CISE Discovery mechanism",
        "ETSI GS CDM 004 Clause 8.1.3 Pull (Request/Response)",
        "ETSI GS CDM 004 Clause 8.1.4 Pull Request Querying Mechanism",
        "ETSI GS CDM 004 Clause 8.1.7 Discover"
        "ETSI GS CDM 004 [1] Clause 5.4.2 Pull",
        "ETSI GS CDM 004 [1] Clause 5.5 CISE Discovery mechanism",
        "ETSI GS CDM 004 [1] Clause 8.1.3 Pull (Request/Response)",
        "ETSI GS CDM 004 [1] Clause 8.1.4 Pull Request Querying Mechanism",
        "ETSI GS CDM 004 [1] Clause 8.1.7 Discover"

      Config Id Config_CISE_1

      PICS Selection PICS_IUT_NODE and PICS_CDM_SERVICE_VESSEL
      PICS Selection PICS_IUT_NODE and PICS_CDM_VESSEL_SERVICE

      Initial conditions  with {
        the IUT entity isInIdleState
@@ -247,16 +245,16 @@ Package CISE {
      TP Id "TP_CDM_NODE_PUSH_SUB_BV_01"

      Test objective
        "Check that the IUT responds with an HTPP 200 OK Ackwnoledgment response when receiving a Push for subscription - delegation to the node"
        "Check that the IUT responds with an HTPP 200 OK Acknowledgment response when receiving a Push for subscription - delegation to the node"

      Reference 
        "ETSI GS CDM 004 Clause 5.4.6 Publish/Subscribe",
        "ETSI GS CDM 004 Clause 8.1.2 Push",
        "ETSI GS CDM 004 Clause 8.1.6 Publish/Subscribe"
        "ETSI GS CDM 004 [1] Clause 5.4.6 Publish/Subscribe",
        "ETSI GS CDM 004 [1] Clause 8.1.2 Push",
        "ETSI GS CDM 004 [1] Clause 8.1.6 Publish/Subscribe"

      Config Id Config_CISE_1

      PICS Selection PICS_IUT_NODE and PICS_CDM_SERVICE_VESSEL
      PICS Selection PICS_IUT_NODE and PICS_CDM_VESSEL_SERVICE

      Initial conditions  with {
        the IUT entity isInIdleState
@@ -330,16 +328,16 @@ Package CISE {
      TP Id "TP_CDM_NODE_PUSH_GET_SUB_BV_01"

      Test objective
        "Check that the IUT responds with an HTPP 200 OK Ackwnoledgment response when receiving a request of subcribers list - no Ackwnoledgment required"
        "Check that the IUT responds with an HTPP 200 OK Acknowledgment response when receiving a request of subcribers list - no Acknowledgment required"

      Reference 
        "ETSI GS CDM 004 Clause 5.4.6 Publish/Subscribe",
        "ETSI GS CDM 004 Clause 8.1.3 Pull",
        "ETSI GS CDM 004 Clause 8.1.8 Get Subscribers"
        "ETSI GS CDM 004 [1] Clause 5.4.6 Publish/Subscribe",
        "ETSI GS CDM 004 [1] Clause 8.1.3 Pull",
        "ETSI GS CDM 004 [1] Clause 8.1.8 Get Subscribers"

      Config Id Config_CISE_1

      PICS Selection PICS_IUT_NODE and PICS_CDM_SERVICE_VESSEL
      PICS Selection PICS_IUT_NODE and PICS_CDM_VESSEL_SERVICE

      Initial conditions  with {
        the IUT entity isInIdleState and
@@ -404,16 +402,16 @@ Package CISE {
      TP Id "TP_CDM_NODE_PUSH_UNSUB_BV_01"

      Test objective
        "Check that the IUT responds with an HTPP 200 OK Ackwnoledgment response when receiving a request of subcribers list - no Ackwnoledgment required"
        "Check that the IUT responds with an HTPP 200 OK Acknowledgment response when receiving a request of subcribers list - no Acknowledgment required"

      Reference 
        "ETSI GS CDM 004 Clause 5.4.6 Publish/Subscribe",
        "ETSI GS CDM 004 Clause 8.1.3 Pull",
        "ETSI GS CDM 004 Clause 8.1.6 Publish/Subscribe"
        "ETSI GS CDM 004 [1] Clause 5.4.6 Publish/Subscribe",
        "ETSI GS CDM 004 [1] Clause 8.1.3 Pull",
        "ETSI GS CDM 004 [1] Clause 8.1.6 Publish/Subscribe"

      Config Id Config_CISE_1

      PICS Selection PICS_IUT_NODE and PICS_CDM_SERVICE_VESSEL
      PICS Selection PICS_IUT_NODE and PICS_CDM_VESSEL_SERVICE

      Initial conditions  with {
        the IUT entity isInIdleState and
@@ -483,16 +481,16 @@ Package CISE {
      TP Id "TP_CDM_NODE_PUSH_NOT_BV_01"

      Test objective
        "Check that the IUT responds with an HTPP 200 OK Ackwnoledgment response when receiving a Push for notification"
        "Check that the IUT responds with an HTPP 200 OK Acknowledgment response when receiving a Push for notification"

      Reference 
        "ETSI GS CDM 004 Clause 5.4.6 Publish/Subscribe",
        "ETSI GS CDM 004 Clause 8.1.2 Push",
        "ETSI GS CDM 004 Clause 8.1.6 Publish/Subscribe"
        "ETSI GS CDM 004 [1] Clause 5.4.6 Publish/Subscribe",
        "ETSI GS CDM 004 [1] Clause 8.1.2 Push",
        "ETSI GS CDM 004 [1] Clause 8.1.6 Publish/Subscribe"

      Config Id Config_CISE_1

      PICS Selection PICS_IUT_NODE and PICS_CDM_SERVICE_VESSEL
      PICS Selection PICS_IUT_NODE and PICS_CDM_VESSEL_SERVICE

      Initial conditions  with {
        the IUT entity isInIdleState and
@@ -573,14 +571,14 @@ Package CISE {
      TP Id "TP_CDM_NODE_SEC_BV_01"

      Test objective
        "Check that the IUT responds with an HTPP 200 OK Ackwnoledgment with Success when it receives a sign message"
        "Check that the IUT responds with an HTPP 200 OK Acknowledgment with Success when it receives a sign message"

      Reference 
        "ETSI GS CDM 004 8.1.10 Message Signature"

      Config Id Config_CISE_1

      PICS Selection PICS_IUT_NODE and PICS_CDM_SERVICE_VESSEL
      PICS Selection PICS_IUT_NODE and PICS_CDM_VESSEL_SERVICE

      Initial conditions  with {
        the IUT entity isInIdleState
@@ -654,14 +652,14 @@ Package CISE {
      TP Id "TP_CDM_NODE_SEC_BO_01"

      Test objective
        "Check that the IUT responds with an HTPP 200 OK Ackwnoledgment with InvalidSignature when it receives a message with a corrupted signature"
        "Check that the IUT responds with an HTPP 200 OK Acknowledgment with InvalidSignature when it receives a message with a corrupted signature"

      Reference 
        "ETSI GS CDM 004 8.1.10 Message Signature"

      Config Id Config_CISE_1

      PICS Selection PICS_IUT_NODE and PICS_CDM_SERVICE_VESSEL
      PICS Selection PICS_IUT_NODE and PICS_CDM_VESSEL_SERVICE

      Initial conditions  with {
        the IUT entity isInIdleState
@@ -736,14 +734,14 @@ Package CISE {
      TP Id "TP_CDM_NODE_SEC_BO_02"

      Test objective
        "Check that the IUT responds with an HTPP 200 OK Ackwnoledgment with InvalidSignature when it receives a message with a corrupted certificate"
        "Check that the IUT responds with an HTPP 200 OK Acknowledgment with InvalidSignature when it receives a message with a corrupted certificate"

      Reference 
        "ETSI GS CDM 004 8.1.10 Message Signature"

      Config Id Config_CISE_1

      PICS Selection PICS_IUT_NODE and PICS_CDM_SERVICE_VESSEL
      PICS Selection PICS_IUT_NODE and PICS_CDM_VESSEL_SERVICE

      Initial conditions  with {
        the IUT entity isInIdleState
@@ -818,14 +816,14 @@ Package CISE {
      TP Id "TP_CDM_NODE_SEC_BO_03"

      Test objective
        "Check that the IUT responds with an HTPP 200 OK Ackwnoledgment with InvalidSignature when it receives a message sign with corrupted digest"
        "Check that the IUT responds with an HTPP 200 OK Acknowledgment with InvalidSignature when it receives a message sign with corrupted digest"

      Reference 
        "ETSI GS CDM 004 8.1.10 Message Signature"

      Config Id Config_CISE_1

      PICS Selection PICS_IUT_NODE and PICS_CDM_SERVICE_VESSEL
      PICS Selection PICS_IUT_NODE and PICS_CDM_VESSEL_SERVICE

      Initial conditions  with {
        the IUT entity isInIdleState
@@ -900,14 +898,14 @@ Package CISE {
      TP Id "TP_CDM_NODE_SEC_BO_04"

      Test objective
        "Check that the IUT responds with an HTPP 200 OK Ackwnoledgment with InvalidSignature when it receives a message sign with an unsupported signature algorithm"
        "Check that the IUT responds with an HTPP 200 OK Acknowledgment with InvalidSignature when it receives a message sign with an unsupported signature algorithm"

      Reference 
        "ETSI GS CDM 004 8.1.10 Message Signature"

      Config Id Config_CISE_1

      PICS Selection PICS_IUT_NODE and PICS_CDM_SERVICE_VESSEL
      PICS Selection PICS_IUT_NODE and PICS_CDM_VESSEL_SERVICE

      Initial conditions  with {
        the IUT entity isInIdleState
@@ -982,14 +980,14 @@ Package CISE {
      TP Id "TP_CDM_NODE_SEC_BO_05"

      Test objective
        "Check that the IUT responds with an HTPP 200 OK Ackwnoledgment with InvalidSignature when it receives a message sign with an unsupported digest signature algorithm"
        "Check that the IUT responds with an HTPP 200 OK Acknowledgment with InvalidSignature when it receives a message sign with an unsupported digest signature algorithm"

      Reference 
        "ETSI GS CDM 004 8.1.10 Message Signature"

      Config Id Config_CISE_1

      PICS Selection PICS_IUT_NODE and PICS_CDM_SERVICE_VESSEL
      PICS Selection PICS_IUT_NODE and PICS_CDM_VESSEL_SERVICE

      Initial conditions  with {
        the IUT entity isInIdleState
@@ -1060,6 +1058,172 @@ Package CISE {
        }
    } // End of TP_CDM_NODE_SEC_BO_05
    
    Test Purpose {
      TP Id "TP_CDM_NODE_SEC_BO_06"

      Test objective
        "Check that the IUT responds with an HTPP 200 OK Acknowledgment with InvalidSignature when it receives a message sign with an expired certificate"

      Reference 
        "ETSI GS CDM 004 8.1.10 Message Signature"

      Config Id Config_CISE_1

      PICS Selection PICS_IUT_NODE and PICS_CDM_VESSEL_SERVICE

      Initial conditions  with {
        the IUT entity isInIdleState
      }

      Expected behaviour
        ensure that {
          when {
            the IUT entity receives a vGET containing
              uri indicating value URI_PULL_REQUEST_GET,
              body containing
                vPullRequest containing
                  Signature containing
                    SignedInfo containing
                      CanonicalizationMethod containing
                        Algorithm indicating value "http://www.w3.org/2001/10/xml-exc-c14n#"
                      ;,
                      SignatureMethod containing
                        Algorithm indicating value "http://www.w3.org/2000/09/xmldsig#rsa-sha1" 
                      ;,
                      Reference_  indicating value  any_value,
                      Transforms containing
                        Algorithm indicating value "http://www.w3.org/2000/09/xmldsig#enveloped-signature"
                      ;,
                      DigestMethod containing 
                        Algorithm indicating value "http://www.w3.org/2000/09/xmldsig#sha1"
                      ;,
                      DigestValue indicating value corrupted_value
                      
                    ;,
                    SignatureValue indicating value any_value,
                    KeyInfo containing
                      X509Data containing
                        X509SubjectName indicating value EXPIRED_SIGNING_CERT_SUBJECT,
                        X509Certificate indicating value EXPIRED_SIGNING_CERT
                      ;
                    ;
                  ;
                ;
              ;
            ;
            from the ADAPTER entity
          }
          then {
            the IUT entity sends a HTTP_RESPONSE containing
              status_code set to "200 OK"
              body containing
                vAcknwoledgment containing
                  MessageID indicating value MESSAGE_ID,
                  CorrelationID indicating value CORELATION_ID,
                  Priority indicating value PRIORITY,
                  RequiresAck indicating value false,
                  Sender containing
                    ServiceID indicating value SERVICE_ID,
                    ServiceOperation indicating value Pull
                  ;,
                  Recipient containing
                    ServiceID indicating value SERVICE_ID,
                    ServiceOperation indicating value Pull
                  ;,
                  AckCode indicating value InvalidSignature,
                  Signature indicating value any_value
                ;
              ;
            ;
            to the ADAPTER entity
          }
        }
    } // End of TP_CDM_NODE_SEC_BO_06
    
    Test Purpose {
      TP Id "TP_CDM_NODE_SEC_BO_07"

      Test objective
        "Check that the IUT responds with an HTPP 200 OK Acknowledgment with InvalidSignature when it receives a message sign with a certificate valid in the future"

      Reference 
        "ETSI GS CDM 004 8.1.10 Message Signature"

      Config Id Config_CISE_1

      PICS Selection PICS_IUT_NODE and PICS_CDM_VESSEL_SERVICE

      Initial conditions  with {
        the IUT entity isInIdleState
      }

      Expected behaviour
        ensure that {
          when {
            the IUT entity receives a vGET containing
              uri indicating value URI_PULL_REQUEST_GET,
              body containing
                vPullRequest containing
                  Signature containing
                    SignedInfo containing
                      CanonicalizationMethod containing
                        Algorithm indicating value "http://www.w3.org/2001/10/xml-exc-c14n#"
                      ;,
                      SignatureMethod containing
                        Algorithm indicating value "http://www.w3.org/2000/09/xmldsig#rsa-sha1" 
                      ;,
                      Reference_  indicating value  any_value,
                      Transforms containing
                        Algorithm indicating value "http://www.w3.org/2000/09/xmldsig#enveloped-signature"
                      ;,
                      DigestMethod containing 
                        Algorithm indicating value "http://www.w3.org/2000/09/xmldsig#sha1"
                      ;,
                      DigestValue indicating value corrupted_value
                      
                    ;,
                    SignatureValue indicating value any_value,
                    KeyInfo containing
                      X509Data containing
                        X509SubjectName indicating value FUTURE_SIGNING_CERT_SUBJECT,
                        X509Certificate indicating value FUTURE_SIGNING_CERT
                      ;
                    ;
                  ;
                ;
              ;
            ;
            from the ADAPTER entity
          }
          then {
            the IUT entity sends a HTTP_RESPONSE containing
              status_code set to "200 OK"
              body containing
                vAcknwoledgment containing
                  MessageID indicating value MESSAGE_ID,
                  CorrelationID indicating value CORELATION_ID,
                  Priority indicating value PRIORITY,
                  RequiresAck indicating value false,
                  Sender containing
                    ServiceID indicating value SERVICE_ID,
                    ServiceOperation indicating value Pull
                  ;,
                  Recipient containing
                    ServiceID indicating value SERVICE_ID,
                    ServiceOperation indicating value Pull
                  ;,
                  AckCode indicating value InvalidSignature,
                  Signature indicating value any_value
                ;
              ;
            ;
            to the ADAPTER entity
          }
        }
    } // End of TP_CDM_NODE_SEC_BO_07
    
    // TODO Add TPs with invalid certificate for signing
    
  } // End of Group "security"

} // End of package CISE
 No newline at end of file
+5 −1
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@ Package CISE_Common {
      - PICS_CISE_SHA1          // Set to true if signature with SHA-1 is supported
      - PICS_CISE_SHA256        // Set to true if signature with SHA-256 is supported
      - PICS_CISE_SHA384        // Set to true if signature with SHA-384 is supported
      - PICS_CDM_SERVICE_VESSEL // Set to true if Vessel service is supported by the ServiceRegistry
      - PICS_CDM_VESSEL_SERVICE // Set to true if Vessel service is supported by the ServiceRegistry
      // TODO Add PICS for other services
      - PICS_CDM_FILTERING      // Set to true if filtering in PullRequest is supported
      - PICS_ROOT_API      // CISE root API URL
@@ -133,7 +133,11 @@ Package CISE_Common {
    XSD_STRING VESSEL_SHIP_TYPE;
    XSD_STRING VESSEL_SERVICE_TYPE;
    XSD_STRING SIGNING_CERT_SUBJECT;
    XSD_STRING EXPIRED_SIGNING_CERT_SUBJECT;
    XSD_STRING FUTURE_SIGNING_CERT_SUBJECT;
    XSD_STRING SIGNING_CERT;
    XSD_STRING EXPIRED_SIGNING_CERT;
    XSD_STRING FUTURE_SIGNING_CERT;
    XSD_STRING CORRUPTED_SIGNING_CERT;

    STRING URI_PULL_REQUEST_GET;  // "/api/ui/messages/discovery/values"