Integrate Address Verification Cloud Service with CX Industries Framework

Here are steps to integrate Address Verification Cloud Service with CX Industries Framework:

Configure IDCS

Here's how you can configure:

  1. Create an IDCS user in IDCS federated with DaaS.

  2. Add following roles to the created user:

    • DATASERVICE_CLIENT_API_APPID

    • DATASERVICE_USER

  3. The user names should be the same in both IDCS (CX Industries Framework and DaaS).

    1. 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

  4. Click Applications tab, click Configuration. Create an application with the following client configuration:

    1. In the Client Configuration section, Select Register Client option.

    2. Select the required options such as Resource Owner, Client Credentials, Refresh Token, and Authorization Code corresponding to Allowed Grant Types.

    3. Select Allow non-HTTPS URLs option and provide appropriate value for Redirect URL.

    4. For Client Type, select Trusted.

    5. In the Token Issuance Policy section, for Authorized Resources, select Specific.

    6. In the Resources section, select Register Resources.

    7. In the Configure application APIs that need to be 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.

  5. Click Applications tab, click Users.

    The users are listed.

Configure CX Industries Framework

Register the API
https://<host>:<port>/admin/apis
Method: POST
Payload
{
    "api-name": "api",
    "api-version": "v3",
    "api-id": "orcl-303",
    "api-root-resources": [
      "address"
    ],
    "api-events": [],
    "openapi-document-url": ""
}
Create System Descriptors (TTD)
https://<host>:<port>/admin/systemDescriptors
Method: POST
Payload
{
 "target-name":"Address Verification",
 "external":{
 "offered-apis":[
    {
    "api-id":"orcl-303",
    "api-name":"api",
    "api-version":"v3",
    "url-prefix":"av",
    "api-resources":[
        "address"
        ]
    }
 ]
 },
 "system":"AddressVerify",
 "domain":"AddressVerify"
}
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>",
    "gatekeeping-apis": [
        {
            "api-id": "orcl-303",                  
            "api-name": "api",
            "api-resources": [
                {
                    "gatekeeping-criteria": {
                        "criteria": "*",
                        "rank": 50
                    },
                    "resource-name": "address"
                }
            ],
            "api-version": "v3"
        }
    ]
}
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"
        }
    ]
}

For more information on CX Industries Framework, see CX Industries Framework (My Oracle Support Document ID 2720527.1).