diff --git a/README.md b/README.md index 7d93739a806c94edd7944a7e3a6bf4b8c25a589c..235e7070a351c4a4788d3c06f525628564f7b3b0 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,8 @@ Current version of OpenCAPIF SDK is compatible with following publicly available # OpenCAPIF SDK Features +This section shows the features available for using CAPIF SDK and its functions in order to import the sdk into another program. + - [CAPIF_API_Invoker_management API](https://github.com/jdegre/5GC_APIs/blob/Rel-18/TS29222_CAPIF_API_Invoker_Management_API.yaml) - Onboard_API_Invoker: Corresponds to register_and_onboard_Invoker() diff --git a/doc/sdk-configuration.md b/doc/sdk-configuration.md index c3b8412dacf11cc27eb3ab830621fda2a7c5203f..fedc6208ff89e37482f15cfb8a5bd97467eebd57 100644 --- a/doc/sdk-configuration.md +++ b/doc/sdk-configuration.md @@ -1,9 +1,36 @@ ## OpenCAPIF SDK configuration -### 1. Configuration via Config.json +### **1. Configuration via Config.json** This configuration could also be fullfilled by enviroment variables (EXAMPLE) + - invoker_folder: The path (relative or absolute) of the folder you want to store your invoker information + +- provider_folder:The path (relative or absolute) of the folder you want to store your invoker information + +- capif_host:The domain name of your capif host + +- register_host:The domain name of your register host + +- capif_https_port: The port of your capif host + +- capif_register_port:The port of your register host + +- capif_callback_url:The Url you want to recieve CAPIF notifications(This functionality is not currently available) + +- csr fields: Seven information fields for generating your invoker certificate + +- capif_username: CAPIF username + +- capif_password: CAPIF password + +- APFs: Number of APF's you want to onboard as a provider Example:5 + +- AEFs: Number of AEF's you want to onboard as a provider Example:2 + +- debug_mode: Boolean | If you want to recieve logs from SDK-S6G Example:True/False + + Mandatory fields no matter the target role to be onboarded, either invoker or provider: - capif_host @@ -25,55 +52,14 @@ If you want to use SDK as a **Provider** you need to fill out these fields - provider_folder - APFs - AEFs + +### **2. Configuration of Publish.json** +This configuration file is only mandatory if we want to use the [CAPIF_Publish_Service_API](https://github.com/jdegre/5GC_APIs/blob/Rel-18/TS29222_CAPIF_Publish_Service_API.yaml) - - - - - "invoker_folder": String | The path (relative or absolute) of the folder you want to store your invoker information - - "provider_folder": String | The path (relative or absolute) of the folder you want to store your invoker information - - "capif_host": String | The domain name of your capif host - - "register_host": String | The domain name of your register host - - "capif_https_port": Integer | The port of your capif host - - "capif_register_port": Integer | The port of your register host - - "capif_callback_url": String | The Url you want to recieve CAPIF notifications(This functionality is not currently available) - - "csr_common_name": String | Information for your invoker certificate - - "csr_organizational_unit": String | Information for your invoker certificate - - "csr_organization": String | Information for your invoker certificate - - "crs_locality": String | Information for your invoker certificate - - "csr_state_or_province_name": String |Information for your invoker certificate - - "csr_country_name": String | Information for your invoker certificate - - "csr_email_address": String | Information for your invoker certificate - - "capif_username": String | CAPIF username - - "capif_password": String | CAPIF password - - "APFs": Integer | Number of APF's you want to onboard as a provider Example:5 - - "AEFs": Integer | Number of AEF's you want to onboard as a provider Example:2 - - "debug_mode": Boolean | If you want to recieve logs from SDK-S6G Example:True/False - -### 2. Configuration of Publish.json - - "serviceApiId": String | The Api id we want to use Example "02eff6e1b3a8f7c8044a92ee8a30bd" - "publisherAPFid": String | APF id we chose to use Example : "APFa165364a379035d14311deadc04332" - "publisherAEFsids": Array | Array of strings filled out of AEFs ids we want to use Example: ["AEFfa38f0e855bffb420e4994ecbc8fb9","AEFe8bfa711f4f0c95ba0b382508e6382"] + - serviceApiId: The Api id we want to use Example "02eff6e1b3a8f7c8044a92ee8a30bd" + - publisherAPFid: APF id we chose to use Example : "APFa165364a379035d14311deadc04332" + - publisherAEFsids: Array of strings filled out of AEFs ids we want to use Example: ["AEFfa38f0e855bffb420e4994ecbc8fb9","AEFe8bfa711f4f0c95ba0b382508e6382"] ServiceApiId is required in: - Provider Unpublish Api @@ -94,31 +80,33 @@ PublisherAEFsids is required in: - Provider Unpublish Api - Provider Update Api -For using the Publish Api function or the Update function you **must** modify the provider_api_description_sample.json with the Publish API that you want to share following the standard schema for [ServiceAPIDescription](https://github.com/jdegre/5GC_APIs/blob/Rel-18/TS29222_CAPIF_Publish_Service_API.yaml) -You won't need to fill out the aefIds fields from aefProfiles array because you would already be configurating this fields by completing publisherAEFsids parameter -If the publisherAEFsids parameter don't match with the aefProfiles you will recieve an error +For using the Publish Api function or the Update function the provider_api_description_sample.json **must** have been modified with the Publish API that is wanted to share following the standard schema for [ServiceAPIDescription](https://github.com/jdegre/5GC_APIs/blob/Rel-18/TS29222_CAPIF_Publish_Service_API.yaml) + +**AefIds fields won't need to fill out the from aefProfiles** array because you would already be configurating this fields by completing publisherAEFsids parameter + +**If the publisherAEFsids parameter don't match with the aefProfiles you will recieve an error** ### Important information for Provider consumer -In the provider_folder, you will find several folders with each capif_username you have onboarded as a provider, for each folder you could find: +In the `provider_folder`, it will be located several folders with each `capif_username` you have onboarded as a provider, for each folder it is created by SDK this files: -- Capif_provider_details.json : Contains all the APFs and AEFs ids you have already onboarded with this capif_username -- CAPIF_provider_api_description_sample.json : If you already published or updated an API, you will find a copy of your last payload. -- Service_received.json : If you already used the get an api or get all apis functionality, you will find the response to your request. -- Published-Apis.json : Constains the currently published APIs with their ApiId +- `Capif_provider_details.json` : Contains all the APFs and AEFs ids that have already onboarded with this capif_username +- `CAPIF_provider_api_description_sample.json` : If it's already published or updated an API, It will be available a copy of your last payload. +- `Service_received.json` : If it's alread used the get an api or get all apis functionality, It will be available the response to your request. +- `Published-Apis.json` : Constains the currently published APIs with their ApiId -#### Configuration of Discover_filter.json +#### **Configuration of Discover_filter.json** This file follows the parameters schema from the GET petition of [Discover Services API](https://github.com/jdegre/5GC_APIs/blob/Rel-18/TS29222_CAPIF_Discover_Service_API.yaml) -To use this feature you must complete the file with the parameters you want to be filtered and then run the Invoker Service Discovery Functionality. +To use this feature it has to be completed `Discover_filter.json` with the parameters you want to be filtered in order to run the Invoker Service Discovery Functionality. -To run the Invoker Service Discovery Functionality you must have onboarded as an Invoker before. +To run the Invoker Service Discovery Functionality it has to be onboarded as an Invoker before the CAPIF user. ### Important information for Invoker consumer -In the `invoker_folder`, you will find several folders with each `capif_username` you have onboarded as a provider. For each folder, you could find: +In the `invoker_folder`, it will be located several folders with each `capif_username` you have onboarded as a provider. For each folder, you could find: - `Capif_api_security_context_details.json`: This file contains the information of your invoker. It will contain: @@ -126,23 +114,22 @@ In the `invoker_folder`, you will find several folders with each `capif_username 2. If you have already used the Service Discovery Functionality, you will find all the available APIs with their information. 3. If you have already used the Service Get Token functionality, you will find your access token for using the APIs you have already discovered. -By default, the Service Get Token will get the access token for using all the APIs that are available. So if you want to filter the APIs and reach only the API you want, you must: -1. Complete your `Discover_filter.json` file. -2. Use the Service Discovery Functionality. -3. Use the Service Get Token Functionality. -#### Configuration of Register.json +#### **Configuration of Register.json** + +In order to use this SDK in a Local enviroment and creating and removing users, its mandatory to fullfill this fields. +This Feature is not included in the SDK. - "register_host": String | The domain name of your register host - "capif_register_port": Integer | The port of your register host - "capif_register_username": String | CAPIF admin username - "capif_register_password": String | CAPIF admin password - "capif_username": String | CAPIF user username - "capif_password": String | CAPIF user password - "config_path": String | Absolute path to the Config_files folder - "uuid": String | UUID for Deregistering the user +- register_host:The domain name of your register host +- capif_register_port: The port of your register host +- capif_register_username: CAPIF admin username +- capif_register_password: CAPIF admin password +- capif_username: CAPIF user username +- capif_password: CAPIF user password +- config_path: Absolute path to the Config_files folder +- uuid: UUID for Deregistering the user This file is only used for the Functionalities of :