Oracle by Example brandingSecure an Application with Oracle Identity Cloud Service

section 0Before You Begin

This 10-minute tutorial shows you how to use Oracle Identity Cloud Service to secure an application in Oracle Application Container Cloud Service.

Background

Oracle Application Container Cloud Service can use Oracle Identity Cloud Service to authenticate administrators and application users. During deployment, you can create a corresponding security application in Oracle Identity Cloud Service to control who can access your application in Oracle Application Container Cloud Service.

When you deploy a Java SE, Node.js, or PHP application in Oracle Application Container Cloud Service, you can secure your application by using Oracle Identity Cloud Service with one of these types of authentication:

  • Basic: Prompts for a user name and a password in Oracle Identity Cloud Service
  • OAuth: Creates a corresponding application in Oracle Identity Cloud Service to control who can access your application, and redirects to Oracle Identity Cloud Service for authentication

This tutorial shows you how to use both types of authentication.

What Do You Need?

  • Access to an instance of Oracle Application Container Cloud Service
  • Universal Cloud Credits
  • Subscriptions for Oracle Identity Cloud Service and Oracle Cloud Infrastructure Load Balancing Classic
  • Downloaded sample application

section 1Deploy an Application by Using Basic Authentication

  1. Open the Oracle Application Container Cloud Service console.
  2. In the Applications list view, click Create Application and select Java SE.
  3. In the Application section, enter a name for your application and click Browse.
  4. In the File Upload dialog box, select simple-service-1.0-SNAPSHOT-dist.zip and click Open.
  5. Keep the default values in the Instances and Memory fields. In the Authentication Type field, click Basic and then click Create.
  6. Click Refresh Refresh icon. The URL is enabled when the application is created.
  7. Click the URL.
  8. In the Authentication required window, enter your credentials and click Log in.
    Authentication required window
    Description of the illustration basic-secure-app.png

    Now you can see that you only can access to your application if you provide the right credentials.


section 2Deploy an Application by Using OAuth Authentication

In this section, you deploy the same application as in the previous section but using OAuth authentication.

  1. Go back to the Oracle Application Container Cloud Service console and create an application.
  2. In the Applications list view, click Create Application and select Java SE.
  3. In the Application section, enter a name for your application and click Browse.
  4. In the File Upload dialog box, select simple-service-1.0-SNAPSHOT-dist.zip and click Open.
  5. Keep the default values in the Instances and Memory fields. In the Authentication Type field, click OAuth and then click Create.
  6. Click Refresh Refresh icon. The URL is enabled when the application is created.
  7. Click the URL.
  8. In the Oath authentication window, enter your credentials and click Log in. If you don't see the authentication form, clear your browser's cache.
    OAuth form
    Description of the illustration oauth-secure-app.png

more informationWant to Learn More?