Commit 32e2af70 authored by guillecxb's avatar guillecxb
Browse files

Merge remote-tracking branch 'origin/develop' into...

Merge remote-tracking branch 'origin/develop' into OCF-Doc36-documentation-how-to-manage-dynamic-configuration-2
parents 24bcf4b0 ebfc621d
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -4,11 +4,17 @@

#### **Added Event Filters**

- Check [Event Filter section](./event-filter/event-filter.md)
- New filters for Event service subscriptions.
    - You can now specify from which API, AEF, or Invoker you want to receive the event notifications.
    - 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].

### **Testing**

- New Event Filter test suite with 8 tests. [Event Filter test suite](./testing/testplan/event_filter/README.md)


### **Technical Debt Solved**

#### **Hardening on startup scripts for services interacting with Vault**
@@ -32,6 +38,7 @@ This will also helps on the restart issue on k8s deployed OpenCAPIF.

#### **Vendor Extensibility**

- Check [Vendor Extensibility section](./vendor-ext/vendor-ext.md)
- Publish API:
    - On publishing a service API, **SupportedFeatures** is read and checked whether VendExt feature is enabled.
    - When VendExt is enabled, vendor-specific fields are searched and stored in the db inside the ServiceAPIDescription object
@@ -87,12 +94,14 @@ This will also helps on the restart issue on k8s deployed OpenCAPIF.

#### **Api Status feature**

- Check [API Status section](./api-status/api-status.md)
- New logic to support ***API Status*** feature on Publish and Events Services.
- Events API:
    - Event internal notifications between services improved to accomplish specification.
    - On event subscription **SupportedFeatures** is read and stored in db to accomplish specification.
    - Also **SupportedFeatures** is checked before send event notification, in order to accomplish specification, sending **eventDetails** and related information according to ***enhanced_event_report*** and ***apiStatusMonitoring*** supported features activated.


#### Remote Scripts

New scripts developed to help on remote deployment, configuration and testing. All this script are stored under helm/scripts in capif repository.
@@ -365,4 +374,3 @@ This Release also includes a Robot Test Suite for all those services and a Postm
[New Registration Demo]: https://www.youtube.com/watch?v=sn-tN6eRvv8 "New Registration Demo"
[CICD Wiki]: https://labs.etsi.org/rep/ocf/community/-/wikis/OCF-CICD "CI/CD Wiki"
[Upgrade Release 17 to 18 Wiki]: https://labs.etsi.org/rep/ocf/community/-/wikis/3GPP-Release-18-upgrade   "Upgrade Release 17 to 18 Wiki"
[Event Filter]: ./event-filter/event-filter.md "Event Filter"
+1 −0
Original line number Diff line number Diff line
@@ -15,3 +15,4 @@ List of Common API Services implemented:
## Features
* [Vendor Extensibility](./vendor_extensibility/README.md)
* [Api Status](./api_status/README.md)
* [Event Filter](./event_filter/README.md)
+4 −3
Original line number Diff line number Diff line
@@ -453,6 +453,7 @@ At this documentation you will have all information and related files and exampl
     2. body [event subscription request body] with:
        1. events: **['SERVICE_API_UPDATE']**
        2. supportedFeatures: binary 0100 -> string **4**
        3. **eventFilter** set to apiId from published API.
     3. Use **Invoker Certificate**

  7. Update published API at CCF:
@@ -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**
     2. body [event subscription request body] with:
        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. Use **Invoker Certificate**

@@ -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**
     2. body [event subscription request body] with:
        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. Use **Invoker Certificate**

@@ -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**
     2. body [event subscription request body] with:
        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. Use **Invoker Certificate**

+102 −0
Original line number Diff line number Diff line
@@ -110,6 +110,103 @@ The steps to register a new user at Register Service are:
![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_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:

[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
+562 −0

File added.

Preview size limit exceeded, changes collapsed.