Merge branch 'OCF83-create-visibility-control-section-under-features-and-update-release-notes' into 'develop'
Ocf83 create visibility control section under features and update release notes
See merge request !88
The Visibility Control API is a Helper service within OpenCAPIF that allows API Providers and administrators to define fine-grained rules that determine whether specific APIs can be discovered and consumed by API Invokers.
Based on this, the discovery process returns only the APIs that the Invoker is authorized to access. This approach restricts visibility from the very beginning, ensuring the Invoker cannot even see unauthorized AEFs during discovery.
*Note: The first version of this API was merged with the staging branch (Release 4). The complete changes and evolution have been developed for **Release 5**.*
## Testing & Documentation References
***Robot Tests Location:**
`/capif/tests/features/Helper/Visibility Control Api/visibility_control.robot`
***Test Plan Documentation:**
Available in the [Visibility Control test plan](../../testing/testplan/helper/visibility_control/README.md).
---
## Core Operations
### 1. Rules Management (API Provider)
**User Story:**
As an API Provider, I want to define access control rules for my APIs, so that I can decide which API Invokers are allowed or denied to access.
**Acceptance Criteria:**
* The Provider can create, update, list, and delete access rules[cite: 1].
* Each rule includes filters (`providerSelector`, `invokerExceptions`), an `enabled` field, and a validity period (`startsAt`, `endsAt`)[cite: 1].
* The field `default_access` defines the default behavior (`ALLOW` or `DENY`)[cite: 1].
* The Helper validates Provider identity, the rule structure, time, and consistency overall.
* Only enabled and time-valid rules are enforced by the CCF.
Helper-->>Helper: 4. Time validity (e.g. startsAt < endsAt)
alt Rule invalid
Helper-->>Provider: 400 Bad Request (validation errors)
else Rule valid
Helper->>DB: 5. Store rule in RulesDB
DB-->>Helper: ruleId + timestamps
Helper-->>Provider: 201 Created (ruleId + metadata)
end
```
---
### 2. Access Decision (API Invoker)
**User Story:**
As an API Invoker, I want to discover APIs published by Providers, but I will discover only those that I am authorized to see according to the Provider/Admin’s rules.
**Acceptance Criteria & Decision Workflow:**
When sending a Service API Discovery Request, the CCF executes the following process:
1.**Identity & Discovery Initiation:**
* Verifies the identity of the Invoker.
* Lists all published APIs.
**(Note: This first part is the current Discovery Process).*
| `/rules` | `GET` | Retrieves a list of all defined visibility rules. | **200 OK**: JSON object containing an array of rules (`items`) and optional `nextPageToken`. |
| `/rules` | `POST` | Creates a new visibility rule (server generates `ruleId`). | **201 Created**: Returns created `Rule` object.<br>**400 Bad Request**: Invalid input/structure. |
| `/rules/{ruleId}` | `GET` | Retrieves details of a specific rule by ID. | **200 OK**: `Rule` object details.<br>**404 Not Found**: Rule does not exist. |
| `/rules/{ruleId}` | `PATCH` | Partially updates fields in an existing rule. | **200 OK**: Updated `Rule` object.<br>**400 Bad Request**: Invalid payload.<br>**404 Not Found**: Rule not found. |
| `/rules/{ruleId}` | `DELETE` | Removes a specific rule by ID. | **204 No Content**: Successfully deleted.<br>**404 Not Found**: Rule not found. |
| `/decision/invokers/{apiInvokerId}/discoverable-apis` | `GET` / `POST` | Evaluates and returns filtered discoverable APIs for the given invoker. | **200 OK**: `DiscoveredAPIs` list matching active rules.<br>**400 Bad Request**: Invalid parameters.<br>**404 Not Found**: Invoker not found. |
@@ -24,6 +24,15 @@ Added implementation of **CAPIF_Open_Discover_Service_API** to support open disc
- Scripts updated to include new service.
- CI/CD also upgraded to generate new images of this new service.
#### **Visibility Control API**
Added the complete implementation of the **Visibility Control API** as a Helper service.
- API Providers and administrators can create, update, list, and delete visibility rules.
- Rules support provider selectors, invoker exceptions, default access behavior, enabled status, and validity periods.
- Discover service integration filters published APIs according to the active rules and the API Invoker identity.
- More information is available in the [Visibility Control feature documentation](./features/visibility-control/visibility-control.md).
### **Technical Debt Solved**
#### **Upgrade packages**
@@ -74,6 +83,7 @@ Robot image was upgraded to latest version on this release, including following
- 2 New tests related with use of same apiName across different AEFs.
- 6 new tests related with the new service OpenDiscover.
- 12 new tests related with the Visibility Control API.
- Duplicate test name capif_api_provider_management-10 changed.
#### **Security Issues**
@@ -89,7 +99,8 @@ Robot image was upgraded to latest version on this release, including following
- New test plan section related with OpenCAPIF Interconnection.
- New OpenCAPIF Interconnection section under features section.
- New [Open Discover](./open-discover/open-discover.md) section added under Features, with a developer guide on how to call the Open Discover Service API (authentication, query parameters and error responses).
- New Visibility Control section under features section.
- New [Visibility Control](./features/visibility-control/visibility-control.md) section added under Features.
- New [Visibility Control API test plan](./testing/testplan/helper/visibility_control/README.md) added, covering visibility rule management and discoverable API filtering.