Hi ,
Below is the steps to migrate VB application from GEN2 to GEN3 and set OAUTH in to it.
1> In OIC Gen2, OIC had the same URLs for design time and runtime APIs. However, in Gen3, OIC has separated its design time and runtime under different URLs.
2> The runtime URL is something like https://oic-dev-environment-ia.integration.us-region-1.ocp.oraclecloud.com/ic/api/xxxxx
3>Design time URL starts with design.integration and always has a query parameter representing the instance,
such as https://design.integration.us-region-1.ocp.oraclecloud.com/ic/api/xxxxx/?integrationInstance=...
4> The first part of the URL https://design.integration.region.ocp.oraclecloud.com is your rest-server and the rest of the URL integrationInstance=NameOfServiceInstance contains the name of the service instance.
Example: https://design.integration.region.ocp.oraclecloud.com/?integrationInstance=NameOfServiceInstance
We require below 5 parameters from IAM
Grant Type
Access Token URL
Client Id
Client Secret
Grant Type
Steps to Get OAUTH Parameters from IAM Console:
Login to : https:[IDCS URL]/ui/v1/adminconsole
View the Oracle Cloud Services item in the left-hand navigation menu
For Scope , copy SCOPE value
To get client Id and Secret , see below
All Key Values in Nutshell
All Details:
Token URL : https://idcs-XXXXXX/oauth2/v1/token
Client ID: 1dxxxxxxxxxxxxxxxxxxxxxxx7c
Client Secret : afxxxxxxxxxxxxxxxxxxxxxxxxxx17
scope: https://XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:opc:resource:consumer::all
Now , Export VB application from GEN2 to GEN3 .
Login to OIC application in GEN3 .
click on Visual Builder and go to service connection and see backend
Create one backend conection, This backend will act as a package or kind of single point of contact for GEN3 credentials.
We can create new service connection and refer this Backend . Or we can leverage this new backend connection in existing service connection.
use OAUTH2.0 Client Credentials from Authentication:
Instance URL will be Design Time URL of OIC application
https://*******************cloud.com
Enter Client Id, Client Secret, Scope, Token URL as we have collected from IAM (see above point)
select connection type as "Dynamic, Service does not support CORS"
Now save it and close it.
Now go to service connection, and open existing service connection .
Change the existing service connection to new BACKEND (which created above. i.e. OICGEN3)
Now go to ENDPOINTS in SERVER itself and enter endpoint, Let suppose we are GET as method to extract all integration details from a particular Lookups then we can leverage below.
For example if you want to call particular lookup which is holding all your integrations in OIC, then call that particular lookup and put name
Make sure we need to provide 'integrationInstance' Name as "Static Parameter" in Backend itself.
To Retrieve lookup we can use oracle standard format.
Path: /ic/api/integration/v1/lookups/{name}
So our final URL will be like as below
https://XXXXXXXX.oraclecloud.com/ic/api/integration/v1/lookups/TEST_CONFIG?expand=datarow&onlyData=true&integrationInstance=XXXXX
Run and test it . It will work succesfully.
Same thing we can achieve via POSTMAN , just use CLIENT CREDENTIALS as GRANT TYPE and fill all the information and generate TOKEN. it will work further.
Same Fashion we can use in OIC also, Just enter all information in REST CONNECTION TYPE and put mapping for "integrationInstance" name. It should work.
Thanks.
Happy Learning.
For More information, please drop your comment here .