Integrate Data as a Service
Here are the steps to integrate DaaS (address verification service) with CX Industries Framework:
Configure IDCS
Here's how you can configure:
- Create an IDCS user in IDCS integrated with DaaS.
- Add following roles to the created user:
- DATASERVICE_CLIENT_API_APPID
- DATASERVICE_USER
- The user names should be the same in both IDCS (CX Industries Framework and
DaaS).
- Click Oracle Cloud Services tab, in the
Application Roles section, users are assigned to the following
roles:
- DATASERVICE_CLIENT_API_APPID
- DATASERVICE_USER
- DATASERVICE_ADMINISTRATOR
- Click Oracle Cloud Services tab, in the
Application Roles section, users are assigned to the following
roles:
- Click Applications tab, click
Configuration. Create an application with the
following client configuration:
- In the Client Configuration section, Select Register Client option.
- Select the required options such as Resource Owner, Client Credentials, Refresh Token, and Authorization Code corresponding to Allowed Grant Types.
- Select Allow non-HTTPS URLs option and provide appropriate value for Redirect URL.
- For Client Type, select Trusted.
- In the Token Issuance Policy section, for Authorized Resources, select Specific.
- In the Resources section, select Register Resources.
- Configure application APIs in the
OAuth
protected section:- Access Token Expiration is set to a value such as 3,600 seconds.
- Refresh Token Expiration is set to a value such as 604,800 seconds.
- For Primary Audience field, enter the primary recipient where the token is processed.
-
- Click Applications tab, click
Users.
The users are listed.
- Click Applications tab, click
Users.
Create System Descriptors (TTD)
https://<host>:<port>/admin/systemDescriptors
Method: POST
Payload
{
"target-name": "Address Verification",
"external": {
"apis": [
{
"api-id": "orcl-303",
"api-version": "v3",
"api-resources": [
{
"resources": [
{
"resource-id": "address"
}
],
"url-prefix": "av"
}
]
}
]
},
"system": "AddressVerify",
"edk-enabled": false,
"domain": "AddressVerify",
"type": "external"
}
Create Connection Descriptors (TIC)
https://<host>:<port>/admin/connectionDescriptors
Method: POST
Payload
{
"system-descriptor": "<TTD id>",
"endpoint-name": "address-verify-api",
"endpoint-url": "<DAAS API>",
"fabric-facing-auth": {
"oidc-client-credentials": {
"client-id": "<Client Id>",
"client-secret": "<Client Secret>",
"identity-uri": "<IDENTITY_URI>",
"scope": "<Scope>" //Default Scope is urn:opc:idm:__myscopes__ }
},
"type": "external"
}
Apply Routing Rules
https://<host>:<port>/admin/gatekeepingRules/<gkr>
Method: PUT
Payload
{
"endpoint-name": "address-verify-api",
"rule-name": "Generated gatekeeping rule for endpoint address-verify-api",
"external-event-emitter-identification":"<Client Id>",
"destination-selection": [
{
"api-id": "orcl-303",
"api-version": "v3",
"criteria": [
{
"rank": 2,
"resource-ids": [
"address"
]
}
]
}
]
}
Test the Configuration
https://<host>:<port>/api/api/v3/address/verify
Method: POST
Headers:
x-id-dataservice-user: datauser
Payload:
{
"inputs":[
{
"Address1":"london",
"Address2":"Shanfrfrfkar V",
"City":"Srinagarffff",
"Postalcode":"ssssssss"
}
]
}