Connection Properties and Sample Code
In the connection
section of the adapter definition
document, you specify how your adapter connects to applications.
Properties in the connectionProperties Section
In connectionProperties
, you define the behavior of a single
connection property. Keep in mind the following points:
-
Each collection of properties in
connectionProperties
is related to a single connection property.The connection property appears as a field in Oracle Integration when an integration developer configures a connection. For instance, the
displayName
property defines the property name that appears in the user interface, theshortDescription
property provides brief hint text, and so on.The collection of properties model the behavior of the connection property.
-
You can specify whether a connection property in Oracle Integration appears in an invoke connection, a trigger connection, or both.
-
Many properties below define metadata. However, pay particular attention to the functional properties:
required
,hidden
, andscope
.
connectionProperties
includes the following properties.
Property | Description |
---|---|
|
Unique name for the connection property. The value must contain no spaces. The value does not appear in the Oracle Integration user interface. However, you use this value to reference the property from within the adapter definition document. |
|
Name of the connection property. This value appears as the name of the property in the Oracle Integration user interface when an integration developer creates a connection using the adapter. See Update the Name or Description of a Connection Property. |
|
Short hint text for the connection property. This text appears in the Oracle Integration user interface. |
|
Description of the property. This description appears on the Oracle Integration user interface when you select a property to update or modify. |
|
Data type of the property. The following data types are supported:
|
|
Either Sometimes, an adapter requires a value for a property, and the value is always
the same. In such cases, consider setting |
|
Either If you specify |
|
Either
|
|
Default value for the property. This value appears in the property field in the Oracle Integration user interface. |
|
Type of connection that the connection property applies to:
For example, you might configure ten connection properties, five for trigger connections and five for invoke connections. |
|
Provide a predefined list of values in a drop-down list. An integration developer can select from the values when creating a connection in Oracle Integration. Below the options property, add one or more sets of the following properties:
|
Properties in the securityPolicies Section
In securityPolicies
, define one or more security policies for
a connection definition. Security policies define how a connection accesses protected
endpoints and Oracle Integration.
When you convert a Postman collection or an OpenAPI document into an adapter definition document, the Rapid Adapter Builder collects security policy information about the APIs and enters it into the securityPolicies
section. If needed, you can update some security policy details.
The Rapid Adapter Builder supports a number of managed security policies, including several extensible policies. You can't add and modify properties of managed security policies. However, you can make a number of updates, including hiding security policy properties and providing a default value instead, and changing the display name and description of a managed security policy. See Understand Security Policies in Connection Definitions.
You can define one or more security policies in each connection definition. Each security
policy can contain one or more security properties. For each entry in the
securityProperties
section, you must define the following set of
properties. These properties describe the behavior of the field that the integration
developer interacts with while configuring a connection.
securityPolicies
includes the following properties.
Property | Description |
---|---|
|
Usage of the security policy:
|
|
Description of the security policy. |
|
Name of the security policy. This value appears as the name of the security policy in the Oracle Integration user interface when an integration developer creates a connection using the adapter. |
|
Role for the security policy:
Note: You specify a scope for both a connection property and a security policy. For example, you might define four connection properties for invoke connections and six connection properties for trigger connections. Similarly, you might define two security policies for invoke connections and one security policy for trigger connections. |
|
Name of the security policy that is used to access protected endpoints. You adapter can expose one or more of the following policies:
|
|
|
|
|
|
Properties for each security policy. Most security policies require several sets of these properties. Each property that you define appears on the page for configuring connection security. Integration developers must specify the appropriate values for each property.
To see the predefined values for each of these properties security policy, see the appropriate link:
|
|
The default implementation of these policies is RFC 6749
compatible. However, in practice, many implementations different from the RFC
guidelines. Using the You can extend the following OAuth policies if needed: |
Sample Code: Define a Connection Definition
The following code sample defines a connection definition for the Square application using the OAuth Authorization Code Credentials authentication mechanism.
This sample includes one connectionProperties
section, one
securityPolicies
section, and several securityProperties
sections.
"connection": {
"connectionProperties": [
{
"name": "baseURL",
"type": "URL",
"displayName": "Base URL",
"description": "Base URL of the endpoints",
"shortDescription": "Base URL of the endpoints",
"default": "https://connect.squareupsandbox.com/v2",
"required": true,
"hidden": true,
"scope": [
"ACTION"
]
}
],
"securityPolicies": [
{
"type": "managed",
"policy": "OAUTH_AUTHORIZATION_CODE_CREDENTIALS",
"description": "Authorization Policy",
"displayName": "Authorization Policy",
"scope": "ACTION",
"securityProperties": [
{
"name": "oauth.client.id",
"displayName": "Square Application ID",
"description": "Square Application ID",
"shortDescription": "Square Application ID",
"hidden": false,
"required": true
},
{
"name": "oauth.client.secret",
"displayName": "Square Application Secret",
"description": "Square Application Secret",
"shortDescription": "Square Application Secret",
"hidden": false,
"required": true
},
{
"name": "oauth.auth.code.uri",
"default": "https://connect.squareupsandbox.com/oauth2/authorize",
"hidden": true,
"required": true
},
{
"name": "oauth.access.token.uri",
"default": "https://connect.squareupsandbox.com/oauth2/token",
"hidden": true,
"required": true
},
{
"name": "oauth.scope",
"default": "CUSTOMERS_WRITE ORDERS_WRITE INVOICES_WRITE CUSTOMERS_READ",
"hidden": true,
"required": true
},
{
"name": "clientAuthentication",
"default": "client_credentials_in_body",
"hidden": true,
"required": true
}
],
"authExtension": "flow:authExtension"
}
],
"test": "flow:testConnectionFlow"
}
Sample Code: Define a Connection Property
The following sample code shows how to define two connection properties. The first part of the sample demonstrates the definition of an editable property, and the second part demonstrates the definition of a hidden property.
"connectionProperties": [
{
"name": "accountid",
"type": "string",
"displayName": "Account ID",
"shortDescription": "Enter the account id.",
"required": false,
"hidden": false,
"scope": [
"ACTION"
]
},
{
"name": "baseURL",
"type": "URL",
"displayName": "Base URL",
"shortDescription": "Ensure that this value corresponds to the type selected.",
"required": false,
"hidden": true,
"default": "https://connect.abcxyz.com/v2",
"scope": "ACTION"
}
]
Sample Code: Define Security Policies within a Connection Definition
The following sample code shows how to define security policies. In this case, the connection supports two managed security policies, each of which has a combination of displayable and hidden security properties.
"connection": {
"connectionProperties": [
],
"securityPolicies": [
{
"type": "managed",
"policy": "OAUTH_AUTHORIZATION_CODE_CREDENTIALS",
"description": "ABC Company Authorization Code Policy",
"displayName": "ABC Company Authorization Code Policy",
"scope": "ACTION",
"securityProperties": [
{
"name": "oauth.client.id",
"displayName": "ABC Company Client ID",
"description": "ABC Company Client ID",
"shortDescription": "ABC Company Client ID",
"hidden": false,
"required": true
},
{
"name": "oauth.client.secret",
"displayName": "ABC Company Client Secret",
"description": "ABC Company Client secret",
"shortDescription": "ABC Company Client secret",
"hidden": false,
"required": true
},
{
"name": "oauth.auth.code.uri",
"default": "https://login.ABC Companyonline.com/common/oauth2/v2.0/authorize",
"hidden": true,
"required": true
},
{
"name": "oauth.access.token.uri",
"default": "https://login.ABC Companyonline.com/common/oauth2/v2.0/token",
"hidden": true,
"required": true
},
{
"name": "oauth.scope",
"default": "Tasks.ReadWrite offline_access",
"hidden": true,
"required": true
},
{
"name": "clientAuthentication",
"default": "client_credentials_as_header",
"hidden": true,
"required": true
}
]
},
{
"type": "managed",
"policy": "OAUTH_RESOURCE_OWNER_PASSWORD_CREDENTIALS",
"description": "ABC Company Resource Owner Password Credentials Policy",
"displayName": "ABC Company Resource Owner Password Credentials Policy",
"scope": "ACTION",
"securityProperties": [
{
"name": "oauth.access.token.uri",
"default": "https://login.ABC Companyonline.com/4a4a30f3-247a-47b6-acef-55ba707ea6df/oauth2/v2.0/token",
"hidden": false,
"required": true
},
{
"name": "oauth.client.id",
"displayName": "ABC Company Client ID",
"description": "ABC Company Client ID",
"shortDescription": "ABC Company Client ID",
"hidden": false,
"required": true
},
{
"name": "oauth.client.secret",
"displayName": "ABC Company Client Secret",
"description": "ABC Company Client secret",
"shortDescription": "ABC Company Client secret",
"hidden": false,
"required": true
},
{
"name": "username",
"displayName": "User Name",
"description": "User Name",
"shortDescription": "User Name",
"hidden": false,
"required": true
},
{
"name": "password",
"displayName": "Password",
"description": "Password",
"shortDescription": "Password",
"hidden": false,
"required": true
},
{
"name": "oauth.scope",
"default": "Tasks.ReadWrite offline_access",
"hidden": true,
"required": true
},
{
"name": "oauth.request.content.type",
"default": "application/x-www-form-urlencoded",
"hidden": true,
"required": true
},
{
"name": "clientAuthentication",
"default": "client_credentials_as_header",
"hidden": true,
"required": true
}
]
}
],
"test": "flow:testConnectionFlow"
},