Skip to content
Snippets Groups Projects
Commit 3416776a authored by Jorge Moratinos's avatar Jorge Moratinos
Browse files

Merge branch 'OCF-Doc32-test-plan-for-event-filter-feature' into 'develop'

Resolve "Test plan for Event Filter feature"

Closes #32

See merge request !35
parents e039dc3d 9f658db1
No related branches found
No related tags found
1 merge request!35Resolve "Test plan for Event Filter feature"
Pipeline #12581 passed
...@@ -9,6 +9,11 @@ ...@@ -9,6 +9,11 @@
- These filters are specified in the ***eventFilters*** of the subscription if the ***Enhanced Event Report*** feature of the ***Supported Features*** is activated. - These filters are specified in the ***eventFilters*** of the subscription if the ***Enhanced Event Report*** feature of the ***Supported Features*** is activated.
- More detailed information about event filters can be found in [Event Filter]. - More detailed information about event filters can be found in [Event Filter].
### **Testing**
- New Event Filter test suite with 8 tests. [Event Filter](./testing/testplan/event_filter/README.md)
### **Technical Debt Solved** ### **Technical Debt Solved**
#### **Hardening on startup scripts for services interacting with Vault** #### **Hardening on startup scripts for services interacting with Vault**
......
...@@ -15,3 +15,4 @@ List of Common API Services implemented: ...@@ -15,3 +15,4 @@ List of Common API Services implemented:
## Features ## Features
* [Vendor Extensibility](./vendor_extensibility/README.md) * [Vendor Extensibility](./vendor_extensibility/README.md)
* [Api Status](./api_status/README.md) * [Api Status](./api_status/README.md)
* [Event Filter](./event_filter/README.md)
...@@ -453,6 +453,7 @@ At this documentation you will have all information and related files and exampl ...@@ -453,6 +453,7 @@ At this documentation you will have all information and related files and exampl
2. body [event subscription request body] with: 2. body [event subscription request body] with:
1. events: **['SERVICE_API_UPDATE']** 1. events: **['SERVICE_API_UPDATE']**
2. supportedFeatures: binary 0100 -> string **4** 2. supportedFeatures: binary 0100 -> string **4**
3. **eventFilter** set to apiId from published API.
3. Use **Invoker Certificate** 3. Use **Invoker Certificate**
7. Update published API at CCF: 7. Update published API at CCF:
...@@ -850,7 +851,7 @@ At this documentation you will have all information and related files and exampl ...@@ -850,7 +851,7 @@ At this documentation you will have all information and related files and exampl
1. Send **POST** to **https://{CAPIF_HOSTNAME}/capif-events/v1/{subscriberId}/subscriptions** 1. Send **POST** to **https://{CAPIF_HOSTNAME}/capif-events/v1/{subscriberId}/subscriptions**
2. body [event subscription request body] with: 2. body [event subscription request body] with:
1. events: **['SERVICE_API_INVOCATION_SUCCESS','SERVICE_API_INVOCATION_FAILURE']** 1. events: **['SERVICE_API_INVOCATION_SUCCESS','SERVICE_API_INVOCATION_FAILURE']**
2. eventFilter: only receive events from provider's aefId. 2. eventFilter: Not present.
3. supportedFeatures: binary 0000 -> string **0** 3. supportedFeatures: binary 0000 -> string **0**
3. Use **Invoker Certificate** 3. Use **Invoker Certificate**
...@@ -925,7 +926,7 @@ At this documentation you will have all information and related files and exampl ...@@ -925,7 +926,7 @@ At this documentation you will have all information and related files and exampl
1. Send **POST** to **https://{CAPIF_HOSTNAME}/capif-events/v1/{subscriberId}/subscriptions** 1. Send **POST** to **https://{CAPIF_HOSTNAME}/capif-events/v1/{subscriberId}/subscriptions**
2. body [event subscription request body] with: 2. body [event subscription request body] with:
1. events: **['SERVICE_API_AVAILABLE','SERVICE_API_UNAVAILABLE']** 1. events: **['SERVICE_API_AVAILABLE','SERVICE_API_UNAVAILABLE']**
2. eventFilter: only receive events from provider's aefId. 2. eventFilter: Not present.
3. supportedFeatures: binary 0000 -> string **0** 3. supportedFeatures: binary 0000 -> string **0**
3. Use **Invoker Certificate** 3. Use **Invoker Certificate**
...@@ -1001,7 +1002,7 @@ At this documentation you will have all information and related files and exampl ...@@ -1001,7 +1002,7 @@ At this documentation you will have all information and related files and exampl
1. Send **POST** to **https://{CAPIF_HOSTNAME}/capif-events/v1/{subscriberId}/subscriptions** 1. Send **POST** to **https://{CAPIF_HOSTNAME}/capif-events/v1/{subscriberId}/subscriptions**
2. body [event subscription request body] with: 2. body [event subscription request body] with:
1. events: **['SERVICE_API_UPDATE']** 1. events: **['SERVICE_API_UPDATE']**
2. eventFilter: only receive events from provider's aefId. 2. eventFilter: Not present.
3. supportedFeatures: binary 0000 -> string **0** 3. supportedFeatures: binary 0000 -> string **0**
3. Use **Invoker Certificate** 3. Use **Invoker Certificate**
......
...@@ -110,6 +110,103 @@ The steps to register a new user at Register Service are: ...@@ -110,6 +110,103 @@ The steps to register a new user at Register Service are:
![Flow](../../../images/flows/07_Invoker_Onboarding.png) ![Flow](../../../images/flows/07_Invoker_Onboarding.png)
## Subscribe to Events
Subscription to an Event by any entity (Invoker, Provider or other CCF), will ensure when subscription is matched one event will be sent to notification destination present on subscription creation.
### How to create a subscription
In order to create a subcription, customer must setup some different parameters.
#### Basic Subscription
Basic subcription will be used when Enhanced_event_report feature is not active at supportedFeatures attribute at [event subscription request body], this means this kind of subcription:
* Won't be filtered by eventFilters.
* Reporting specific requierements won't be enable (eventReq).
* Response will only contains basic information without eventDetail.
With this in mind, customer must select next parameters:
##### Events to subscribe
Select event or events to subscribe. Check from next list:
| Event | Description | Status |
| :-------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------- | :-------------: |
| SERVICE_API_AVAILABLE | Events related to the availability of service APIs after the service APIs are published. | Implemented |
| SERVICE_API_UNAVAILABLE | Events related to the unavailability of service APIs after the service APIs are unpublished. | Implemented |
| SERVICE_API_UPDATE | Events related to change in service API information. | Implemented |
| API_INVOKER_ONBOARDED | Events related to API invoker onboarded to CAPIF. | Implemented |
| API_INVOKER_OFFBOARDED | Events related to API invoker offboarded from CAPIF. | Implemented |
| SERVICE_API_INVOCATION_SUCCESS | Events related to the successful invocation of service APIs. | Implemented |
| SERVICE_API_INVOCATION_FAILURE | Events related to the failed invocation of service APIs. | Implemented |
| ACCESS_CONTROL_POLICY_UPDATE | Events related to the update for the access control policy related to the service APIs. | Implemented |
| ACCESS_CONTROL_POLICY_UNAVAILABLE | Events related to the unavailability of the access control policy related to the service APIs (NOTE). | Implemented |
| API_INVOKER_AUTHORIZATION_REVOKED | Events related to the revocation of the authorization of API invokers to access the service APIs. (NOTE). | Implemented |
| API_INVOKER_UPDATED | Events related to API invoker profile updated to CAPIF. | Implemented |
| API_TOPOLOGY_HIDING_CREATED | Events related to the creation or update of the API topology hiding information of the service API after the service APIs are published. | Not Implemented |
| API_TOPOLOGY_HIDING_REVOKED | Events related to the revocation of the API topology information of the service API after the service APIs are unpublished. | Not Implemented |
**NOTE**: 3GPP Common API Framework release 19 specs not specify further details (e.g event filters) for this event.
##### Notification Destination
* Set ***notification destination*** at [event subscription request body] with the endpoint to be reached by CCF when an event matches.
#### Enhanced Subscription
Enhanced will be the requiered subscription if customer needs one or more next functionality:
* Filter events. (eventFilters)
* Setup some reporting requirements. (eventReq)
* Get more detailed information when event notification is received (eventDetail on response)
If that is the case, then [event subscription request body] must setup supported features with Enhanced_event_report feature active (feature 3)
With this feature active, customer can send eventFilter and EventReq with required information.
##### Event Filter
We can include an array for each suscribed array with desired eventFilter to be applied, but we need to keep in mind not all events allows all filters, take a look to next table:
| Event | Event filter allowed |
| :-------------------------------- | :----------------------------- |
| SERVICE_API_AVAILABLE | apiIds |
| SERVICE_API_UNAVAILABLE | apiIds |
| SERVICE_API_UPDATE | apiIds |
| API_INVOKER_ONBOARDED | apiInvokerIds |
| API_INVOKER_OFFBOARDED | apiInvokerIds |
| SERVICE_API_INVOCATION_SUCCESS | apiIds, apiInvokerIds, aefIds. |
| SERVICE_API_INVOCATION_FAILURE | apiIds, apiInvokerIds, aefIds. |
| ACCESS_CONTROL_POLICY_UPDATE | apiIds, apiInvokerIds. |
| ACCESS_CONTROL_POLICY_UNAVAILABLE | - |
| API_INVOKER_AUTHORIZATION_REVOKED | - |
| API_INVOKER_UPDATED | apiInvokerIds |
| API_TOPOLOGY_HIDING_CREATED | - |
| API_TOPOLOGY_HIDING_REVOKED | - |
##### Event Req
Currently not implemented
### Steps to Perform operation
1. Perform [invoker onboarding] or [provider registration]
2. Event Subscription:
1. Send **POST** to **https://{CAPIF_HOSTNAME}/capif-events/v1/{subscriberId}/subscriptions**
2. body [event subscription request body]
3. Use **Invoker Certificate** or **AMF Provider Certificate**
### Checks to ensure provider registration
1. Response to Event Subscription must accomplish:
1. **201 Created**
2. The URI of the created resource shall be returned in the "Location" HTTP header, following this structure: **{apiRoot}/capif-events/{apiVersion}/{subscriberId}/subscriptions/{subscriptionId}**
3. Response Body must follow **EventSubscription** data structure.
[user_registration_body]: ./user_registration_body.json "User Registration Body" [user_registration_body]: ./user_registration_body.json "User Registration Body"
[user_getauth_response_body_example]: ./user_getauth_response_body_example.json "User GetAuth response Body Example" [user_getauth_response_body_example]: ./user_getauth_response_body_example.json "User GetAuth response Body Example"
...@@ -118,5 +215,10 @@ The steps to register a new user at Register Service are: ...@@ -118,5 +215,10 @@ The steps to register a new user at Register Service are:
[provider request body]: ../api_provider_management/provider_details_post_example.json "API Provider Enrolment Request" [provider request body]: ../api_provider_management/provider_details_post_example.json "API Provider Enrolment Request"
[event subscription request body]: ../api_events_service/event_subscription.json "Event Subscription Request"
[invoker onboarding]: #onboard-an-invoker "Invoker Onboarding"
[provider registration]: #register-a-provider "Provider Registration"
[Return To All Test Plans]: ../README.md [Return To All Test Plans]: ../README.md
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment