Retire Caller Passwords: Invoke OIC 3 with OAuth 2.0 Client Credentials

A backend application needs to start an Oracle Integration 3 flow. Copying a Fusion service account's username and password into that application's configuration may look familiar, but it mixes two separate security boundaries: access to OIC and access to Fusion.
Client credentials gives the calling application its own identity. It authenticates to an authorization server, receives a short-lived access token, and presents that token to OIC. It does not sign in as a Fusion user, and it does not automatically acquire permissions to create invoices, suppliers, or other Fusion records.
This walkthrough secures an inbound REST-triggered integration using OCI IAM identity domains. It covers the caller registration, the existing OIC resource application, the scope and service role, and the two HTTP requests involved. It also explains where an OIC invoke connection fits—and where it does not.
First, correct the migration premise
OAuth is a sensible replacement for reusable caller user passwords, but “OIC 3 has removed Basic Authentication” is not an accurate blanket statement. Oracle's Basic Authentication support guidance distinguishes integration endpoints from Developer APIs and OCI administrative APIs. Trigger endpoints can support Basic Authentication, OAuth, or both, according to their configuration. Developer APIs use OAuth; OCI administrative APIs have a different authentication model.
Likewise, an announcement about password authentication for a particular downstream application is not evidence that every OIC trigger has stopped accepting Basic Authentication. Check the exact interface and its current support policy.
The objective here is narrower: deliberately configure this REST trigger to accept bearer tokens, then migrate its callers without using a shared human or service-user password.
1. Understand the two security boundaries
External backend OCI IAM identity domain
|-- client ID + client secret ------> token endpoint
|<----------- access token ----------|
|
|-- Authorization: Bearer TOKEN ----> OIC REST trigger
|
|-- separate invoke credentials --> Fusion API
For Fusion developers, the important structural difference is that OIC is not an extension of Fusion's security context. An integration can orchestrate several applications, each with its own authorization boundary.
| Boundary or object | What it represents | Configuration for this walkthrough |
|---|---|---|
| Confidential client application | The external backend calling OIC | Client credentials grant; confidential client; activated |
| OIC instance application | The protected OIC resource in IAM | Existing Oracle Cloud Services application for the target instance |
| Allowed resource scopes | What the client may request tokens for | Copy the target instance's registered OIC scopes |
| Application-role assignment | What the client may do in that instance | Assign the client application to ServiceInvoker |
| REST trigger connection | Incoming authentication accepted by the integration | OAuth2.0 security policy |
| REST invoke connection | OIC authenticating to a downstream REST service | Separate policy and downstream credentials, if the flow needs an invoke |
| Fusion authorization | Permission to access Fusion business data | Governed independently by the downstream identity and Fusion security |
A token successfully issued by IAM is not, on its own, proof that the caller is authorized to invoke OIC. Both the correct resource scope and the appropriate service-role assignment matter.
IDCS versus OCI IAM identity domains
Older articles call the authorization service Oracle Identity Cloud Service, or IDCS. Current OIC documentation uses OCI IAM identity domains and the OCI Console's Domains navigation. You may still encounter idcs-... in a domain hostname or older instructions. Do not replace a working hostname just to match a new product label.
Use the identity domain associated with the target OIC instance. Do not assume that the Fusion environment and OIC instance share a domain. This article uses the same-domain setup documented by Oracle; cross-domain trust is a separate design, not a reason to swap domain URLs until a request works.
2. Locate the OIC resource before registering the caller
Have the tenant/domain administrators perform the IAM setup with the privileges required by Oracle's REST trigger OAuth guidance. Application developers should not acquire administrator roles merely to run the integration.
- In OCI Console, open Identity & Security → Domains, choose the compartment, and select the domain associated with OIC.
- Record the Domain URL. The token endpoint is this domain URL followed by
/oauth2/v1/token. - Open Oracle Cloud Services and identify the application corresponding to the intended OIC instance. Verify the instance, not just a similar display name.
- Inspect its OAuth-protected application APIs, primary audience, and exposed scopes. Record the actual values.
For the standard provisioned OIC instance, you consume the existing resource registration; you do not create a second arbitrary resource server called “OIC.” The new confidential application represents the caller. The existing instance application represents the resource it will call.
Copy the scope; do not derive it from the browser URL
Oracle documents a full scope of this general form for integration endpoints:
https://<OIC-resource-audience>:443urn:opc:resource:consumer::all
The apparent missing slash before urn is intentional in this documented pattern. Do not insert one, remove the port, substitute the runtime hostname, or paste an integration URL into the scope field. Copy the full registered scope from your instance application.
Oracle also documents a scope ending in /ic/api/ for Developer APIs only. That is not a substitute for the integration-endpoint scope. The consumer scope covers both integration endpoints and Developer APIs at the scope level; service roles still constrain authorization. It is not a single-integration allowlist.
Follow Oracle's scope-to-primary-audience checks: the resource must be the intended instance and the scope must match that instance's primary audience. The audience identifies the protected resource, not the human-readable application name. This client-credentials request uses scope; it does not add an invented audience parameter or construct a JWT user assertion.
3. Create and activate the confidential client
In the same domain, follow Oracle's client-credentials prerequisites. Console labels may move as OCI evolves; keep the distinction between client configuration, resource access, and role assignment intact.
- Open Integrated applications → Add application → Confidential Application and launch the workflow.
- Give it an operationally meaningful name, such as
supplier-backend-to-oic-test. Record an owner and environment in your team's inventory. - Open OAuth configuration and choose Configure this application as a client now.
- Enable Client credentials under Allowed grant types. Keep Client type set to Confidential. This flow needs no browser redirect, logout URL, user password, or interactive consent round trip.
- Under Token issuance policy, select Confidential for Authorized resources, enable Add Resources, and choose Add scope.
- Find the existing target OIC application. Oracle's standard prerequisite procedure adds both scopes ending in
urn:opc:resource:consumer::allandic/api/. Follow that documented setup; the token request below requests only the consumer scope needed to trigger the integration. Do not request both merely because both are registered. - Save the configuration and activate the client application. Store its generated client ID and client secret through your approved secret-management process.
The “Add app roles” checkbox in this client-configuration workflow is not the service-role assignment step; Oracle says it is not required here. Complete the next section separately.
Client credentials is appropriate for a trusted backend that can protect a secret. Do not embed the secret in a browser SPA, mobile binary, downloadable spreadsheet, or publicly distributed script. It represents an application, not an end user. If the business operation must preserve a user's identity, evaluate a user-context flow rather than silently replacing it with an application identity.
4. Assign ServiceInvoker to the application—not just a user
Return to Oracle Cloud Services → the target OIC instance application → Application roles.
Expand ServiceInvoker and use its Assigned applications actions to assign the confidential client application you just created. Verify the saved application assignment. Assigning ServiceInvoker to the administrator who configured the client, or only to a Fusion service user, does not grant that role to the client-credentials application.
Oracle's role troubleshooting guidance specifies ServiceInvoker for inbound integration calls. Do not solve an invoke failure by granting ServiceAdministrator or ServiceDeveloper. Those roles serve different purposes and expand access.
ServiceInvoker is the invocation-focused role, not a Fusion business role and not a promise of authorization to only one REST path. If different consumers must be isolated to specific operations, assess additional endpoint authorization controls, such as an API gateway and an explicit authorization design. Do not describe the standard consumer scope as per-flow isolation.
5. Configure the REST trigger to accept OAuth
In OIC, create or edit a REST Adapter connection with the Trigger role. Under connection security, select OAuth2.0 for an OAuth-only inbound endpoint. Oracle's REST Adapter connection documentation lists this policy as bearer authentication and shows no client-ID or client-secret fields for the trigger.
That absence is expected: the trigger validates incoming tokens; it is not acquiring tokens as a client.
Use the connection as the integration's trigger, configure the request and response contract, and activate the integration through your normal deployment process. Copy the actual activated runtime endpoint from OIC. Match its HTTP method, version, path, and payload contract.
For an existing caller migration, inventory callers first. A temporary OAuth 2.0 or Basic Authentication policy can support a staged transition if your security policy allows it, but it still permits Basic Authentication. Merely sending a bearer token does not retire the old authentication path. After testing and migrating every caller, deliberately change to OAuth-only and retest.
6. Request a token, then call the integration
The commands below are templates, not executed tenant tests. All hostnames and values are placeholders. Use a nonproduction integration with an agreed contract. These examples require curl; token parsing uses jq.
Set IAM_DOMAIN_URL to the actual HTTPS Domain URL, OIC_SCOPE to the exact registered consumer scope, and OIC_INTEGRATION_URL to the activated runtime endpoint. Have your secret manager inject OIC_CLIENT_ID and OIC_CLIENT_SECRET; do not paste real values into this article or shell history.
# Nonsecret examples only; replace with your tenant's recorded values.
IAM_DOMAIN_URL='https://<identity-domain-host>'
OIC_SCOPE='https://<OIC-resource-audience>:443urn:opc:resource:consumer::all'
OIC_INTEGRATION_URL='https://<oic-runtime-host>/<actual-activated-endpoint-path>'
# OIC_CLIENT_ID and OIC_CLIENT_SECRET must already be supplied securely.
: "${OIC_CLIENT_ID:?Missing client ID}"
: "${OIC_CLIENT_SECRET:?Missing client secret}"
TOKEN_RESPONSE=$(curl --silent --show-error --fail-with-body \
--request POST "${IAM_DOMAIN_URL%/}/oauth2/v1/token" \
--user "${OIC_CLIENT_ID}:${OIC_CLIENT_SECRET}" \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'grant_type=client_credentials' \
--data-urlencode "scope=${OIC_SCOPE}") || exit 1
ACCESS_TOKEN=$(printf '%s' "$TOKEN_RESPONSE" | \
jq -er '.access_token | select(type == "string" and length > 0)') || exit 1
The token request body is form-encoded, not JSON. --data-urlencode preserves the scope's punctuation without hand-encoding it. --user authenticates the OAuth client to IAM using HTTP Basic client authentication. This does not send a user's Basic credentials to OIC; it authenticates a different principal at a different endpoint.
An illustrative response—not a live token or guaranteed lifetime—is:
{
"access_token": "<opaque-access-token-placeholder>",
"token_type": "Bearer",
"expires_in": 3600
}
Use expires_in from the real response, rather than hardcoding 3600 seconds. Client credentials normally obtains a fresh access token with the same grant when needed; do not add offline_access, expect a refresh token, or copy an authorization-code refresh procedure into this flow.
For an illustrative POST contract accepting a string reference, call:
curl --silent --show-error --fail-with-body \
--request POST "$OIC_INTEGRATION_URL" \
--header "$(printf 'Authorization: %s %s' Bearer "$ACCESS_TOKEN")" \
--header 'Content-Type: application/json' \
--data '{"reference":"EXAMPLE-001"}'
unset ACCESS_TOKEN TOKEN_RESPONSE OIC_CLIENT_SECRET
Use your real integration's payload instead of inventing a reference property in its contract. The authentication header has this exact structure:
The Authorization field value is the word Bearer, one space, then the unencoded access token.
Do not base64-encode the access token, surround it with literal quotes in the header, or use the client secret as the bearer value. The example deliberately avoids automatic redirects; investigate unexpected redirects and use the correct HTTPS runtime endpoint rather than forwarding credentials to an unverified destination.
Shell variables are a teaching convenience, not a complete production secret-handling solution. Expanded curl arguments may be visible to local process inspection. Run only in a controlled environment; production clients should use a vetted OAuth library and protected secret injection that avoids command-line exposure. Disable shell tracing, avoid verbose HTTP dumps, and never print TOKEN_RESPONSE into a build log.
7. If OIC itself is the caller, use invoke security
The inbound trigger does not use the REST Adapter's OAuth Client Credentials invoke policy. That policy is relevant when an OIC integration calls another protected REST API, including another OIC instance.
For example, when OIC A calls an integration on OIC B, register a client for B and assign it ServiceInvoker on B. Configure A's REST invoke connection as follows, using Oracle's documented invoke fields:
| Invoke setting | Value for OIC A calling OIC B |
|---|---|
| Connection role | Invoke |
| Security policy | OAuth Client Credentials |
| Access Token URI | B's identity-domain URL plus /oauth2/v1/token |
| Client Id | The confidential client registered for calling B |
| Client Secret / Confirm Client Secret | That client's securely stored secret |
| Scope | B's exact registered consumer scope |
| Client Authentication | Send client credentials as basic auth header, matching this walkthrough |
| Auth Request Media Type | Optional; leave blank unless the target provider requires a value |
OIC A acquires a token for its outbound call. That is a separate exchange, not automatic forwarding of the token received by A's trigger. If the downstream resource is Fusion instead, use the relevant Fusion adapter's supported OAuth policy and prerequisites; do not assume this OIC client-credentials recipe grants access to Fusion. A successful inbound call proves nothing about downstream business authorization.
8. Manage expiry, rotation, and least privilege
Cache tokens securely per client, identity domain, and scope. Reuse them until shortly before expiry with a small clock-skew margin; avoid requesting a new token for every message. Synchronize clocks and coordinate refreshes under concurrency to prevent a burst of simultaneous token requests.
On an authentication failure, invalidate the cached token and allow only a bounded reacquisition attempt where appropriate. Do not turn every 401 or 403 into an unlimited token loop. Do not blindly replay a business POST after an uncertain result: token handling does not make invoice creation idempotent.
Keep secrets in a managed vault, restrict retrieval to the caller runtime, and separate production and test identities. Where operationally appropriate, separate clients by calling application so compromise and rotation do not affect unrelated consumers. Record owners, authorized resources, role assignments, and rotation dates.
Rotate secrets through a controlled deployment and verify token acquisition afterward. Do not assume that changing a secret instantly revokes every token already issued; assess token lifetime and the tenant's revocation controls. Treat access tokens as secrets too. Redact Authorization headers, client credentials, and token bodies from traces, support bundles, and screenshots.
9. Troubleshoot the failing hop, not just the status code
A 401 or 403 is a starting point, not a definitive diagnosis. IAM, OIC, a gateway, and Fusion can each reject a request for different reasons.
| Failure location | Likely checks | Safe next action |
|---|---|---|
IAM token endpoint: invalid_client, often 401 |
Wrong client ID/secret, wrong domain, incorrect client-authentication method, inactive client | Verify the app and domain; check secret rotation without printing credentials |
IAM token endpoint: invalid_scope or grant error, often 400 |
Scope not registered/allowed; punctuation changed; Client credentials not enabled | Compare full scope and allowed grants with the saved client configuration |
| OIC trigger: 401 | Missing/malformed bearer header, expired token, wrong issuer/resource, wrong trigger security policy | Reacquire once if expired; verify domain, audience/scope, and header without logging the token |
| OIC trigger: 401 or 403 | Missing ServiceInvoker application assignment, wrong instance, insufficient authorization | Check Assigned applications on the target instance's ServiceInvoker role; do not grant administrator as a shortcut |
| Gateway/access layer: 403 | Network restrictions or gateway authorization policy | Identify the responding layer and inspect its policy separately |
| OIC execution starts, downstream invoke fails | Fusion or other downstream credentials, roles, data access, or application rules | Inspect the outbound connection and downstream response, not the inbound client registration |
Also confirm that the integration is active and the method, version, resource path, and content type match its contract. A 404, 405, or payload-validation error is not necessarily an OAuth failure. Correlate a sanitized client request timestamp and response request ID with OIC monitoring. No integration instance appearing suggests an earlier rejection, but is not proof of its cause.
A nonproduction acceptance checklist
Before retiring the old caller password, verify that:
- The intended backend can acquire a token from the correct domain and invoke the active integration with the correct payload.
- The client has ServiceInvoker on the intended instance, not a broad administrative role.
- Missing, malformed, and expired tokens are rejected; OAuth-only configuration rejects Basic Authentication.
- A client without the required assignment cannot invoke successfully, allowing for configured token lifetime and propagation behavior during testing.
- Downstream Fusion access still uses its separately approved identity and permissions.
- Logs contain no tokens or secrets, secret rotation works, and expiry handling does not cause duplicate business operations.
Record actual outcomes from your tenant rather than treating these examples as test results. The deliverable is not merely a token: it is a controlled application identity, a correctly targeted resource, an explicit invocation permission, and a caller that can handle the credential lifecycle safely.
Official Oracle references
- When is Basic Authentication Supported in Oracle Integration 3? — interface-specific support, rather than a blanket deprecation claim.
- Protect an Integration's REST Endpoint with OAuth — inbound configuration and ServiceInvoker.
- Authenticate Requests for Invoking Oracle Integration Flows — grant behavior, confidential-client prerequisites, activation, application assignment, and token/invocation examples.
- Check Scopes Match Primary Audience — verifying the resource and audience.
- Unauthorized Errors: Check Roles Assigned to Your Confidential Application — invocation versus Developer API roles.
- Create a REST Adapter Connection — distinct trigger and invoke security policies and fields.
- Invoke an Application's REST Endpoint with OAuth — outbound authentication and target-specific permissions.
- FAQs for the Confidential Client Application — grants, scopes, domains, and client configuration.
Comments
Join the discussionNo comments yet. Be the first to comment.

