diff --git a/README.md b/README.md index 27dc1bdc8fe55f13d31bb386232b10c1a16805ef..d38522c8bd19cec4d85cce6e436c91286d588041 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ - [Important urls:](#important-urls) - [Mongo DB Dashboard](#mongo-db-dashboard) - [FAQ Documentation](#faq-documentation) -- [CAPIF Release 1.0](#capif-release-10) +- [CAPIF Release 0](#capif-release-0) # Repository structure @@ -154,9 +154,9 @@ http://:8082/ (if accessed from another host) Frequently asked questions can be found here: [FAQ Directory] -# CAPIF Release 1.0 +# CAPIF Release 0 -The APIs included in release 1.0 are: +The APIs included in release 0 are: - JWT Authentication APIs - CAPIF Invoker Management API - CAPIF Publish API @@ -165,7 +165,8 @@ The APIs included in release 1.0 are: - CAPIF Events API - CAPIF Provider Management API -Testing Suite of all services. +Testing Suite of all services with robot. +Also Postman suite to a simple test. diff --git a/docs/images/flows/01 - Register del AEF.png b/docs/images/flows/01 - Register del AEF.png deleted file mode 100644 index f1454c8bffe50c74247e2ddbd9e3ae4a4da77579..0000000000000000000000000000000000000000 Binary files a/docs/images/flows/01 - Register del AEF.png and /dev/null differ diff --git a/docs/images/flows/01 - Register of AEF.png b/docs/images/flows/01 - Register of AEF.png new file mode 100644 index 0000000000000000000000000000000000000000..391cb43fe8657f9965c66391f716cfc06a5e9eb0 Binary files /dev/null and b/docs/images/flows/01 - Register of AEF.png differ diff --git a/docs/images/flows/01a - Register (Only) AEF.png b/docs/images/flows/01a - Register (Only) AEF.png new file mode 100644 index 0000000000000000000000000000000000000000..5b6d17b181408b74fb3e15bc8276d79bf1290c39 Binary files /dev/null and b/docs/images/flows/01a - Register (Only) AEF.png differ diff --git a/docs/images/flows/01b - Register of AEF GetAuth.png b/docs/images/flows/01b - Register of AEF GetAuth.png new file mode 100644 index 0000000000000000000000000000000000000000..8cb5cb75839e340aeedf3349c8032fcae1fc3ce4 Binary files /dev/null and b/docs/images/flows/01b - Register of AEF GetAuth.png differ diff --git a/docs/images/flows/04a - Invoker (Only) Register.png b/docs/images/flows/04a - Invoker (Only) Register.png new file mode 100644 index 0000000000000000000000000000000000000000..535d8b5baf23f43060231d20ca82c077e0959bab Binary files /dev/null and b/docs/images/flows/04a - Invoker (Only) Register.png differ diff --git a/docs/images/flows/04b - Invoker Register GetAuth.png b/docs/images/flows/04b - Invoker Register GetAuth.png new file mode 100644 index 0000000000000000000000000000000000000000..2cb2349e0378c18f874da9442852ca1eb79deb6b Binary files /dev/null and b/docs/images/flows/04b - Invoker Register GetAuth.png differ diff --git a/docs/testing_with_curl/README.md b/docs/testing_with_curl/README.md index d8c3982ab8166055ca8d3c6b0c32cab8bff1bf0b..0903b8ba0f1dbac8703517160bee96752ecc857d 100644 --- a/docs/testing_with_curl/README.md +++ b/docs/testing_with_curl/README.md @@ -59,7 +59,7 @@ To authenticate an provider user, we must perform next steps: **Flow:** -![Flow](../images/flows/01%20-%20Register%20del%20AEF.png) +![Flow](../images/flows/01%20-%20Register%20of%20AEF.png) ![Flow](../images/flows/02%20-%20AEF%20API%20Provider%20registration.png) ![Flow](../images/flows/03%20-%20AEF%20Publish.png) diff --git a/docs/testing_with_postman/README.md b/docs/testing_with_postman/README.md index 6d36b3216bd894637462c7034f21179f3dcae7d4..b6c75832265d5b61f797f4d38ac2ad3d090fd216 100644 --- a/docs/testing_with_postman/README.md +++ b/docs/testing_with_postman/README.md @@ -1,5 +1,27 @@ [**[Return To Main]**] +- [CAPIF in Postman](#capif-in-postman) + - [Requisites](#requisites) + - [First steps](#first-steps) + - [Not Local CAPIF](#not-local-capif) +- [CAPIF Flows](#capif-flows) + - [Publication of an API](#publication-of-an-api) + - [**01-register\_user\_provider**](#01-register_user_provider) + - [**02-getauth\_provider**](#02-getauth_provider) + - [**03-onboard\_provider**](#03-onboard_provider) + - [**04-publish\_api**](#04-publish_api) + - [Calling the API](#calling-the-api) + - [**05-register\_user\_invoker**](#05-register_user_invoker) + - [**06-getauth\_invoker**](#06-getauth_invoker) + - [**07-onboard\_invoker**](#07-onboard_invoker) + - [**08-discover**](#08-discover) + - [**09-security\_context**](#09-security_context) + - [**10-get\_token**](#10-get_token) + - [**11-call\_service**](#11-call_service) + - [Other requests](#other-requests) +- [Notes](#notes) + + # CAPIF in Postman In this section we can use Postman to publish an API as a provider and use it as an invoker. @@ -23,6 +45,7 @@ node script.js ``` 3. Import Postman collection and environment variables (CAPIF.postman_collection.json and CAPIF.postman_environment.json) +4. Select CAPIF Environment before start testing. ## Not Local CAPIF @@ -41,14 +64,22 @@ REGISTER_PORT 8084 CAPIF_HOSTNAME capifcore ``` -## CAPIF Flow +# CAPIF Flows Once the first steps have been taken, we can now use Postman requests. These requests are numbered in the order that must be followed to obtain everything necessary from CAPIF. -### Publication of an API +## Publication of an API + +### **01-register_user_provider** + +![Flow](../images/flows/01a%20-%20Register%20(Only)%20AEF.png) + +### **02-getauth_provider** -- **01-register_user_provider** -- **02-getauth_provider** -- **03-onboard_provider** +![Flow](../images/flows/01b%20-%20Register%20of%20AEF%20GetAuth.png) + +### **03-onboard_provider** + +![Flow](../images/flows/02%20-%20AEF%20API%20Provider%20registration.png) At this point we move on to using certificate authentication in CAPIF. In Postman it is necessary to add the certificates manually and using more than one certificate for the same host as we do in CAPIF complicates things. For this reason, we use the script to overwrite a certificate and a key when it is necessary to have a specific one. @@ -60,7 +91,9 @@ To configure go to **settings** in Postman and open the **certificates** section Once this is done, the node script will be in charge of changing the certificate that is necessary in each request. -- **04-publish_api** +### **04-publish_api** + +![Flow](../images/flows/03%20-%20AEF%20Publish.png) Once the api is published, we can start it. In this case we have a test one created in python that can be executed with the following command: @@ -72,22 +105,41 @@ The API publication interface is set to localhost with port 8088, so the service With this the provider part would be finished. -### Calling the API +## Calling the API + +### **05-register_user_invoker** + +![Flow](../images/flows/04a%20-%20Invoker%20(Only)%20Register.png) -- **05-register_user_invoker** -- **06-getauth_invoker** -- **07-onboard_invoker** +### **06-getauth_invoker** + +![Flow](../images/flows/04b%20-%20Invoker%20Register%20GetAuth.png) + +### **07-onboard_invoker** + +![Flow](../images/flows/05%20-%20Invoker%20Onboarding.png) At this point we move on to using certificate authentication in CAPIF. **If you did not configure the provider's certificates, you would have to do it now**. -- **08-discover** -- **09-security_context** -- **10-get_token** -- **11-call_service** +### **08-discover** + +![Flow](../images/flows/06%20-%20Invoker%20Discover%20AEF.png) + +### **09-security_context** + +![Flow](../images/flows/07%20-%20Invoker%20Create%20Security%20Context.png) + +### **10-get_token** + +![Flow](../images/flows/08%20-%20Invoker%20Get%20Token.png) + +### **11-call_service** + +![Flow](../images/flows/09%20-%20Invoker%20Send%20Request%20to%20AEF%20Service%20API.png) With this, we would have made the API call and finished the flow. -### Other requests +## Other requests Other requests that we have added are the following: @@ -96,7 +148,7 @@ Other requests that we have added are the following: - **remove_user_invoker** Delete the user created for the invoker. - **remove_user_provider** Delete the user created for the provider. -## Notes +# Notes - This process is designed to teach how requests are made in Postman and the flow that should be followed to publish and use an API. - It is possible that if external CAPIFs are used (Public CAPIF) the test data may already be used or the API already registered.