Note:

Secure Oracle Digital Assistant Chatbot with Oracle Identity Cloud Service

Introduction

Chatbots or digital assistants provide a very easy and convenient way to access all types of data – be it our own enterprise data, or service provider’s data, or vendor’s data, or even customer’s data.

But not all data is publicly accessible. The chatbots should allow users to access only the data that they are authorized to, and thereby enable secured access to data based on roles. Also for some chatbot functionalities, you may need the user ID of the authenticated user. That would require the user to first login, while using the chatbot.

Oracle Digital Assistant (ODA) enables you to develop secure chatbots, where you can secure the capabilities using different Identity Providers. Oracle Digital Assistant enables security with these identity providers:

Architecture

Architecture Diagram

Objectives

Prerequisites

Task 1: Configure Oracle Identity Cloud Service

  1. Register an application with Oracle Identity Cloud Service. For more information, see Register an Application with IDCS or OAM.

  2. To create an Authorization Code Service using the ODA Console, go to Settings and Authentication Services. For more information, see Add an Authorization Code Service.

    Authorization Service Diagram

Task 2: Configure the Oracle Digital Assistant (ODA) Skill

  1. Create a new ODA skill using the ODA Console. For more information, refer to the ODA LiveLabs Conversational AI in Minutes (No Developer Experience Required).

    It covers creation of ODA skills, including defining the intents, utterances, entities and designing the visual dialog flow and validation, debugging and testing the skill.

    New ODA Skill Diagram

  2. In the ODA Visual Dialog Flow (where you want to enable authentication), double-click Events and click Authorize User and Add State.

    Enable Authentication Diagram

  3. Select Security and OAuth 2.0 Account Link component, while adding new state.

    OAuth Create Diagram

  4. Configure the OAuth 2.0 Account Link component. Select the Authorization Code Service created in Task 1 from the drop-down menu, and save the authenticate user and access token in appropriate variables.

    OAuth Configure Diagram

  5. In the ODA Visual Dialog Flow, for the state where you what to enable authorization, set Requires Authorization to True in the General tab.

    Require Authorization Diagram

  6. Print the User ID and the User Token of the authenticated user, in the Component tab.

    This User ID and the User Token can be passed to other ODA components, and used to invoke authenticated APIs.

    Authenticated User Code Diagram

Task 3: Test the Secured Oracle Digital Assistant Chatbot

  1. Create the appropriate channel for the ODA skill, to expose it to your users. This channel details can be used to embed the ODA chatbot in the respective channel.

    ODA Channnel Diagram

  2. Open the ODA chatbot in the channel, it will ask you to log in.

    Invoke ODA Skill Diagram

  3. Click Please Login, it will open up the log in screen in a new window. You can use your credentials to log in.

    ODA Chatbot Login Diagram

  4. Once you are successfully logged in, the User ID and User Token can be displayed. This User ID and the User Token can be passed to other ODA components, and used to invoke authenticated APIs.

    Display Authenticated User Diagram

Acknowledgments

More Learning Resources

Explore other labs on docs.oracle.com/learn or access more free learning content on the Oracle Learning YouTube channel. Additionally, visit education.oracle.com/learning-explorer to become an Oracle Learning Explorer.

For product documentation, visit Oracle Help Center.