diff --git a/doc/testing/testplan/api_access_control_policy/README.md b/doc/testing/testplan/api_access_control_policy/README.md index 6233badb594b3c1bb779cacc79f737a3771906e2..8b22103e777cefdcaa6679fadff05cb00cbae0f8 100644 --- a/doc/testing/testplan/api_access_control_policy/README.md +++ b/doc/testing/testplan/api_access_control_policy/README.md @@ -14,43 +14,43 @@ At this documentation you will have all information and related files and exampl * API Provider had a Service API Published on CAPIF * API Invoker had a Security Context for Service API published. +**Execution Steps**: + + 1. Register and onboard Provider at CCF. + 2. Publish a provider API with name **service_1** + 3. Register and onboard Invoker at CCF + 4. Store signed Certificate + 5. Create Security Context + 6. Provider Get ACL information. + **Information of Test**: 1. Perform [Provider Registration] 2. Publish Service API at CCF: - * Send Post to ccf_publish_url *https://{CAPIF_HOSTNAME}/published-apis/v1/{apfId}/service-apis* - * body [service api description] with apiName service_1 - * Store *serviceApiId* - * Use APF Certificate + * Send **POST** to ccf_publish_url **https://{CAPIF_HOSTNAME}/published-apis/v1/{apfId}/service-apis** + * body [service api description] with apiName **service_1** + * Store **serviceApiId** + * Use **APF Certificate** 3. Perform [Invoker Onboarding] store apiInvokerId 4. Discover published APIs 5. Create Security Context for this Invoker - * Send PUT *https://{CAPIF_HOSTNAME}/trustedInvokers/{apiInvokerId}* + * Send **PUT** **https://{CAPIF_HOSTNAME}/trustedInvokers/{apiInvokerId}** * body [service security body] - * Use Invoker Certificate + * Use **Invoker Certificate** 6. Provider Retrieve ACL - * Send GET *https://{CAPIF_HOSTNAME}/access-control-policy/v1/accessControlPolicyList/${serviceApiId}?aef-id=${aef_id}* - * Use *serviceApiId* and *aefId* - * Use AEF Provider Certificate + * Send **GET** **https://{CAPIF_HOSTNAME}/access-control-policy/v1/accessControlPolicyList/${serviceApiId}?aef-id=${aef_id}** + * Use **serviceApiId** and **aefId** + * Use **AEF Provider Certificate** -**Execution Steps**: - - 1. Register and onboard Provider at CCF. - 2. Publish a provider API with name service_1 - 3. Register and onboard Invoker at CCF - 4. Store signed Certificate - 5. Create Security Context - 6. Provider Get ACL information. - **Expected Result**: 1. ACL Response: 1. **200 OK** Response. 2. body returned must accomplish **AccessControlPolicyList** data structure. - 3. apiInvokerPolicies must: + 3. **apiInvokerPolicies** must: 1. contain only one object. 2. apiInvokerId must match apiInvokerId registered previously. @@ -68,55 +68,55 @@ At this documentation you will have all information and related files and exampl * API Provider had two Service API Published on CAPIF * API Invoker had a Security Context for both Service APIs published. +**Execution Steps**: + + 1. Register and onboard Provider at CCF. + 2. Publish a provider API with name **service_1** and **service_2** + 3. Register and onboard Invoker at CCF + 4. Store signed Certificate + 5. Create Security Context + 6. Provider Get ACL information for **service_1**. + 7. Provider Get ACL information for **service_2**. + **Information of Test**: 1. Perform [Provider Registration] 2. Publish Service API at CCF: - * Send Post to ccf_publish_url *https://{CAPIF_HOSTNAME}/published-apis/v1/{apfId}/service-apis* - * body [service api description] with apiName service_1 - * Store *serviceApiId* - * Use APF Certificate + * Send **POST** to ccf_publish_url **https://{CAPIF_HOSTNAME}/published-apis/v1/{apfId}/service-apis** + * body [service api description] with apiName **service_1** + * Store **serviceApiId** + * Use **APF Certificate** 3. Publish Service API at CCF: - * Send Post to ccf_publish_url *https://{CAPIF_HOSTNAME}/published-apis/v1/{apfId}/service-apis* - * body [service api description] with apiName service_2 - * Store *serviceApiId* - * Use APF Certificate + * Send **POST** to ccf_publish_url **https://{CAPIF_HOSTNAME}/published-apis/v1/{apfId}/service-apis** + * body [service api description] with apiName **service_2** + * Store **serviceApiId** + * Use **APF Certificate** 4. Perform [Invoker Onboarding] store apiInvokerId 5. Discover published APIs 6. Create Security Context for this Invoker for both published APIs - * Send PUT *https://{CAPIF_HOSTNAME}/trustedInvokers/{apiInvokerId}* + * Send **PUT** **https://{CAPIF_HOSTNAME}/trustedInvokers/{apiInvokerId}** * body [service security body] - * Use Invoker Certificate + * Use **Invoker Certificate** - 7. Provider Retrieve ACL for serviceApiId1 - * Send GET *https://{CAPIF_HOSTNAME}/access-control-policy/v1/accessControlPolicyList/${serviceApiId1}?aef-id=${aef_id}* - * Use *serviceApiId* and *aefId* - * Use AEF Provider Certificate + 7. Provider Retrieve ACL for **serviceApiId1** + * Send **GET** **https://{CAPIF_HOSTNAME}/access-control-policy/v1/accessControlPolicyList/${serviceApiId1}?aef-id=${aef_id}** + * Use **serviceApiId** and **aefId** + * Use **AEF Provider Certificate** 8. Provider Retrieve ACL for serviceApiId2 - * Send GET *https://{CAPIF_HOSTNAME}/access-control-policy/v1/accessControlPolicyList/${serviceApiId2}?aef-id=${aef_id}* - * Use *serviceApiId* and *aefId* - * Use AEF Provider Certificate + * Send **GET** **https://{CAPIF_HOSTNAME}/access-control-policy/v1/accessControlPolicyList/${serviceApiId2}?aef-id=${aef_id}** + * Use **serviceApiId** and **aefId** + * Use **AEF Provider Certificate** -**Execution Steps**: - - 1. Register and onboard Provider at CCF. - 2. Publish a provider API with name service_1 and service_2 - 3. Register and onboard Invoker at CCF - 4. Store signed Certificate - 5. Create Security Context - 6. Provider Get ACL information for service_1. - 7. Provider Get ACL information for service_2. - **Expected Result**: 1. ACL Response: 1. **200 OK** Response. 2. body returned must accomplish **AccessControlPolicyList** data structure. - 3. apiInvokerPolicies must: + 3. **apiInvokerPolicies** must: 1. contain one object. 2. apiInvokerId must match apiInvokerId registered previously. @@ -133,47 +133,47 @@ At this documentation you will have all information and related files and exampl * API Provider had a Service API Published on CAPIF * Two API Invokers had a Security Context for same Service API published by provider. +**Execution Steps**: + + 1. Register and onboard Provider at CCF. + 2. Publish a provider API with name **service_1** and **service_2** + 3. Register and onboard Invoker at CCF + 4. Store signed Certificate + 5. Create Security Context + 6. Provider Get ACL information. + **Information of Test**: 1. Perform [Provider Registration] 2. Publish Service API at CCF: - * Send Post to ccf_publish_url *https://{CAPIF_HOSTNAME}/published-apis/v1/{apfId}/service-apis* - * body [service api description] with apiName service_1 - * Store *serviceApiId* - * Use APF Certificate + * Send **POST** to ccf_publish_url **https://{CAPIF_HOSTNAME}/published-apis/v1/{apfId}/service-apis** + * body [service api description] with apiName **service_1** + * Store **serviceApiId** + * Use **APF Certificate** 3. Perform [Invoker Onboarding] store apiInvokerId 4. Discover published APIs 5. Create Security Context for this Invoker for both published APIs - * Send PUT *https://{CAPIF_HOSTNAME}/trustedInvokers/{apiInvokerId}* + * Send **PUT** **https://{CAPIF_HOSTNAME}/trustedInvokers/{apiInvokerId}** * body [service security body] - * Use Invoker Certificate + * Use **Invoker Certificate** 6. Repeat previous 3 steps in order to have a new Invoker. 7. Provider Retrieve ACL for serviceApiId - * Send GET *https://{CAPIF_HOSTNAME}/access-control-policy/v1/accessControlPolicyList/${serviceApiId1}?aef-id=${aef_id}* - * Use *serviceApiId* and *aefId* - * Use AEF Provider Certificate + * Send **GET** **https://{CAPIF_HOSTNAME}/access-control-policy/v1/accessControlPolicyList/${serviceApiId1}?aef-id=${aef_id}** + * Use **serviceApiId** and **aefId** + * Use **AEF Provider Certificate** -**Execution Steps**: - - 1. Register and onboard Provider at CCF. - 2. Publish a provider API with name service_1 and service_2 - 3. Register and onboard Invoker at CCF - 4. Store signed Certificate - 5. Create Security Context - 6. Provider Get ACL information. - **Expected Result**: 1. ACL Response: 1. **200 OK** Response. 2. body returned must accomplish **AccessControlPolicyList** data structure. - 3. apiInvokerPolicies must: + 3. **apiInvokerPolicies** must: 1. Contain two objects. - 2. One object must match with apiInvokerId1 and the other one with apiInvokerId2 an registered previously. + 2. One object must match with **apiInvokerId1** and the other one with **apiInvokerId2** an registered previously. ## Test Case 4: Retrieve ACL filtered by api-invoker-id @@ -188,60 +188,60 @@ At this documentation you will have all information and related files and exampl * API Provider had a Service API Published on CAPIF * Two API Invokers had a Security Context for same Service API published by provider. +**Execution Steps**: + + 1. Register and onboard Provider at CCF. + 2. Publish a provider API with name **service_1** and **service_2** + 3. Register and onboard Invoker at CCF + 4. Store signed Certificate + 5. Create Security Context + 6. Provider Get ACL information with query parameter indicating first api-invoker-id. + 7. Provider Get ACL information with query parameter indicating second api-invoker-id. + **Information of Test**: 1. Perform [Provider Registration] 2. Publish Service API at CCF: - * Send Post to ccf_publish_url *https://{CAPIF_HOSTNAME}/published-apis/v1/{apfId}/service-apis* - * body [service api description] with apiName service_1 - * Store *serviceApiId* - * Use APF Certificate + * Send **POST** to ccf_publish_url **https://{CAPIF_HOSTNAME}/published-apis/v1/{apfId}/service-apis** + * body [service api description] with apiName **service_1** + * Store **serviceApiId** + * Use **APF Certificate** - 4. Perform [Invoker Onboarding] store apiInvokerId - 6. Discover published APIs - 7. Create Security Context for this Invoker for both published APIs - * Send PUT *https://{CAPIF_HOSTNAME}/trustedInvokers/{apiInvokerId}* + 3. Perform [Invoker Onboarding] store apiInvokerId + 4. Discover published APIs + 5. Create Security Context for this Invoker for both published APIs + * Send **PUT** **https://{CAPIF_HOSTNAME}/trustedInvokers/{apiInvokerId}** * body [service security body] - * Use Invoker Certificate + * Use **Invoker Certificate** - 8. Repeat previous 3 steps in order to have a new Invoker. + 6. Repeat previous 3 steps in order to have a new Invoker. - 9. Provider Retrieve ACL for serviceApiId - * Send GET *https://{CAPIF_HOSTNAME}/access-control-policy/v1/accessControlPolicyList/${serviceApiId1}?aef-id=${aef_id}&api-invoker-id={apiInvokerId1}* - * Use *serviceApiId*, *aefId* and apiInvokerId1 - * Use AEF Provider Certificate + 7. Provider Retrieve ACL for **serviceApiId1** + * Send **GET** **https://{CAPIF_HOSTNAME}/access-control-policy/v1/accessControlPolicyList/${serviceApiId}?aef-id=${aef_id}&api-invoker-id={apiInvokerId1}** + * Use **serviceApiId**, **aefId** and **apiInvokerId1** + * Use **AEF Provider Certificate** - 10. Provider Retrieve ACL for serviceApiId - * Send GET *https://{CAPIF_HOSTNAME}/access-control-policy/v1/accessControlPolicyList/${serviceApiId1}?aef-id=${aef_id}&api-invoker-id={apiInvokerId2}* - * Use *serviceApiId*, *aefId* and apiInvokerId2 - * Use AEF Provider Certificate + 8. Provider Retrieve ACL for **serviceApiId2** + * Send **GET** **https://{CAPIF_HOSTNAME}/access-control-policy/v1/accessControlPolicyList/${serviceApiId}?aef-id=${aef_id}&api-invoker-id={apiInvokerId2}** + * Use **serviceApiId**, **aefId** and **apiInvokerId2** + * Use **AEF Provider Certificate** -**Execution Steps**: - - 1. Register and onboard Provider at CCF. - 2. Publish a provider API with name service_1 and service_2 - 3. Register and onboard Invoker at CCF - 4. Store signed Certificate - 5. Create Security Context - 6. Provider Get ACL information with query parameter indicating first api-invoker-id. - 7. Provider Get ACL information with query parameter indicating second api-invoker-id. - **Expected Result**: 1. ACL Response: 1. **200 OK** Response. 2. body returned must accomplish **AccessControlPolicyList** data structure. - 3. apiInvokerPolicies must: + 3. **apiInvokerPolicies** must: 1. Contain one objects. - 2. Object must match with apiInvokerId1. + 2. Object must match with **apiInvokerId1**. 2. ACL Response: 1. **200 OK** Response. 2. body returned must accomplish **AccessControlPolicyList** data structure. - 3. apiInvokerPolicies must: + 3. **apiInvokerPolicies** must: 1. Contain one objects. - 2. Object must match with apiInvokerId2. + 2. Object must match with **apiInvokerId2**. ## Test Case 5: Retrieve ACL filtered by supported-features @@ -258,58 +258,58 @@ At this documentation you will have all information and related files and exampl * API Provider had a Service API Published on CAPIF * Two API Invokers had a Security Context for same Service API published by provider. +**Execution Steps**: + + 1. Register and onboard Provider at CCF. + 2. Publish a provider API with name **service_1** and **service_2** + 3. Register and onboard Invoker at CCF + 4. Store signed Certificate + 5. Create Security Context + 6. Provider Get ACL information with query parameter indicating first supported-features. + 7. Provider Get ACL information with query parameter indicating second supported-features. + **Information of Test**: 1. Perform [Provider Registration] 2. Publish Service API at CCF: - * Send Post to ccf_publish_url *https://{CAPIF_HOSTNAME}/published-apis/v1/{apfId}/service-apis* - * body [service api description] with apiName service_1 - * Store *serviceApiId* - * Use APF Certificate + * Send **POST** to ccf_publish_url **https://{CAPIF_HOSTNAME}/published-apis/v1/{apfId}/service-apis** + * body [service api description] with apiName **service_1** + * Store **serviceApiId** + * Use **APF Certificate** 3. Perform [Invoker Onboarding] store apiInvokerId 4. Discover published APIs 5. Create Security Context for this Invoker for both published APIs - * Send PUT *https://{CAPIF_HOSTNAME}/trustedInvokers/{apiInvokerId}* + * Send **PUT** **https://{CAPIF_HOSTNAME}/trustedInvokers/{apiInvokerId}** * body [service security body] - * Use Invoker Certificate + * Use **Invoker Certificate** 6. Repeat previous 3 steps in order to have a new Invoker. 7. Provider Retrieve ACL for serviceApiId - * Send GET *https://{CAPIF_HOSTNAME}/access-control-policy/v1/accessControlPolicyList/${serviceApiId1}?aef-id=${aef_id}&supported-features={apiInvokerId1}* - * Use *serviceApiId*, *aefId* and apiInvokerId1 - * Use AEF Provider Certificate + * Send **GET** **https://{CAPIF_HOSTNAME}/access-control-policy/v1/accessControlPolicyList/${serviceApiId1}?aef-id=${aef_id}&supported-features={apiInvokerId1}** + * Use **serviceApiId**, **aefId** and **apiInvokerId1** + * Use **AEF Provider Certificate** 8. Provider Retrieve ACL for serviceApiId - * Send GET *https://{CAPIF_HOSTNAME}/access-control-policy/v1/accessControlPolicyList/${serviceApiId1}?aef-id=${aef_id}&supported-features={apiInvokerId2}* - * Use *serviceApiId*, *aefId* and apiInvokerId2 - * Use AEF Provider Certificate + * Send **GET** **https://{CAPIF_HOSTNAME}/access-control-policy/v1/accessControlPolicyList/${serviceApiId1}?aef-id=${aef_id}&supported-features={apiInvokerId2}** + * Use **serviceApiId**, **aefId** and **apiInvokerId2** + * Use **AEF Provider Certificate** -**Execution Steps**: - - 1. Register and onboard Provider at CCF. - 2. Publish a provider API with name service_1 and service_2 - 3. Register and onboard Invoker at CCF - 4. Store signed Certificate - 5. Create Security Context - 6. Provider Get ACL information with query parameter indicating first supported-features. - 7. Provider Get ACL information with query parameter indicating second supported-features. - **Expected Result**: 1. ACL Response: 1. **200 OK** Response. 2. body returned must accomplish **AccessControlPolicyList** data structure. - 3. apiInvokerPolicies must: + 3. **apiInvokerPolicies** must: 1. Contain one objects. 2. Object must match with supportedFeatures1. 2. ACL Response: 1. **200 OK** Response. 2. body returned must accomplish **AccessControlPolicyList** data structure. - 3. apiInvokerPolicies must: + 3. **apiInvokerPolicies** must: 1. Contain one objects. 2. Object must match with supportedFeatures1. @@ -327,43 +327,43 @@ At this documentation you will have all information and related files and exampl * API Provider had a Service API Published on CAPIF * API Invoker had a Security Context for Service API published. +**Execution Steps**: + + 1. Register and onboard Provider at CCF. + 2. Publish a provider API with name **service_1** + 3. Register and onboard Invoker at CCF + 4. Store signed Certificate + 5. Create Security Context + 6. Provider Get ACL information. + **Information of Test**: 1. Perform [Provider Registration] 2. Publish Service API at CCF: - * Send Post to ccf_publish_url *https://{CAPIF_HOSTNAME}/published-apis/v1/{apfId}/service-apis* - * body [service api description] with apiName service_1 - * Store *serviceApiId* - * Use APF Certificate + * Send **POST** to ccf_publish_url **https://{CAPIF_HOSTNAME}/published-apis/v1/{apfId}/service-apis** + * body [service api description] with apiName **service_1** + * Store **serviceApiId** + * Use **APF Certificate** 3. Perform [Invoker Onboarding] store apiInvokerId 4. Discover published APIs 5. Create Security Context for this Invoker - * Send PUT *https://{CAPIF_HOSTNAME}/trustedInvokers/{apiInvokerId}* + * Send **PUT** **https://{CAPIF_HOSTNAME}/trustedInvokers/{apiInvokerId}** * body [service security body] - * Use Invoker Certificate + * Use **Invoker Certificate** 6. Provider Retrieve ACL - * Send GET *https://{CAPIF_HOSTNAME}/access-control-policy/v1/accessControlPolicyList/${serviceApiId}?aef-id=${AEF_ID_NOT_VALID}* - * Use *serviceApiId* and *AEF_ID_NOT_VALID* - * Use AEF Provider Certificate + * Send **GET** **https://{CAPIF_HOSTNAME}/access-control-policy/v1/accessControlPolicyList/${serviceApiId}?aef-id=${AEF_ID_NOT_VALID}** + * Use **serviceApiId** and **AEF_ID_NOT_VALID** + * Use **AEF Provider Certificate** -**Execution Steps**: - - 1. Register and onboard Provider at CCF. - 2. Publish a provider API with name service_1 - 3. Register and onboard Invoker at CCF - 4. Store signed Certificate - 5. Create Security Context - 6. Provider Get ACL information. - **Expected Result**: 1. ACL Response: 1. **404 Not Found** Response. 2. body returned must accomplish **Problem Details** data structure. - 3. apiInvokerPolicies must: + 3. **apiInvokerPolicies** must: * status **404** * title with message "Not Found" * detail with message "No ACLs found for the requested service: {service_api_id}, aef_id: {aef_id}, invoker: {api_invoker_id} and supportedFeatures: {supported_features}". @@ -383,43 +383,43 @@ At this documentation you will have all information and related files and exampl * API Provider had a Service API Published on CAPIF * API Invoker had a Security Context for Service API published. +**Execution Steps**: + + 1. Register and onboard Provider at CCF. + 2. Publish a provider API with name **service_1** + 3. Register and onboard Invoker at CCF + 4. Store signed Certificate + 5. Create Security Context + 6. Provider Get ACL information. + **Information of Test**: 1. Perform [Provider Registration] 2. Publish Service API at CCF: - * Send Post to ccf_publish_url *https://{CAPIF_HOSTNAME}/published-apis/v1/{apfId}/service-apis* - * body [service api description] with apiName service_1 - * Store *serviceApiId* - * Use APF Certificate + * Send **POST** to ccf_publish_url **https://{CAPIF_HOSTNAME}/published-apis/v1/{apfId}/service-apis** + * body [service api description] with apiName **service_1** + * Store **serviceApiId** + * Use **APF Certificate** 3. Perform [Invoker Onboarding] store apiInvokerId 4. Discover published APIs 5. Create Security Context for this Invoker - * Send PUT *https://{CAPIF_HOSTNAME}/trustedInvokers/{apiInvokerId}* + * Send **PUT** **https://{CAPIF_HOSTNAME}/trustedInvokers/{apiInvokerId}** * body [service security body] - * Use Invoker Certificate + * Use **Invoker Certificate** 6. Provider Retrieve ACL - * Send GET *https://{CAPIF_HOSTNAME}/access-control-policy/v1/accessControlPolicyList/${NOT_VALID_SERVICE_API_ID}?aef-id=${aef_id}* - * Use *NOT_VALID_SERVICE_API_ID* and *aef_id* - * Use AEF Provider Certificate + * Send **GET** **https://{CAPIF_HOSTNAME}/access-control-policy/v1/accessControlPolicyList/${NOT_VALID_SERVICE_API_ID}?aef-id=${aef_id}** + * Use **NOT_VALID_SERVICE_API_ID** and **aef_id** + * Use **AEF Provider Certificate** -**Execution Steps**: - - 1. Register and onboard Provider at CCF. - 2. Publish a provider API with name service_1 - 3. Register and onboard Invoker at CCF - 4. Store signed Certificate - 5. Create Security Context - 6. Provider Get ACL information. - **Expected Result**: 1. ACL Response: 1. **404 Not Found** Response. 2. body returned must accomplish **Problem Details** data structure. - 3. apiInvokerPolicies must: + 3. **apiInvokerPolicies** must: * status **404** * title with message "Not Found" * detail with message "No ACLs found for the requested service: {service_api_id}, aef_id: {aef_id}, invoker: {api_invoker_id} and supportedFeatures: {supported_features}". @@ -438,43 +438,43 @@ At this documentation you will have all information and related files and exampl * API Provider had a Service API Published on CAPIF * API Invoker had a Security Context for Service API published. +**Execution Steps**: + + 1. Register and onboard Provider at CCF. + 2. Publish a provider API with name **service_1** + 3. Register and onboard Invoker at CCF + 4. Store signed Certificate + 5. Create Security Context + 6. Provider Get ACL information. + **Information of Test**: 1. Perform [Provider Registration] 2. Publish Service API at CCF: - * Send Post to ccf_publish_url *https://{CAPIF_HOSTNAME}/published-apis/v1/{apfId}/service-apis* - * body [service api description] with apiName service_1 - * Store *serviceApiId* - * Use APF Certificate + * Send **POST** to ccf_publish_url **https://{CAPIF_HOSTNAME}/published-apis/v1/{apfId}/service-apis** + * body [service api description] with apiName **service_1** + * Store **serviceApiId** + * Use **APF Certificate** 3. Perform [Invoker Onboarding] store apiInvokerId 4. Discover published APIs 5. Create Security Context for this Invoker - * Send PUT *https://{CAPIF_HOSTNAME}/trustedInvokers/{apiInvokerId}* + * Send **PUT** **https://{CAPIF_HOSTNAME}/trustedInvokers/{apiInvokerId}** * body [service security body] - * Use Invoker Certificate + * Use **Invoker Certificate** 6. Provider Retrieve ACL - * Send GET *https://{CAPIF_HOSTNAME}/access-control-policy/v1/accessControlPolicyList/${NOT_VALID_SERVICE_API_ID}?aef-id=${AEF_ID_NOT_VALID}* - * Use *NOT_VALID_SERVICE_API_ID* and *aef_id* - * Use AEF Provider Certificate + * Send **GET** **https://{CAPIF_HOSTNAME}/access-control-policy/v1/accessControlPolicyList/${NOT_VALID_SERVICE_API_ID}?aef-id=${AEF_ID_NOT_VALID}** + * Use **NOT_VALID_SERVICE_API_ID** and **aef_id** + * Use **AEF Provider Certificate** -**Execution Steps**: - - 1. Register and onboard Provider at CCF. - 2. Publish a provider API with name service_1 - 3. Register and onboard Invoker at CCF - 4. Store signed Certificate - 5. Create Security Context - 6. Provider Get ACL information. - **Expected Result**: 1. ACL Response: 1. **404 Not Found** Response. 2. body returned must accomplish **Problem Details** data structure. - 3. apiInvokerPolicies must: + 3. **apiInvokerPolicies** must: * status **404** * title with message "Not Found" * detail with message "No ACLs found for the requested service: {NOT_VALID_SERVICE_API_ID}, aef_id: {AEF_ID_NOT_VALID}, invoker: {api_invoker_id} and supportedFeatures: {supported_features}". @@ -494,39 +494,39 @@ At this documentation you will have all information and related files and exampl * API Provider had a Service API Published on CAPIF * API Invoker created but no Security Context for Service API published had been requested. +**Execution Steps**: + + 1. Register and onboard Provider at CCF. + 2. Publish a provider API with name **service_1** + 3. Register and onboard Invoker at CCF + 4. Store signed Certificate + 5. Create Security Context + 6. Provider Get ACL information. + **Information of Test**: 1. Perform [Provider Registration] 2. Publish Service API at CCF: - * Send Post to ccf_publish_url *https://{CAPIF_HOSTNAME}/published-apis/v1/{apfId}/service-apis* - * body [service api description] with apiName service_1 - * Store *serviceApiId* - * Use APF Certificate + * Send **POST** to ccf_publish_url **https://{CAPIF_HOSTNAME}/published-apis/v1/{apfId}/service-apis** + * body [service api description] with apiName **service_1** + * Store **serviceApiId** + * Use **APF Certificate** 3. Perform [Invoker Onboarding] store apiInvokerId 4. Discover published APIs 5. Provider Retrieve ACL - * Send GET *https://{CAPIF_HOSTNAME}/access-control-policy/v1/accessControlPolicyList/${serviceApiId}?aef-id=${aef_id}* - * Use *serviceApiId* and *aefId* - * Use AEF Provider Certificate + * Send **GET** **https://{CAPIF_HOSTNAME}/access-control-policy/v1/accessControlPolicyList/${serviceApiId}?aef-id=${aef_id}** + * Use **serviceApiId** and **aefId** + * Use **AEF Provider Certificate** -**Execution Steps**: - - 1. Register and onboard Provider at CCF. - 2. Publish a provider API with name service_1 - 3. Register and onboard Invoker at CCF - 4. Store signed Certificate - 5. Create Security Context - 6. Provider Get ACL information. - **Expected Result**: 1. ACL Response: 1. **404 Not Found** Response. 2. body returned must accomplish **Problem Details** data structure. - 3. apiInvokerPolicies must: + 3. **apiInvokerPolicies** must: * status **404** * title with message "Not Found" * detail with message "No ACLs found for the requested service: {NOT_VALID_SERVICE_API_ID}, aef_id: {AEF_ID_NOT_VALID}, invoker: {api_invoker_id} and supportedFeatures: {supported_features}". @@ -545,43 +545,43 @@ At this documentation you will have all information and related files and exampl * API Provider had a Service API Published on CAPIF * API Invoker had a Security Context for Service API published. +**Execution Steps**: + + 1. Register and onboard Provider at CCF. + 2. Publish a provider API with name **service_1** + 3. Register and onboard Invoker at CCF + 4. Store signed Certificate + 5. Create Security Context + 6. Provider Get ACL information. + **Information of Test**: 1. Perform [Provider Registration] 2. Publish Service API at CCF: - * Send Post to ccf_publish_url *https://{CAPIF_HOSTNAME}/published-apis/v1/{apfId}/service-apis* - * body [service api description] with apiName service_1 - * Store *serviceApiId* - * Use APF Certificate + * Send **POST** to ccf_publish_url **https://{CAPIF_HOSTNAME}/published-apis/v1/{apfId}/service-apis** + * body [service api description] with apiName **service_1** + * Store **serviceApiId** + * Use **APF Certificate** 3. Perform [Invoker Onboarding] store apiInvokerId 4. Discover published APIs 5. Create Security Context for this Invoker - * Send PUT *https://{CAPIF_HOSTNAME}/trustedInvokers/{apiInvokerId}* + * Send **PUT** **https://{CAPIF_HOSTNAME}/trustedInvokers/{apiInvokerId}** * body [service security body] - * Use Invoker Certificate + * Use **Invoker Certificate** 6. Provider Retrieve ACL - * Send GET *https://{CAPIF_HOSTNAME}/access-control-policy/v1/accessControlPolicyList/${serviceApiId}?aef-id=${aef_id}&api-invoker-id={NOT_VALID_API_INVOKER_ID}* - * Use *serviceApiId*, *aefId* and *NOT_VALID_API_INVOKER_ID* - * Use AEF Provider Certificate + * Send **GET** **https://{CAPIF_HOSTNAME}/access-control-policy/v1/accessControlPolicyList/${serviceApiId}?aef-id=${aef_id}&api-invoker-id={NOT_VALID_API_INVOKER_ID}** + * Use **serviceApiId**, **aefId** and **NOT_VALID_API_INVOKER_ID** + * Use **AEF Provider Certificate** -**Execution Steps**: - - 1. Register and onboard Provider at CCF. - 2. Publish a provider API with name service_1 - 3. Register and onboard Invoker at CCF - 4. Store signed Certificate - 5. Create Security Context - 6. Provider Get ACL information. - **Expected Result**: 1. ACL Response: 1. **404 Not Found** Response. 2. body returned must accomplish **Problem Details** data structure. - 3. apiInvokerPolicies must: + 3. **apiInvokerPolicies** must: * status **404** * title with message "Not Found" * detail with message "No ACLs found for the requested service: {NOT_VALID_SERVICE_API_ID}, aef_id: {AEF_ID_NOT_VALID}, invoker: {api_invoker_id} and supportedFeatures: {supported_features}". @@ -593,44 +593,44 @@ At this documentation you will have all information and related files and exampl **Description**: - This test case will check that an API Provider can't retrieve ACL from CAPIF using APF Certificate + This test case will check that an API Provider can't retrieve ACL from CAPIF using **APF Certificate** **Pre-Conditions**: * API Provider had a Service API Published on CAPIF * API Invoker had a Security Context for Service API published. +**Execution Steps**: + + 1. Register and onboard Provider at CCF. + 2. Publish a provider API with name **service_1** + 3. Register and onboard Invoker at CCF + 4. Store signed Certificate + 5. Create Security Context + 6. Provider Get ACL information. + **Information of Test**: 1. Perform [Provider Registration] 2. Publish Service API at CCF: - * Send Post to ccf_publish_url *https://{CAPIF_HOSTNAME}/published-apis/v1/{apfId}/service-apis* - * body [service api description] with apiName service_1 - * Store *serviceApiId* - * Use APF Certificate + * Send **POST** to ccf_publish_url **https://{CAPIF_HOSTNAME}/published-apis/v1/{apfId}/service-apis** + * body [service api description] with apiName **service_1** + * Store **serviceApiId** + * Use **APF Certificate** 3. Perform [Invoker Onboarding] store apiInvokerId 4. Discover published APIs 5. Create Security Context for this Invoker - * Send PUT *https://{CAPIF_HOSTNAME}/trustedInvokers/{apiInvokerId}* + * Send **PUT** **https://{CAPIF_HOSTNAME}/trustedInvokers/{apiInvokerId}** * body [service security body] - * Use Invoker Certificate + * Use **Invoker Certificate** 6. Provider Retrieve ACL - * Send GET *https://{CAPIF_HOSTNAME}/access-control-policy/v1/accessControlPolicyList/${serviceApiId}?aef-id=${aef_id}* - * Use *serviceApiId* and *aefId* + * Send **GET** **https://{CAPIF_HOSTNAME}/access-control-policy/v1/accessControlPolicyList/${serviceApiId}?aef-id=${aef_id}** + * Use **serviceApiId** and **aefId** * Use APF Provider Certificate -**Execution Steps**: - - 1. Register and onboard Provider at CCF. - 2. Publish a provider API with name service_1 - 3. Register and onboard Invoker at CCF - 4. Store signed Certificate - 5. Create Security Context - 6. Provider Get ACL information. - **Expected Result**: 1. Response to Logging Service must accomplish: @@ -654,37 +654,37 @@ At this documentation you will have all information and related files and exampl * API Provider had a Service API Published on CAPIF * API Invoker had a Security Context for Service API published. +**Execution Steps**: + + 1. Register and onboard Provider at CCF. + 2. Publish a provider API with name **service_1** + 3. Register and onboard Invoker at CCF + 4. Store signed Certificate + 5. Create Security Context + 6. Provider Get ACL information. + **Information of Test**: 1. Perform [Provider Registration] 2. Publish Service API at CCF: - * Send Post to ccf_publish_url *https://{CAPIF_HOSTNAME}/published-apis/v1/{apfId}/service-apis* - * body [service api description] with apiName service_1 - * Store *serviceApiId* - * Use APF Certificate + * Send **POST** to ccf_publish_url **https://{CAPIF_HOSTNAME}/published-apis/v1/{apfId}/service-apis** + * body [service api description] with apiName **service_1** + * Store **serviceApiId** + * Use **APF Certificate** 3. Perform [Invoker Onboarding] store apiInvokerId 4. Discover published APIs 5. Create Security Context for this Invoker - * Send PUT *https://{CAPIF_HOSTNAME}/trustedInvokers/{apiInvokerId}* + * Send **PUT** **https://{CAPIF_HOSTNAME}/trustedInvokers/{apiInvokerId}** * body [service security body] - * Use Invoker Certificate + * Use **Invoker Certificate** 6. Provider Retrieve ACL - * Send GET *https://{CAPIF_HOSTNAME}/access-control-policy/v1/accessControlPolicyList/${serviceApiId}?aef-id=${aef_id}* - * Use *serviceApiId* and *aefId* + * Send **GET** **https://{CAPIF_HOSTNAME}/access-control-policy/v1/accessControlPolicyList/${serviceApiId}?aef-id=${aef_id}** + * Use **serviceApiId** and **aefId** * Use AMF Provider Certificate -**Execution Steps**: - - 1. Register and onboard Provider at CCF. - 2. Publish a provider API with name service_1 - 3. Register and onboard Invoker at CCF - 4. Store signed Certificate - 5. Create Security Context - 6. Provider Get ACL information. - **Expected Result**: 1. Response to Logging Service must accomplish: @@ -701,43 +701,43 @@ At this documentation you will have all information and related files and exampl **Description**: - This test case will check that an API Provider can't retrieve ACL from CAPIF using Invoker Certificate + This test case will check that an API Provider can't retrieve ACL from CAPIF using **Invoker Certificate** **Pre-Conditions**: * API Provider had a Service API Published on CAPIF * API Invoker had a Security Context for Service API published. +**Execution Steps**: + + 1. Register and onboard Provider at CCF. + 2. Publish a provider API with name **service_1** + 3. Register and onboard Invoker at CCF + 4. Store signed Certificate + 5. Create Security Context + 6. Provider Get ACL information. + **Information of Test**: 1. Perform [Provider Registration] 2. Publish Service API at CCF: - * Send Post to ccf_publish_url *https://{CAPIF_HOSTNAME}/published-apis/v1/{apfId}/service-apis* - * body [service api description] with apiName service_1 - * Store *serviceApiId* - * Use APF Certificate + * Send **POST** to ccf_publish_url **https://{CAPIF_HOSTNAME}/published-apis/v1/{apfId}/service-apis** + * body [service api description] with apiName **service_1** + * Store **serviceApiId** + * Use **APF Certificate** 3. Perform [Invoker Onboarding] store apiInvokerId 4. Discover published APIs 5. Create Security Context for this Invoker - * Send PUT *https://{CAPIF_HOSTNAME}/trustedInvokers/{apiInvokerId}* + * Send **PUT** **https://{CAPIF_HOSTNAME}/trustedInvokers/{apiInvokerId}** * body [service security body] - * Use Invoker Certificate + * Use **Invoker Certificate** 6. Provider Retrieve ACL - * Send GET *https://{CAPIF_HOSTNAME}/access-control-policy/v1/accessControlPolicyList/${serviceApiId}?aef-id=${aef_id}* - * Use *serviceApiId* and *aefId* - * Use Invoker Certificate - -**Execution Steps**: - - 1. Register and onboard Provider at CCF. - 2. Publish a provider API with name service_1 - 3. Register and onboard Invoker at CCF - 4. Store signed Certificate - 5. Create Security Context - 6. Provider Get ACL information. + * Send **GET** **https://{CAPIF_HOSTNAME}/access-control-policy/v1/accessControlPolicyList/${serviceApiId}?aef-id=${aef_id}** + * Use **serviceApiId** and **aefId** + * Use **Invoker Certificate** **Expected Result**: @@ -762,56 +762,56 @@ At this documentation you will have all information and related files and exampl * API Provider had a Service API Published on CAPIF * API Invoker had a Security Context for Service API published and ACL is present +**Execution Steps**: + + 1. Register and onboard Provider at CCF. + 2. Publish a provider API with name **service_1** + 3. Register and onboard Invoker at CCF + 4. Store signed Certificate + 5. Create Security Context + 6. Provider Get ACL information of invoker. + 7. Remove Invoker from CAPIF. + 8. Provider Get ACL information of invoker. + **Information of Test**: 1. Perform [Provider Registration] 2. Publish Service API at CCF: - * Send Post to ccf_publish_url *https://{CAPIF_HOSTNAME}/published-apis/v1/{apfId}/service-apis* - * body [service api description] with apiName service_1 - * Store *serviceApiId* - * Use APF Certificate + * Send **POST** to ccf_publish_url **https://{CAPIF_HOSTNAME}/published-apis/v1/{apfId}/service-apis** + * body [service api description] with apiName **service_1** + * Store **serviceApiId** + * Use **APF Certificate** 3. Perform [Invoker Onboarding] store apiInvokerId 4. Discover published APIs 5. Create Security Context for this Invoker - * Send PUT *https://{CAPIF_HOSTNAME}/trustedInvokers/{apiInvokerId}* + * Send **PUT** **https://{CAPIF_HOSTNAME}/trustedInvokers/{apiInvokerId}** * body [service security body] - * Use Invoker Certificate + * Use **Invoker Certificate** 6. Provider Retrieve ACL - * Send GET *https://{CAPIF_HOSTNAME}/access-control-policy/v1/accessControlPolicyList/${serviceApiId}?aef-id=${aef_id}&api-invoker-id={api-invoker-id}* - * Use *serviceApiId*, *aefId* and *api-invoker-id* - * Use AEF Provider Certificate + * Send **GET** **https://{CAPIF_HOSTNAME}/access-control-policy/v1/accessControlPolicyList/${serviceApiId}?aef-id=${aef_id}&api-invoker-id={api-invoker-id}** + * Use **serviceApiId**, **aefId** and **api-invoker-id** + * Use **AEF Provider Certificate** 7. Remove Invoker from CAPIF 8. Provider Retrieve ACL - * Send GET *https://{CAPIF_HOSTNAME}/access-control-policy/v1/accessControlPolicyList/${serviceApiId}?aef-id=${aef_id}&api-invoker-id={api-invoker-id}* - * Use *serviceApiId*, *aefId* and *api-invoker-id* - * Use AEF Provider Certificate + * Send **GET** **https://{CAPIF_HOSTNAME}/access-control-policy/v1/accessControlPolicyList/${serviceApiId}?aef-id=${aef_id}&api-invoker-id={api-invoker-id}** + * Use **serviceApiId**, **aefId** and **api-invoker-id** + * Use **AEF Provider Certificate** -**Execution Steps**: - - 1. Register and onboard Provider at CCF. - 2. Publish a provider API with name service_1 - 3. Register and onboard Invoker at CCF - 4. Store signed Certificate - 5. Create Security Context - 6. Provider Get ACL information of invoker. - 7. Remove Invoker from CAPIF. - 8. Provider Get ACL information of invoker. - **Expected Result**: 1. ACL Response: 1. **200 OK** Response. 2. body returned must accomplish **AccessControlPolicyList** data structure. - 3. apiInvokerPolicies must: + 3. **apiInvokerPolicies** must: 1. contain only one object. 2. apiInvokerId must match apiInvokerId registered previously. 2. ACL Response: 1. **404 Not Found** Response. 2. body returned must accomplish **Problem Details** data structure. - 3. apiInvokerPolicies must: + 3. **apiInvokerPolicies** must: * status **404** * title with message "Not Found" * detail with message "No ACLs found for the requested service: {NOT_VALID_SERVICE_API_ID}, aef_id: {AEF_ID_NOT_VALID}, invoker: None and supportedFeatures: None". diff --git a/doc/testing/testplan/api_events_service/README.md b/doc/testing/testplan/api_events_service/README.md index 91ef445f8d102d5c8b26944b03a73486e1594c97..891a7e91fb000ddc3c6f02e138242db84e8b996c 100644 --- a/doc/testing/testplan/api_events_service/README.md +++ b/doc/testing/testplan/api_events_service/README.md @@ -9,6 +9,7 @@ At this documentation you will have all information and related files and exampl **Description**: This test case will check that a CAPIF subscriber (Invoker or Publisher) can Subscribe to Events + **Pre-Conditions**: * CAPIF subscriber is pre-authorised (has valid InvokerId or apfId from CAPIF Authority)