Commit 70b942e0 authored by Jorge Moratinos's avatar Jorge Moratinos
Browse files

Minor changes on interconnection feature

parent 5786f545
Loading
Loading
Loading
Loading
+5 −0
Changes for doc/interconnection/check-authentication.json: 5 added lines, 0 removed lines.
Original line number Diff line number Diff line
// This JSON represents the request body for POST to checking authentication in the AEF Security API.
{
  "apiInvokerId": "string",
  "supportedFeatures": "string"
}
 No newline at end of file
+34 −21
Changes for doc/interconnection/interconnection.md: 34 added lines, 21 removed lines.
Original line number Diff line number Diff line
@@ -43,7 +43,7 @@ OCF Release 5 implements a functional version of CAPIF interconnection capabilit

Interconnection establishment is initiated by the CAPIF administrator of a local CCF (CCF-A), using the "/request" API, towards a peer CCF (CCF-B).

POST /helper/interconnection/request with { "dstProvDom": "CCF-B host:port" }
**POST /helper/interconnection/request with { "dstProvDom": "CCF-B host:port" }**

1. If dstProvDom is already in interconnected → 409.
2. CCF-A calls CCF-B: POST https://{dstProvDom}/helper/interconnection/establish over mTLS, sending CCF-A’s ccfId, domain, CA, and public key.
@@ -52,14 +52,14 @@ POST /helper/interconnection/request with { "dstProvDom": "CCF-B host:port" }

CCF administrator (either A or B) can also tear down the connection between the two CCFs

DELETE /helper/interconnection/request/{peerCcfId}
**DELETE /helper/interconnection/request/{peerCcfId}**

1. Peer DELETE /establish/{localCcfId}
2. On success, drop services whose apf_id is the peer CCF, pull that CCF from pubApiPath.ccfIds, delete the interconnected row.

After establishing the interconnection, the CCFs have to syncronize the state of the shared APIs. This is managed via the "/sync" API.

POST /helper/interconnection/sync from CCF-A to CCF-B.
**POST /helper/interconnection/sync from CCF-A to CCF-B.**

On "/sync", the receiving CCF:

@@ -71,7 +71,7 @@ On "/sync", the receiving CCF:
- apf_id is not the peer CCF (no bounce-back)
- peer CCF not already in pubApiPath.ccfIds

POST https://{dstProvDom}/published-apis/v1/{srcProvDom}/service-apis.
**POST https://{dstProvDom}/published-apis/v1/{srcProvDom}/service-apis.**

1. The payload sets shareableInfo.isShareable = false so the peer does not re-share.
2. Records the peer in pubApiPath.ccfIds
@@ -104,7 +104,7 @@ When the interconnection capability is enabled in CCFs, the publish API flow (PO

![Interconnection Publish POST](../images/interconnection/CAPIF_Publish_after_interconnection.png)

In case of a PUT / PATCH request:
**In case of a PUT / PATCH request:**

Peers are aligned before the local write:

@@ -115,35 +115,37 @@ Peers are aligned before the local write:

Peer copies are found by old apiName, because each peer assigns its own apiId. If any peer cannot be aligned, the local API is left unchanged.

In case of a DELETE request:
**In case of a DELETE request:**

Unpublish from peers first, then delete locally. If a peer is unreachable, the local copy stays so the two CCFs do not drift.

![Interconnection Publish PUT PATCH DELETE](../images/interconnection/CAPIF_Publish_update_and_delete_across_CCFs.png)

### Creation of Security Context by invoker onboarded on different CCF than Provider

### Creation of Security Context
From the point of view of Invoker and Providers, the access to exposed APIs follow the same flows for one CCF, this means:

1. Provider will Register itself and publish APIs to their own CCF.
2. Invoker will onboard and discover APIs to their own CCF.
3. Invoker request creation of security context of any of APIs discovered.
1. Provider will Register itself and publish APIs to its own CCF.
2. Invoker will onboard and discover APIs to its own CCF.
3. Invoker request creation of a security context for any of APIs discovered to its own CCF.

From the point of view of all entities, the interaction will be the same, but when the Provider and Invoker are in differen CCFs, internally the flows change.
From the point of view of all entities, the interaction will be the same, but when the Provider and Invoker are in differen CCFs, internally the flows change. The internal flow will be explained below.

When Invoker request creation of Security Context to an API registered on interconnected CCF, then Invoker's CCF will request creation of security context con Provider's CCF. This will trigger creation of ACLs and some other events related.

![Interconnection Security Context Creation](../images/interconnection/01_Creation_of_Security_Context_Same_Vault.png)

After creation there will be 3 different flow involved depending on selSecurityMethod returned by Invoker's CCF:
On next section the flows involved depending on security method selected will be detailed.

### Consume Provider's API

* OAUTH: Access token will be used to access exposed API.
* PKI: Invoker must use their certificate to access exposed API.
* PSK: Invoker must derive they PSK key from connexion between invoker and CCF.
Previous section created the security context to allow communicaction from Invoker and Provider's API. There will be 3 different flow involved depending on **selSecurityMethod** returned by Invoker's CCF:

NOTE: PSK and PKI security methods imply Provider must implement AEF_security_API defined by 3GPP, because Invoker will begin the communication to exposed api by requesting POST to /check-authentication with [body](./check-authentication.json). 
* **OAUTH**: Access token will be used to access exposed API.
* **PKI**: Invoker must use its certificate to access exposed API.
* **PSK**: Invoker must derive the PSK key from connexion between invoker and CCF at context creation.

*NOTE: PSK and PKI security methods imply Provider must implement AEF_security_API defined by 3GPP, because Invoker will begin the communication to exposed api by requesting POST to /check-authentication with [body](./check-authentication.json).*

We will see each security method flow in next sections.

#### OAUTH

@@ -156,7 +158,7 @@ For OAUTH security method,

![Interconnection Oauth](../images/interconnection/02_OAuth.png)

Summary:
**Summary:**

In this scenario, Invoker's CCF acts as a gateway to forward request to Provider's CCF, because this token will be created by private certificate of Provider's CCF.

@@ -165,7 +167,7 @@ In this scenario, Invoker's CCF acts as a gateway to forward request to Provider

For PKI security method,

* Provider must implement AEF_Security_API, defined by 3GPP. The check-authentication endpoint must be requested from Invoker before initiate consumption of exposed API, indicating api_invoker_id.
* Provider must implement *AEF_Security_API*, defined by 3GPP. The *check-authentication* endpoint must be requested from Invoker before initiate consumption of exposed API, indicating api_invoker_id. [body](./check-authentication.json)
* Provider will request security context of api_invoker_id to Provider's CCF, and Provider's CCF will request security context to Invoker's CCF and this security context will be forwarded to Provider, which includes the ca root to decode invoker's certificate.
* Provider will take authenticationInfo present at security_info array inside GET security context response and store it to be used later.
* Invoker reach exposed API by including its certificate.
@@ -173,12 +175,18 @@ For PKI security method,

![Interconnection PKI](../images/interconnection/03_PKI.png)

**Summary:**

In this scenario, Provider must implement *AEF_Security_API* in order to begin communication by reach *check-authentication* by Invoker previous start consuming Provider's API.

Provider will request on this initial step the Security Context involved to obtain CA to be used to validate Invoker's certificate.

#### PSK

For PSK security method,

* Invoker derived PSK when request creation of Security Context and store it to be used later.
* Provider must implement AEF_Security_API, defined by 3GPP. The check-authentication endpoint must be requested from Invoker before initiate consumption of exposed API, indicating api_invoker_id.
* Provider must implement *AEF_Security_API*, defined by 3GPP. The *check-authentication* endpoint must be requested from Invoker before initiate consumption of exposed API, indicating api_invoker_id. [body](./check-authentication.json)
* Provider will request security context of api_invoker_id to Provider's CCF, and Provider's CCF will request security context to Invoker's CCF and this security context will be forwarded to Provider, which includes the ca root to decode invoker's certificate and PSK derived by Invoker's CCF.
* Provider will take authenticationInfo, and authorizationInfo present at security_info array inside GET security context response and store them to be used later.
* Invoker reach exposed API including PSK inside Authorization header.
@@ -186,3 +194,8 @@ For PSK security method,

![Interconnection PSK](../images/interconnection/04_PSK.png)

**Summary:**

In this scenario, Provider must implement *AEF_Security_API* in order to begin communication by reach *check-authentication* by Invoker previous start consuming Provider's API.

Provider will request on this initial step the Security Context involved to obtain CA and PSK to be used to validate Invoker's communication.