Before You Begin
This 15-minute tutorial shows you how to secure your Oracle Java Cloud Service instance and WebLogic Server domain that use Oracle Identity Cloud Service for authentication.
Background
Java applications that are deployed to a Java Cloud Service
instance can be configured to use Identity Cloud Service for
authentication. Only users that exist in Identity Cloud Service
are granted access to these applications. By default,
applications that you want to protect with Identity Cloud
Service must be configured with a context root that starts with
the text "__protected
".
What Do You Need?
- Complete the tutorial Creating an Oracle Java Cloud Service Administrator.
- Complete the tutorial Creating an Oracle Java Cloud Service Instance with Oracle Identity Cloud Service.
- Complete the tutorial Creating a WebLogic Administrator in Oracle Java Cloud Service with Oracle Identity Cloud Service.
Secure
Your Oracle Java Cloud Service Application
- Sign in to Oracle Cloud as a user with the Java Administrator role that created your JCS instance (MyJCS).
- From the Oracle Cloud Infrastructure Console, click the Navigation menu
at the top left corner of the page, expand Platform Services, and then select Java.
Note: On some older Oracle Cloud accounts, you use the Oracle Cloud Infrastructure Classic Console. Click the Navigation menu
, and then select Java.
- Click the name of your service instance. This tutorial uses
the name
MyJCS
. The details page displays. - In the Instance Overview section, copy the Sample Application URL.
- Start a different browser session, and navigate to the Sample Application link that you copied. No login is required.
- Return to the Details page in the Java Cloud Service Console.
- Click Manage this Service
at the top of the page, and then select Open WebLogic Service Console.
- Log into the WebLogic console as the Java Administrator or WebLogic Administrator.
- In the Change Center box at the top left corner of the page, click Lock & Edit.
- In the Domain Structure box, click Deployments. The Summary of Deployments page displays.
- In the Configuration tab, click Customize this table.
- In the View section, select the checkbox Exclude libraries when displaying deployments, and then click Apply.
- In the Name column of the Deployments table, click sample-app.
Description of the illustration sample_app.png - Click the Configuration tab.
- In the General subtab, enter
/__protected/sample-app
for the Context Root: option. Note that the value should contain two underscores after the first forward slash character.Description of the illustration context_root.png - Click Save. The Save Deployment Plan Assistant displays.
- Click OK. A message stating that a new
deployment plan has been successfully created displays with
the directory path of the
Plan.xml
file. - In the Change Center box at the top left corner of the page, click Activate Changes.
- Logout of the WebLogic console.
Test
the Secured Oracle Java Cloud Service Application
- Return to the Java Cloud Service Console.
- In the Instance Overview section of the MyJCS details page, copy the Sample Application URL.
- Start a different browser session (where you are not already
logged in), add
/__protected
before/sample-app
in the Sample Application link that you copied, and navigate to this updated URL. - Log into the sample-app as any Oracle Cloud user; for example, your Java Administrator or WebLogic Administrator users.
Next
Tutorial
Use Groups and Roles to Protect an Oracle Java Cloud Service Application