diff --git a/SOL009/NFVMANOLogManagement-API/CompileLogTask.robot b/SOL009/NFVMANOLogManagement-API/CompileLogTask.robot index e3f6b68b66f4a184590e35b979e3b85ac66879e1..da7f9beaa53db4b7e1889b43003c698c22b2c7cd 100644 --- a/SOL009/NFVMANOLogManagement-API/CompileLogTask.robot +++ b/SOL009/NFVMANOLogManagement-API/CompileLogTask.robot @@ -8,7 +8,7 @@ Request to compile the logged data into a file - Synchronous mode ... Test title: Request to compile the logged data into a file - Synchronous mode ... Test objective: The objective is to request to compile the logged data into a file in synchronous mode and perform a JSON schema validation on the returned log report data structure ... Pre-conditions: logging job is available - ... Reference: clause 8.5.6.3.1 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 8.5.6.3.1 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: The NFV-MANO can decide immediately what to respond to a compile request ... Post-Conditions: none @@ -22,7 +22,7 @@ Request to compile the logged data into a file - Asynchronous mode ... Test title: Request to compile the logged data into a file - Asynchronous mode ... Test objective: The objective is to request to compile the logged data into a file in asynchronous mode ... Pre-conditions: logging job is available - ... Reference: clause 8.5.6.3.1 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 8.5.6.3.1 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: The NFV-MANO can not decide immediately what to respond to a compile request ... Post-Conditions: log report is available to the API consumer @@ -36,7 +36,7 @@ Request to compile the logged data into a file - Already Processing ... Test title: Request to compile the logged data into a file - Already Processing ... Test objective: The objective is to request to compile the logged data into a file when a log data compilation and report creation is already ongoing, or a log report has just been created, for the specified logging job at the time of processing the request ... Pre-conditions: none - ... Reference: clause 8.5.6.3.1 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 8.5.6.3.1 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -49,7 +49,7 @@ Request to compile the logged data into a file with unprocessable content ... Test title: Request to compile the logged data into a file with unprocessable content ... Test objective: The objective is to test that the rrequest to compile the logged data into a file fails when error in request body. ... Pre-conditions: none - ... Reference: clause 8.5.6.3.1 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 8.5.6.3.1 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -62,7 +62,7 @@ GET Compiled Log Data - Method not implemented ... Test title: GET Compiled Log Data - Method not implemented ... Test objective: The objective is to test that GET method is not allowed to retrieve compiled log data. ... Pre-conditions: none - ... Reference: clause 8.5.6.3.2 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 8.5.6.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -74,7 +74,7 @@ PUT Compiled Log Data - Method not implemented ... Test title: PUT Compiled Log Data - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed to update compiled log data. ... Pre-conditions: none - ... Reference: clause 8.5.6.3.3 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 8.5.6.3.3 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -86,7 +86,7 @@ PATCH Compiled Log Data - Method not implemented ... Test title: PATCH Compiled Log Data - Method not implemented ... Test objective: The objective is to test that PATCH method is not allowed to update compiled log data. ... Pre-conditions: none - ... Reference: clause 8.5.6.3.4 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 8.5.6.3.4 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -98,10 +98,35 @@ DELETE Compiled Log Data - Method not implemented ... Test title: DELETE Compiled Log Data - Method not implemented ... Test objective: The objective is to test that DELETE method is not allowed to update compiled log data. ... Pre-conditions: none - ... Reference: clause 8.5.6.3.5 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 8.5.6.3.5 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none Send DELETE Compiled Log Data Check HTTP Response Status Code Is 405 +Request to compile the logged data into a file with a permitted authorization scope - Synchronous mode + [Documentation] Test ID: 8.3.4.4.9 + ... Test title: Request to compile the logged data into a file with a permitted authorization scope - Synchronous mode + ... Test objective: The objective is to request to compile the logged data into a file in synchronous mode with a permitted authorization scope + ... Pre-conditions: logging job is available + ... Reference: clause 8.5.6.3.1 - ETSI GS NFV-SOL 009 [7] v4.5.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: The NFV-MANO can decide immediately what to respond to a compile request + ... Post-Conditions: none + Send Log data Request in Synchronous mode with permitted authorization scope + Check HTTP Response Status Code Is 201 + Check HTTP Response Header Contains Location + Check HTTP Response Body Json Schema Is LogReport + +Request to compile the logged data into a file with not permitted authorization scope - Synchronous mode + [Documentation] Test ID: 8.3.4.4.9 + ... Test title: Request to compile the logged data into a file with not permitted authorization scope - Synchronous mode + ... Test objective: The objective is to test that requesting to compile the logged data into a file in synchronous mode fails when using not permitted authorization scope + ... Pre-conditions: logging job is available + ... Reference: clause 8.5.6.3.1 - ETSI GS NFV-SOL 009 [7] v4.5.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: The NFV-MANO can decide immediately what to respond to a compile request + ... Post-Conditions: none + Send Log data Request in Synchronous mode with not permitted authorization scope + Check HTTP Response Status Code Is 401 \ No newline at end of file diff --git a/SOL009/NFVMANOLogManagement-API/IndividualLoggingJob.robot b/SOL009/NFVMANOLogManagement-API/IndividualLoggingJob.robot index be2e6bf2de134b910a4fb0c167ae95ff8592dd4b..aa42b23b57031ab6d19506ec68492fa3b367af76 100644 --- a/SOL009/NFVMANOLogManagement-API/IndividualLoggingJob.robot +++ b/SOL009/NFVMANOLogManagement-API/IndividualLoggingJob.robot @@ -7,7 +7,7 @@ POST Individual Logging Job - Method not implemented ... Test title: POST Individual Logging Job - method not implemented ... Test objective: The objective is to test that POST method is not allowed to create an Indiviual Logging ... Pre-conditions: none - ... Reference: clause 8.5.4.3.1 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 8.5.4.3.1 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -19,7 +19,7 @@ GET individual Logging Job ... Test title: Get individual Logging Job ... Test objective: The objective is to test the retrieval of an individual logging job and perform a JSON schema validation of the collected job data structure ... Pre-conditions: Logging Job is already created. - ... Reference: clause 8.5.4.3.2 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 8.5.4.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -33,7 +33,7 @@ GET individual Logging Job with invalid resource identifier ... Test title: Get individual Logging Job with invalid resource identifier ... Test objective: The objective is to test that the retrieval of an individual logging job fails when using an invalid resource identifier, and perform the JSON schema validation of the failed operation HTTP response ... Pre-conditions: Logging Job is already created. - ... Reference: clause 8.5.4.3.2 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 8.5.4.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -46,7 +46,7 @@ PUT Individual Logging Job - Method not implemented ... Test title: PUT Individual Logging Job - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed to update an existing Logging Job ... Pre-conditions: none - ... Reference: clause 8.5.4.3.3 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 8.5.4.3.3 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -58,7 +58,7 @@ PATCH Individual Logging Job - Method not implemented ... Test title: PATCH Individual Logging Job - Method not implemented ... Test objective: The objective is to test that PATCH method is not allowed to modify an existing new Logging Job ... Pre-conditions: none - ... Reference: clause 6.5.4.3.4 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 6.5.4.3.4 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -70,7 +70,7 @@ DELETE Individual Logging Job ... Test title: DELETE Individual Logging Job ... Test objective: The objective is to test the deletion of an individual logging job ... Pre-conditions: Logging Job is already created. - ... Reference: clause 8.5.4.3.5 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 8.5.4.3.5 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: The Logging Job is no more available. @@ -83,10 +83,35 @@ DELETE Individual Logging Job with invalid resource identifier ... Test title: DELETE Individual Logging Job with invalid resource identifier ... Test objective: The objective is to test that the deletion of an individual logging job fails when using an invalid resource identifier ... Pre-conditions: Logging Job is already created. - ... Reference: clause 8.5.4.3.5 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 8.5.4.3.5 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none Send Delete request for individual Logging Job with invalid resource identifier Check HTTP Response Status Code Is 404 - Check HTTP Response Body Json Schema Is ProblemDetails \ No newline at end of file + Check HTTP Response Body Json Schema Is ProblemDetails + +DELETE Individual Logging Job with permitted authorization scope + [Documentation] Test ID: 8.3.4.2.8 + ... Test title: DELETE Individual Logging Job with permitted authorization scope + ... Test objective: The objective is to test the deletion of an individual logging job with permitted authorization scope + ... Pre-conditions: Logging Job is already created. + ... Reference: clause 8.5.4.3.5 - ETSI GS NFV-SOL 009 [7] v4.5.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: The Logging Job is no more available. + Send Delete request for individual Logging Job with permitted authorization scope + Check HTTP Response Status Code Is 204 + Check Postcondition Logging Job is Deleted + +DELETE Individual Logging Job with not permitted authorization scope + [Documentation] Test ID: 8.3.4.2.9 + ... Test title: DELETE Individual Logging Job with not permitted authorization scope + ... Test objective: The objective is to test that the deletion of an individual logging job fails when using a not permitted authorization scope + ... Pre-conditions: Logging Job is already created. + ... Reference: clause 8.5.4.3.5 - ETSI GS NFV-SOL 009 [7] v4.5.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: The Logging Job is no more available. + Send Delete request for individual Logging Job with not permitted authorization scope + Check HTTP Response Status Code Is 401 \ No newline at end of file diff --git a/SOL009/NFVMANOLogManagement-API/IndividualReport.robot b/SOL009/NFVMANOLogManagement-API/IndividualReport.robot index d0a31fdbb765d931b13ef7ad58ed7d0a143b6127..b80d18028502478e94a9c2983afb31a638b91f9e 100644 --- a/SOL009/NFVMANOLogManagement-API/IndividualReport.robot +++ b/SOL009/NFVMANOLogManagement-API/IndividualReport.robot @@ -7,7 +7,7 @@ POST Individual Log Report - Method not implemented ... Test title: POST Individual Log Report - Method not implemented ... Test objective: The objective is to test that POST method is not allowed to create a new log report. ... Pre-conditions: none - ... Reference: clause 8.5.5.3.1 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 8.5.5.3.1 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -19,7 +19,7 @@ Get Individual Log Report ... Test title: Get Individual Log Report ... Test objective: The objective is to test the retrieval of an individual log report and perform a JSON schema validation of the collected report data structure ... Pre-conditions: One or more log reports are set. - ... Reference: clause 8.5.5.3.2 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 8.5.5.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -32,7 +32,7 @@ Get Individual Log Report (asynchronous) ... Test title: Get Individual Log Report (asynchronous) ... Test objective: The objective is to test the retrieval of an individual log report is ongoing and no log report is available yet. ... Pre-conditions: One or more log reports are set. - ... Reference: clause 8.5.5.3.2 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 8.5.5.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -44,7 +44,7 @@ Get Individual Log Report with invalid resource endpoint ... Test title: Get Individual Log Report with invalid resource endpoint ... Test objective: The objective is to test that the retrieval of an individual log report fails when using an invalid resource endpoint. ... Pre-conditions: One or more log reports are set. - ... Reference: clause 8.5.5.3.2 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 8.5.5.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -57,7 +57,7 @@ PUT Individual Log Report - Method not implemented ... Test title: PUT Individual Log Report - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed to update an existing log report. ... Pre-conditions: none - ... Reference: clause 8.5.5.3.3 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 8.5.5.3.3 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -69,7 +69,7 @@ PATCH Individual Log Report - Method not implemented ... Test title: PATCH Individual Log Report - Method not implemented ... Test objective: The objective is to test that PATCH method is not allowed to modify an existinglog report. ... Pre-conditions: none - ... Reference: clause 8.5.5.3.4 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 8.5.5.3.4 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -81,9 +81,34 @@ DELETE Individual Log Report - Method not implemented ... Test title: DELETE Individual Log Report - Method not implemented ... Test objective: The objective is to test that DELETE method is not allowed to delete an existing log report. ... Pre-conditions: none - ... Reference: clause 8.5.5.3.5 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 8.5.5.3.5 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none Send Delete request for Individual Log Report - Check HTTP Response Status Code Is 405 \ No newline at end of file + Check HTTP Response Status Code Is 405 + +Get Individual Log Report with permitted authorization scope + [Documentation] Test ID: 8.3.4.3.8 + ... Test title: Get Individual Log Report with permitted authorization scope + ... Test objective: The objective is to test the retrieval of an individual log report with permitted authorization scope + ... Pre-conditions: One or more log reports are set. + ... Reference: clause 8.5.5.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + Get Individual Log Report with permitted authorization scope + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is LogReport + +Get Individual Log Report with not permitted authorization scope + [Documentation] Test ID: 8.3.4.3.9 + ... Test title: Get Individual Log Report with not permitted authorization scope + ... Test objective: The objective is to test that the retrieval of an individual log report fails when using not permitted authorization scope + ... Pre-conditions: One or more log reports are set. + ... Reference: clause 8.5.5.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + Get Individual Log Report with not permitted authorization scope + Check HTTP Response Status Code Is 401 \ No newline at end of file diff --git a/SOL009/NFVMANOLogManagement-API/IndividualSubscription.robot b/SOL009/NFVMANOLogManagement-API/IndividualSubscription.robot index d7376efcfc33cff8e1d5d780c20d72b8b838117b..3f6565f388eb9f6042b63320c3bfd8d8bde59614 100644 --- a/SOL009/NFVMANOLogManagement-API/IndividualSubscription.robot +++ b/SOL009/NFVMANOLogManagement-API/IndividualSubscription.robot @@ -7,7 +7,7 @@ GET Individual Subscription ... Test title: GET Individual Subscription ... Test objective: The objective is to test the retrieval of individual subscription and perform a JSON schema validation of the returned subscription data structure ... Pre-conditions: At least one subscription is available in the NFV-MANO. - ... Reference: clause 8.5.8.3.2 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 8.5.8.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -21,7 +21,7 @@ GET Individual Subscription - invalid resource identifier ... Test title: GET Individual Subscription - invalid resource identifier ... Test objective: The objective is to test that the retrieval of an individual subscription fails when using an invalid resource identifier ... Pre-conditions: At least one subscription is available in the NFV-MANO. - ... Reference: clause 8.5.8.3.2 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 8.5.8.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -34,7 +34,7 @@ DELETE Individual Subscription ... Test title: DELETE Individual Subscription ... Test objective: The objective is to test the deletion of an individual subscription ... Pre-conditions: At least one subscription is available in the NFV-MANO. - ... Reference: clause 8.5.8.3.5 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 8.5.8.3.5 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: The is not available anymore in the NFV-MANO @@ -47,7 +47,7 @@ DELETE Individual Subscription - invalid resource identifier ... Test title: DELETE Individual Subscription - invalid resource identifier ... Test objective: The objective is to test that the deletion of an individual subscription fails when using an invalid resource identifier ... Pre-conditions: At least one subscription is available in the NFV-MANO. - ... Reference: clause 8.5.8.3.5 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 8.5.8.3.5 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -59,7 +59,7 @@ POST Individual Subscription - Method not implemented ... Test title: POST Individual Subscription - Method not implemented ... Test objective: The objective is to test that POST method is not allowed to create a new Subscription ... Pre-conditions: none - ... Reference: clause 8.5.8.3.1 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 8.5.8.3.1 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -71,7 +71,7 @@ PUT Individual Subscription - Method not implemented ... Test title: PUT Individual Subscription - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed to update an existing subscription ... Pre-conditions: none - ... Reference: clause 8.5.8.3.3 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 8.5.8.3.3 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -83,9 +83,35 @@ PATCH Individual Subscription - Method not implemented ... Test title: PATCH Individual Subscription - Method not implemented ... Test objective: The objective is to test that PATCH method is not allowed to modify an existing subscription ... Pre-conditions: none - ... Reference: clause 8.5.8.3.4 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 8.5.8.3.4 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none Send Patch request for individual Threshold - Check HTTP Response Status Code Is 405 \ No newline at end of file + Check HTTP Response Status Code Is 405 + +GET Individual Subscription with permitted authorization scope + [Documentation] Test ID: 8.3.4.6.8 + ... Test title: GET Individual Subscription with permitted authorization scope + ... Test objective: The objective is to test the retrieval of individual subscription with permitted authorization scope + ... Pre-conditions: At least one subscription is available in the NFV-MANO. + ... Reference: clause 8.5.8.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + Get Individual Subscription with permitted authorization scope + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is LogmSubscription + Check HTTP Response Body Subscription Identifier matches the requested Subscription + +GET Individual Subscription with not permitted authorization scope + [Documentation] Test ID: 8.3.4.6.9 + ... Test title: GET Individual Subscription with not permitted authorization scope + ... Test objective: The objective is to test that the retrieval of individual subscription fails when using not permitted authorization scope + ... Pre-conditions: At least one subscription is available in the NFV-MANO. + ... Reference: clause 8.5.8.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + Get Individual Subscription with not permitted authorization scope + Check HTTP Response Status Code Is 401 \ No newline at end of file diff --git a/SOL009/NFVMANOLogManagement-API/LoggingJobs.robot b/SOL009/NFVMANOLogManagement-API/LoggingJobs.robot index 1fa21ae2f06bc92697123a22c3224290501a7e71..7e427b78d265665dc243e2eb999c39f781446907 100644 --- a/SOL009/NFVMANOLogManagement-API/LoggingJobs.robot +++ b/SOL009/NFVMANOLogManagement-API/LoggingJobs.robot @@ -7,7 +7,7 @@ POST Create a new logging job ... Test title: POST Create a new logging job ... Test objective: The objective is to create a new logging job, and perform the JSON schema validation of the operation HTTP response. ... Pre-conditions: none - ... Reference: clause 8.5.3.3.1 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 8.5.3.3.1 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: logging job created @@ -22,7 +22,7 @@ GET information about logging jobs ... Test title: GET information logging jobs ... Test objective: The objective is to retrieve information about logging jobs, and perform the JSON schema validation of the operation HTTP response. ... Pre-conditions: At least one logging job is created. - ... Reference: clause 8.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 8.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -35,7 +35,7 @@ GET Logging jobs - invalid attribute-based filter ... Test title: GET Logging jobs - invalid attribute-based filter ... Test objective: The objective is to test that the retrieval of logging jobs fails when using invalid attribute-based filter, and perform the JSON schema validation of the failed operation HTTP response. ... Pre-conditions: At least one logging job is created. - ... Reference: clause 8.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 8.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -48,7 +48,7 @@ GET Logging jobs - invalid attribute selector ... Test title: GET Logging jobs - invalid attribute selector ... Test objective: The objective is to test that the retrieval of logging jobs fails when using invalid attribute selector, and perform the JSON schema validation of the failed operation HTTP response. ... Pre-conditions: At least one logging job is created. - ... Reference: clause 8.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 8.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -61,7 +61,7 @@ GET Logging jobs - Bad Request Response too Big ... Test title: GET Logging jobs - Bad Request Response too Big ... Test objective: The objective is to test that the retrieval of Logging job fails when response is too big, and perform the JSON schema validation of the failed operation HTTP response. ... Pre-conditions: At least one logging job is created. - ... Reference: clause 8.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 8.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -74,7 +74,7 @@ GET information about logging jobs with attribute-based filter ... Test title: GET information about logging jobs with attribute-based filter ... Test objective: The objective is to retrieve information about the logging jobs with attribute filters, and perform the JSON schema validation of the failed operation HTTP response. ... Pre-conditions: At least one logging job is created. - ... Reference: clause 8.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 8.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -87,7 +87,7 @@ GET information about logging jobs with "all_fields" attribute selector ... Test title: GET information about logging jobs with "all_fields" attribute selector ... Test objective: The objective is to retrieve information about logging jobs with "all_fields" attribute selector, and perform the JSON schema validation of the failed operation HTTP response. ... Pre-conditions: At least one logging job is created. - ... Reference: clause 8.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 8.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -100,7 +100,7 @@ GET information about Logging Jobs with "exclude_default" attribute selector ... Test title: GET information about Logging Jobs with "exclude_default" attribute selector ... Test objective: The objective is to retrieve information about logging jobs with "exclude_default" attribute selector, and perform the JSON schema validation of the failed operation HTTP response. ... Pre-conditions: At least one logging job is created. - ... Reference: clause 8.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 8.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -113,7 +113,7 @@ GET information about Logging Jobs with "fields" attribute selector ... Test title: GET information about Logging Jobs with fields attribute selector ... Test objective: The objective is to retrieve information about Logging Jobs with fields attribute selector, and perform the JSON schema validation of the failed operation HTTP response. ... Pre-conditions: At least one logging job is created. - ... Reference: clause 8.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 8.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -126,7 +126,7 @@ GET information about Logging Jobs with "exclude_fields" attribute selector ... Test title: GET information about Logging Jobs with "exclude_fields" attribute selector ... Test objective: The objective is to retrieve information about the Logging Jobs with "exclude_fields" attribute selector, and perform the JSON schema validation of the failed operation HTTP response. ... Pre-conditions: At least one logging job is created. - ... Reference: clause 8.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 8.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -139,7 +139,7 @@ GET information about Logging Jobs with "fields" and "exclude_default" attribute ... Test title: GET information about Logging Jobs with fields and exclude_default attribute selector ... Test objective: The objective is to retrieve information about Logging Jobs with fields and exclude_default attribute selector, and perform the JSON schema validation of the failed operation HTTP response. ... Pre-conditions: At least one logging job is created. - ... Reference: clause 8.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 8.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -152,7 +152,7 @@ GET information about Logging Jobs with Paged Response ... Test title: GET information about Logging Jobs with Paged Response ... Test objective: The objective is to query information about Logging Jobs to get Paged Response. ... Pre-conditions: At least one logging job is created. - ... Reference: clause 8.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 8.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -165,7 +165,7 @@ GET information about Logging Jobs with malformed authorization token ... Test title: GET information about Logging Jobs with malformed authorization token ... Test objective: The objective is to test that the retrieval of information about Logging Jobs fails when using malformed authorization token. ... Pre-conditions: none - ... Reference: clause 8.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 8.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: The Peer Entity requires the usage of access tokens for authorizing the API requests. ... Post-Conditions: none @@ -177,7 +177,7 @@ GET information about Logging Jobs without authorization token ... Test title: GET information about Logging Jobs without authorization token ... Test objective: The objective is to test that the retrieval of information about Logging Jobs fails when omitting the authorization token. ... Pre-conditions: none - ... Reference: clause 8.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 8.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: The Peer Entity requires the usage of access tokens for authorizing the API requests. ... Post-Conditions: none @@ -189,7 +189,7 @@ GET information about Logging Jobs with expired or revoked authorization token ... Test title: GET information about Logging Jobs with expired or revoked authorization token ... Test objective: The objective is to test that the retrieval of information about Logging Jobs fails when using expired or revoked authorization token. ... Pre-conditions: none - ... Reference: clause 8.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 8.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: The Peer Entity requires the usage of access tokens for authorizing the API requests. ... Post-Conditions: none @@ -201,7 +201,7 @@ PUT Logging Jobs - Method not implemented ... Test title: PUT Logging Jobs - Method not implemented ... Test objective: The objective is to test that the method is not implemented ... Pre-conditions: none - ... Reference: clause 8.5.3.3.3 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 8.5.3.3.3 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -213,7 +213,7 @@ PATCH Logging Jobs - Method not implemented ... Test title: PATCH Logging Jobs - Method not implemented ... Test objective: The objective is to test that the method is not implemented ... Pre-conditions: none - ... Reference: clause 8.5.3.3.4 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 8.5.3.3.4 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -225,9 +225,36 @@ DELETE Logging Jobs - Method not implemented ... Test title: DELETE Logging Jobs - Method not implemented ... Test objective: The objective is to test that the method is not implemented ... Pre-conditions: none - ... Reference: clause 8.5.3.3.5 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 8.5.3.3.5 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none DELETE Logging Jobs - Check HTTP Response Status Code Is 405 \ No newline at end of file + Check HTTP Response Status Code Is 405 + +POST Create a new logging job with permitted authorization scope + [Documentation] Test ID: 8.3.4.1.19 + ... Test title: POST Create a new logging job with permitted authorization scope + ... Test objective: The objective is to create a new logging job with permitted authorization scope. + ... Pre-conditions: none + ... Reference: clause 8.5.3.3.1 - ETSI GS NFV-SOL 009 [7] v4.5.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: logging job created + POST Create a new logging job with permitted authorization scope + Check HTTP Response Status Code Is 201 + Check HTTP Response Header Contains Location + Check HTTP Response Body Json Schema Is LoggingJob + Check Post-Condition Logging job is created + +POST Create a new logging job with not permitted authorization scope + [Documentation] Test ID: 8.3.4.1.20 + ... Test title: POST Create a new logging job with not permitted authorization scope + ... Test objective: The objective is to test that the creation of a new logging job fails when a not permitted authorization scope is used. + ... Pre-conditions: none + ... Reference: clause 8.5.3.3.1 - ETSI GS NFV-SOL 009 [7] v4.5.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + POST Create a new logging job with not permitted authorization scope + Check HTTP Response Status Code Is 401 \ No newline at end of file diff --git a/SOL009/NFVMANOLogManagement-API/NFVMANOLogManagementKeywords.robot b/SOL009/NFVMANOLogManagement-API/NFVMANOLogManagementKeywords.robot index e3bc90bebaad139169b13938ab73f3515e7865fa..d9cdae4f372cc6c4e669a933dcb66ada168d32c3 100644 --- a/SOL009/NFVMANOLogManagement-API/NFVMANOLogManagementKeywords.robot +++ b/SOL009/NFVMANOLogManagement-API/NFVMANOLogManagementKeywords.robot @@ -9,6 +9,7 @@ Library JSONLibrary Library Collections Library JSONSchemaLibrary schemas/ Library Process +Library jwt *** Keywords *** Check HTTP Response Status Code Is @@ -40,7 +41,34 @@ POST Create a new logging job Post ${apiRoot}/${apiName}/${apiMajorVersion}/log_jobs ${body} ${outputResponse}= Output response Set Global Variable @{response} ${outputResponse} - + +POST Create a new logging job with permitted authorization scope + Log Create a logging job + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + ${scopeValue}= Create Dictionary scope=${JOB_PERMITTED_SCOPE} + ${authorizationToken}= JWT Encode payload=${scopeValue} key='' algorithm=${OAUTH_ENCRIPTION_ALGORITHM} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${authorizationToken}"} + Log Authorization Token: ${authorizationToken} + ${template}= Get File jsons/createLoggingJobRequest.json + ${body}= Format String ${template} objectInstanceId=${objectInstanceId} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/log_jobs ${body} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +POST Create a new logging job with not permitted authorization scope + Log Create a logging job + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + ${scopeValue}= Create Dictionary scope=${JOB_NOT_PERMITTED_SCOPE} + ${authorizationToken}= JWT Encode payload=${scopeValue} key='' algorithm=${OAUTH_ENCRIPTION_ALGORITHM} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${authorizationToken}"} + Log Authorization Token: ${authorizationToken} + ${template}= Get File jsons/createLoggingJobRequest.json + ${body}= Format String ${template} objectInstanceId=${objectInstanceId} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/log_jobs ${body} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} Check Post-Condition Logging job is created GET Logging Jobs Check HTTP Response Status Code Is 200 @@ -231,6 +259,28 @@ Send Delete request for individual Logging Job DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/log_jobs/${logJobId} ${output}= Output response Set Suite Variable ${response} ${output} + +Send Delete request for individual Logging Job with permitted authorization scope + Log Trying to delete an existing logging Job + Set Headers {"Accept": "${ACCEPT_JSON}"} + ${scopeValue}= Create Dictionary scope=${JOB_PERMITTED_SCOPE} + ${authorizationToken}= JWT Encode payload=${scopeValue} key='' algorithm=${OAUTH_ENCRIPTION_ALGORITHM} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${authorizationToken}"} + Log Authorization Token: ${authorizationToken} + DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/log_jobs/${logJobId} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send Delete request for individual Logging Job with not permitted authorization scope + Log Trying to delete an existing logging Job + Set Headers {"Accept": "${ACCEPT_JSON}"} + ${scopeValue}= Create Dictionary scope=${JOB_PERMITTED_SCOPE} + ${authorizationToken}= JWT Encode payload=${scopeValue} key='' algorithm=${OAUTH_ENCRIPTION_ALGORITHM} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${authorizationToken}"} + Log Authorization Token: ${authorizationToken} + DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/log_jobs/${logJobId} + ${output}= Output response + Set Suite Variable ${response} ${output} Check Postcondition Logging Job is Deleted Log Check Postcondition @@ -260,6 +310,28 @@ Get Individual Log Report ${output}= Output response Set Suite Variable ${response} ${output} +Get Individual Log Report with permitted authorization scope + Log Trying to get log report + Set Headers {"Accept": "${ACCEPT_JSON}"} + ${scopeValue}= Create Dictionary scope=${REPORT_PERMITTED_SCOPE} + ${authorizationToken}= JWT Encode payload=${scopeValue} key='' algorithm=${OAUTH_ENCRIPTION_ALGORITHM} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${authorizationToken}"} + Log Authorization Token: ${authorizationToken} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/log_jobs/${logJobId}/log_reports/${reportId} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get Individual Log Report with not permitted authorization scope + Log Trying to get log report + Set Headers {"Accept": "${ACCEPT_JSON}"} + ${scopeValue}= Create Dictionary scope=${NOT_PERMITTED_SCOPE} + ${authorizationToken}= JWT Encode payload=${scopeValue} key='' algorithm=${OAUTH_ENCRIPTION_ALGORITHM} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${authorizationToken}"} + Log Authorization Token: ${authorizationToken} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/log_jobs/${logJobId}/log_reports/${reportId} + ${output}= Output response + Set Suite Variable ${response} ${output} + Get Individual Log Report with invalid resource endpoint Log Trying to get a log report with invalid resource endpoint Set Headers {"Accept": "${ACCEPT_JSON}"} @@ -307,6 +379,36 @@ Send Log data Request in Synchronous mode ${body}= Output response Set Suite Variable &{response} ${body} +Send Log data Request in Synchronous mode with permitted authorization scope + Log Request to compile the logged data into a file Synchronous mode + Pass Execution If ${SYNC_MODE} == 0 The compile process is asynchronous mode. Skipping the test + Set Headers {"Accept": "${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + ${scopeValue}= Create Dictionary scope=${JOB_PERMITTED_SCOPE} + ${authorizationToken}= JWT Encode payload=${scopeValue} key='' algorithm=${OAUTH_ENCRIPTION_ALGORITHM} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${authorizationToken}"} + Log Authorization Token: ${authorizationToken} + ${template}= Get File jsons/compileLogRequest.json + ${body}= Format String ${template} objectInstanceId=${objectInstanceId} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/log_jobs/${logJobId}/compile_log ${body} + ${body}= Output response + Set Suite Variable &{response} ${body} + +Send Log data Request in Synchronous mode with not permitted authorization scope + Log Request to compile the logged data into a file Synchronous mode + Pass Execution If ${SYNC_MODE} == 0 The compile process is asynchronous mode. Skipping the test + Set Headers {"Accept": "${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + ${scopeValue}= Create Dictionary scope=${NOT_PERMITTED_SCOPE} + ${authorizationToken}= JWT Encode payload=${scopeValue} key='' algorithm=${OAUTH_ENCRIPTION_ALGORITHM} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${authorizationToken}"} + Log Authorization Token: ${authorizationToken} + ${template}= Get File jsons/compileLogRequest.json + ${body}= Format String ${template} objectInstanceId=${objectInstanceId} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/log_jobs/${logJobId}/compile_log ${body} + ${body}= Output response + Set Suite Variable &{response} ${body} + Check HTTP Response Header Contains Location ${vnfLcmOpOccId}= Get Value From Json ${response['headers']} $..Location Should Not Be Empty ${vnfLcmOpOccId} @@ -402,6 +504,30 @@ Get all Subscriptions GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${output}= Output response Set Suite Variable ${response} ${output} + +Get all Subscriptions with permitted authorization scope + [Documentation] The api consumer can use this method to query the list of active subscriptions to log management notifications + Set headers {"Accept": "application/json"} + Set headers {"Content-Type": "application/json"} + ${scopeValue}= Create Dictionary scope=${SUBSCRIPTIONS_PERMITTED_SCOPE} + ${authorizationToken}= JWT Encode payload=${scopeValue} key='' algorithm=${OAUTH_ENCRIPTION_ALGORITHM} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${authorizationToken}"} + Log Authorization Token: ${authorizationToken} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get all Subscriptions with not permitted authorization scope + [Documentation] The api consumer can use this method to query the list of active subscriptions to log management notifications + Set headers {"Accept": "application/json"} + Set headers {"Content-Type": "application/json"} + ${scopeValue}= Create Dictionary scope=${NOT_PERMITTED_SCOPE} + ${authorizationToken}= JWT Encode payload=${scopeValue} key='' algorithm=${OAUTH_ENCRIPTION_ALGORITHM} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${authorizationToken}"} + Log Authorization Token: ${authorizationToken} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions + ${output}= Output response + Set Suite Variable ${response} ${output} Get Subscriptions with attribute-based filters [Documentation] The api consumer can use this method to query the list of active subscriptions to log management notifications @@ -551,6 +677,26 @@ Get Individual Subscription GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} + +Get Individual Subscription with permitted authorization scope + Set headers {"Accept": "${ACCEPT_JSON}"} + ${scopeValue}= Create Dictionary scope=${SUBSCRIPTIONS_PERMITTED_SCOPE} + ${authorizationToken}= JWT Encode payload=${scopeValue} key='' algorithm=${OAUTH_ENCRIPTION_ALGORITHM} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${authorizationToken}"} + Log Authorization Token: ${authorizationToken} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get Individual Subscription with not permitted authorization scope + Set headers {"Accept": "${ACCEPT_JSON}"} + ${scopeValue}= Create Dictionary scope=${NOT_PERMITTED_SCOPE} + ${authorizationToken}= JWT Encode payload=${scopeValue} key='' algorithm=${OAUTH_ENCRIPTION_ALGORITHM} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${authorizationToken}"} + Log Authorization Token: ${authorizationToken} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} + ${output}= Output response + Set Suite Variable ${response} ${output} Check HTTP Response Body Subscription Identifier matches the requested Subscription Log Trying to check response ID @@ -740,3 +886,8 @@ DELETE API Version with apiMajorVersion Delete ${apiRoot}/${apiName}/${apiMajorVersion} /api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} + +JWT Encode + [Arguments] ${payload} ${key} ${algorithm} + ${encoded}= Evaluate jwt.encode(${payload}, ${key}, ${algorithm}) + [Return] ${encoded} diff --git a/SOL009/NFVMANOLogManagement-API/NotificationEndpoint.robot b/SOL009/NFVMANOLogManagement-API/NotificationEndpoint.robot index 0bd1b3550e74800f34afef69ace45d33f2a38be4..acade9e290342b4bc8968e1180a75fb67f85ed02 100644 --- a/SOL009/NFVMANOLogManagement-API/NotificationEndpoint.robot +++ b/SOL009/NFVMANOLogManagement-API/NotificationEndpoint.robot @@ -8,7 +8,7 @@ Log Report Available Notification ... Test title: Log Report Available Notification ... Test objective: The objective is to test that Log Report Available Notification is delivered with success to the notification consumer. ... Pre-conditions: A subscription for log report available notification is available in the NFV-MANO. - ... Reference: clause 8.5.9.3.1 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 8.5.9.3.1 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_Notif_Endpoint ... Applicability: none ... Post-Conditions: none diff --git a/SOL009/NFVMANOLogManagement-API/Notifications.robot b/SOL009/NFVMANOLogManagement-API/Notifications.robot index da28ed2d23e2a836f11c5dfa809e9f94b2b6decf..9159d9ec4ad04480a802a6c85efd829bd49c4fa0 100644 --- a/SOL009/NFVMANOLogManagement-API/Notifications.robot +++ b/SOL009/NFVMANOLogManagement-API/Notifications.robot @@ -9,7 +9,7 @@ Log Report Avaliable Notification ... Test title: Log Report Avaliable Notification ... Test objective: The objective is to test the dispatch of Log Report Avaliable Notification when new log report is available in the NFV-MANO, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system. ... Pre-conditions: none - ... Reference: clause 8.5.9.3.1 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 8.5.9.3.1 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none diff --git a/SOL009/NFVMANOLogManagement-API/Subscriptions.robot b/SOL009/NFVMANOLogManagement-API/Subscriptions.robot index c1087430c20f3535f382199700d65266af43769b..2ab8c38c9436c028e1eda6f3867cd4c57b537e1b 100644 --- a/SOL009/NFVMANOLogManagement-API/Subscriptions.robot +++ b/SOL009/NFVMANOLogManagement-API/Subscriptions.robot @@ -9,7 +9,7 @@ GET all Subscriptions ... Test title: GET all Subscriptions ... Test objective: The objective is to test the retrieval list of active subscriptions list to log management notifications and perform a JSON schema validation of the returned subscriptions data structure ... Pre-conditions: At least one subscription is available in the NFV-MANO. - ... Reference: clause 8.5.7.3.2 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 8.5.7.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -22,7 +22,7 @@ GET Subscriptions with attribute-based filter ... Test title: GET Subscriptions with attribute-based filter ... Test objective: The objective is to test the retrieval of active subscriptions list to log management notifications using attribute-based filter, perform a JSON schema validation of the collected indicators data structure, and verify that the retrieved information matches the issued attribute-based filters ... Pre-conditions: At least one subscription is available in the NFV-MANO. - ... Reference: clause 8.5.7.3.2 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 8.5.7.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -35,7 +35,7 @@ GET Subscriptions with Paged Response ... Test title: GET Subscriptions with Paged Response ... Test objective: The objective is to query information of active subscriptions list to log management notifications to get Paged Response. ... Pre-conditions: At least one subscription is available in the NFV-MANO. - ... Reference: clause 8.5.7.3.2 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 8.5.7.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -48,7 +48,7 @@ GET Subscriptions - invalid attribute-based filter ... Test title: GET Subscriptions - invalid attribute-based filter ... Test objective: The objective is to test that the retrieval of active subscriptions list to log management notifications fails when using invalid attribute-based filters, and perform the JSON schema validation of the failed operation HTTP response. ... Pre-conditions: At least one subscription is available in the NFV-MANO. - ... Reference: clause 8.5.7.3.2 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 8.5.7.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -61,7 +61,7 @@ GET Subscriptions - Bad Request Response too Big ... Test title: GET Subscriptions - Bad Request Response too Big ... Test objective: The objective is to test that the retrieval of active subscriptions list to log management notifications fails when response is too big, and perform the JSON schema validation of the failed operation HTTP response. ... Pre-conditions: At least one subscription is available in the NFV-MANO. - ... Reference: clause 8.5.7.3.2 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 8.5.7.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -74,7 +74,7 @@ GET Subscriptions - invalid resource endpoint ... Test title: GET Subscriptions - invalid resource endpoint ... Test objective: The objective is to test that the retrieval of active subscriptions list to log management notifications fails when using invalid resource endpoint. ... Pre-conditions: At least one subscription is available in the NFV-MANO. - ... Reference: clause 8.5.7.3.2 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 8.5.7.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -87,7 +87,7 @@ GET Subscription with attribute-based filter "id" ... Test title: GET Subscription with attribute-based filter "id" ... Test objective: The objective is to retrieve the list of active subscriptions with filter "id" ... Pre-conditions: none - ... Reference: clause 8.5.7.3.2 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 8.5.7.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -101,7 +101,7 @@ Get subscriptions with filter "filter.notificationTypes" ... Test title: GET Subscription with attribute-based filter "filter.notificationTypes" ... Test objective: The objective is to retrieve the list of active subscriptions with filter "filter.notificationTypes" ... Pre-conditions: none - ... Reference: clause 8.5.7.3.2 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 8.5.7.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -115,7 +115,7 @@ POST Create new Subscription ... Test title: POST Create new Subscription ... Test objective: The objective is to test the creation of a new subscription to log management notification and perform a JSON schema and content validation of the returned subscription data structure ... Pre-conditions: none - ... Reference: clause 8.5.7.3.1 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 8.5.7.3.1 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: The subscription is successfully set and it matches the issued subscription @@ -131,7 +131,7 @@ POST Create request for duplicated Subscription not creating duplicated subscrip ... Test title: POST Create request for duplicated Subscription not creating duplicated subscriptions ... Test objective: The objective is to test the attempt of a creation of a duplicated subscription failed and check that no new subscription is created and a link to the original subscription is returned ... Pre-conditions: At least one subscription is available in the NFV-MANO. - ... Reference: clause 8.5.7.3.1 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 8.5.7.3.1 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: The NFV-MANO does not support the creation of duplicated subscriptions ... Post-Conditions: The existing Subscription returned is available in the NFV-MANO @@ -147,7 +147,7 @@ POST Create request for duplicated Subscription creating duplicated subscription ... Test title: POST Create request for duplicated Subscription creating duplicated subscriptions ... Test objective: The objective is to test the creation of a duplicated subscription and perform a JSON schema and content validation of the returned duplicated subscription data structure ... Pre-conditions: At least one subscription is available in the NFV-MANO. - ... Reference: clause 8.5.7.3.1 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 8.5.7.3.1 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: The NFV-MANO supports the creation of duplicated subscriptions ... Post-Conditions: The duplicated subscription is successfully set and it matches the issued subscription @@ -162,7 +162,7 @@ PUT Subscriptions - Method not implemented ... Test title: PUT Subscriptions - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed to modify subscriptions ... Pre-conditions: none - ... Reference: clause 8.5.7.3.3 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 8.5.7.3.3 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -174,7 +174,7 @@ PATCH Subscriptions - Method not implemented ... Test title: PATCH Subscriptions - Method not implemented ... Test objective: The objective is to test that PATCH method is not allowed to update subscriptions ... Pre-conditions: none - ... Reference: clause 8.5.7.3.4 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 8.5.7.3.4 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -186,7 +186,7 @@ DELETE Subscriptions - Method not implemented ... Test title: DELETE Subscriptions - Method not implemented ... Test objective: The objective is to test that DELETE method is not allowed to delete subscriptions ... Pre-conditions: none - ... Reference: clause 8.5.7.3.5 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 8.5.7.3.5 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -198,10 +198,35 @@ POST Create new Subscription - Unprocessable content ... Test title: POST Create new Subscription - Unprocessable content ... Test objective: The objective is to test that a new log management subscription is not created if the notification endpoint is unreachable by the NFV-MANO. ... Pre-conditions: none - ... Reference: clause 8.5.7.3.1 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 8.5.7.3.1 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: Notification endpoint is unreachable by the NFV-MANO. ... Post-Conditions: none Send Post Request for Subscription with unreachable callbackUri Check HTTP Response Status Code Is 422 Check HTTP Response Body Json Schema Is ProblemDetails + +GET all Subscriptions with permitted authorization scope + [Documentation] Test ID: 8.3.4.5.16 + ... Test title: GET all Subscriptions with permitted authorization scope + ... Test objective: The objective is to test the retrieval list of active subscriptions list to log management notifications with permitted authorization scope + ... Pre-conditions: At least one subscription is available in the NFV-MANO. + ... Reference: clause 8.5.7.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + Get all Subscriptions with permitted authorization scope + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is LogmSubscriptions + +GET all Subscriptions with not permitted authorization scope + [Documentation] Test ID: 8.3.4.5.17 + ... Test title: GET all Subscriptions with not permitted authorization scope + ... Test objective: The objective is to test that the retrieval list of active subscriptions list to log management notifications fails when using not permitted authorization scope + ... Pre-conditions: At least one subscription is available in the NFV-MANO. + ... Reference: clause 8.5.7.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + Get all Subscriptions with not permitted authorization scope + Check HTTP Response Status Code Is 401 diff --git a/SOL009/NFVMANOLogManagement-API/environment/variables.txt b/SOL009/NFVMANOLogManagement-API/environment/variables.txt index 272f600eac58a455aff4fe090f227f135044e013..779b3d4a99f092da87e998feabcae334d8eb01f8 100644 --- a/SOL009/NFVMANOLogManagement-API/environment/variables.txt +++ b/SOL009/NFVMANOLogManagement-API/environment/variables.txt @@ -11,6 +11,13 @@ ${AUTHORIZATION_TOKEN} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42 ${NEG_AUTHORIZATION_TOKEN} Bearer negativetoken ${BAD_AUTHORIZATION_TOKEN} Bear sometoken +${OAUTH_ENCRIPTION_ALGORITHM} HS256 +${JOB_PERMITTED_SCOPE} nfvmanologm:v2:log_job +${JOB_NOT_PERMITTED_SCOPE} nfvmanologm:v2:log_job:readonly +${REPORT_PERMITTED_SCOPE} nfvmanologm:v2:log_report +${SUBSCRIPTIONS_PERMITTED_SCOPE} nfvmanologm:v2:subscriptions +${NOT_PERMITTED_SCOPE} nfvmanologm:v2:nvalid + ${CONTENT_TYPE} application/json ${CONTENT_TYPE_JSON} application/json ${ACCEPT_JSON} application/json