Before You Begin: Key Prerequisites for Configuration
Oracle Access Governance REST API leverages OAuth 2.0 protocol as its authorization framework. Authentication and Authorization in Oracle Access Governance APIs is managed by OCI IAM Authorization REST APIs. Before generating an access token, you need to configure an OAuth Application in your OCI IAM for generating an Authorization token and assign an application role.
Step 1: Configure a Network Perimeter
Network perimeters enhance security by defining IP address boundaries and blocking suspicious IP addresses to prevent unauthorized access. This is an optional configuration but highly recommended to restrict login attempts to specific IPs or ranges, and ensure trusted access for users.
- Open your web browser and navigate to https://cloud.oracle.com.
- Enter the name of your Cloud Account Administrator in the Cloud Account Name field and click Next.
- On the Cloud Infrastructure sign-in page, enter your sign-in credentials under Oracle Cloud Infrastructure Direct Sign-In. Click Sign In.
- Complete the multi-factor authentication (MFA) verification for your cloud account.
- Navigate to Identity & Security, and click Domains.
- Choose a compartment where your Oracle Access Governance service instance is located, and then select the domain.
- On the Identity domain page, select Security→ Network Perimeters.
- Select Create network perimeter.
- Enter meaningful name. For example,
Allowed IP List for AG REST API
. - In the IP addresses field, specify the range using CIDR notation or
comma-separated list. For
example
192.168.1.1-192.168.1.50, 10.0.0.1-10.0.0.100, 172.16.5.10-172.16.5.20
- Click Create.
Figure - Configuring Network Perimeter
Step 2: Add Confidential Type Application for Authorization in OCI Identity Domain
To create a new confidential application in your Identity Domain:
- Navigate to Identity & Security, and click Domains.
- Choose a compartment where your Oracle Access Governance service instance is located, and then select the domain.
- In the Identity domain page, and click Integrated applications.
- Click Add application.
- Select Confidential Application option and then click on Launch workflow.
- In the Add Confidential Application wizard’s details page, enter the
following:
- In the Add application details page, enter name and description
for the confidential
application.
For example:
access-governance-rest-api-oauth
- Click Next and go to Configure OAuth.
- In the Add application details page, enter name and description
for the confidential
application.
- In the Client configuration panel, select Configure
this application as a client now. The details panel expands.
- In the Authorization section, select the Client
credentials and Resource owner
check box.
Note:
Most APIs use Client Credentials flow, where you provideclient_id
andclient_secret
to generate an access token. However, a few APIs - particularly those that require specific application roles (such as creating an access bundle, updating an access bundle) need password credentials (username
andpassword
) for generating an access token. For this, you need to select Resource owner. - In the Client type, select Confidential.
- In the Client IP address field, select Restrict by network perimeter, and then select the network perimeter created in Step 1.
- In the Token issuance policy section, select Specific and select the Add resources check box.
- In the Authorization section, select the Client
credentials and Resource owner
check box.
- In the Resources section, click Add scope. A list of available application, including Oracle Access Governance service instances and the scope are displayed.
- Select application and scope, and then click Add.
Figure - Configuring OAuth Application by setting Resource Application and Scope
- Click Next and then click Finish.
Step 3: Activate the Application
Click the Actions icon and then select Activate. The status should change from Inactive to Active.
Step 4: Assign Application Role to the OAuth Confidential Application
- In your cloud account, go to Identity & Security → Domains.
- Choose a compartment where your Oracle Access Governance service instance is located, and then select the domain.
- From the left pane, select the Oracle Cloud Services tab.
- Select the Oracle Access Governance cloud service.
- On the left pane, in the Resources section, select Application roles.
- Expand the relevant application role. For Assigned applications, select Manage.
- Select the +Show available applications. Select the application created in Step 2.
- Click Assign.
Result: The application role and scope are displayed under the Resources section of the OAuth application created in Step 2.
Figure - Verify Application Role Assignment in the OAuth Application
Note:
Refer to Authenticate and Authorize to generate OAuth access token using the client ID and client secret of this application.