5 Configure Oracle Deep Data Security for a Sample Application

In this quick-start chapter, you'll learn how to configure Oracle Deep Data Security (Deep Sec) in an Oracle AI Database environment for a sample Spring Boot application.

This chapter demonstrates how to propagate end-user identities through a Spring Boot application to the database, enabling Deep Sec to enforce row-level and column-level access controls. It also demonstrates how to implement dynamic privilege elevation to securely perform restricted operations without permanently granting excessive permissions.

Note:

  • For a sample script that performs the database-side configuration for this scenario, see Scripts for the Employee Records Application. You must complete the Microsoft Entra ID, TLS, and Spring Boot application setup manually.
  • This quick start uses Microsoft Entra ID as the identity provider. You can also use Oracle Cloud Infrastructure Identity and Access Management (OCI IAM). For the corresponding configuration steps, see Configure OCI IAM for Application-Mediated Access.

Overview of tasks

The table below outlines the tasks you'll complete in this chapter.

Task Topic

Learn about the sample application, the end-to-end security flow, and the Deep Sec capabilities you'll implement.

Concepts and Architecture

Review host, database, network, and software prerequisites

Before You Begin

Register the database and Spring Boot application in Microsoft Entra ID to establish trust and define application roles

Create Application Registrations in Microsoft Entra ID

Create a test user in Entra ID and assign required roles

Manage Users and Role Assignments

Create a server wallet and a self-signed certificate for TLS encryption

Generate Wallets and Certificates

Configure the database listener and network layer for TCPS connections and token-based authentication

Configure Database Network Settings

Create the sample hr schema, set up identity provider details, and define the Deep Sec data roles and data grants

Configure Data Access Control

Clone the sample Spring Boot application, configure the JDBC provider, and set up environment variables

Set Up the Spring Boot Application

Build the application, obtain an Entra ID access token, and verify data access control and privilege elevation

Build, Run, and Verify