Note:

Discover Unmonitored Databases in Hybrid Cloud Environments and Secure them with Oracle Data Safe

Introduction

In today’s rapidly evolving technological landscape, the hybrid cloud environment has become a cornerstone for many organizations seeking flexibility and scalability in their IT infrastructure. However, with this shift comes the challenge of managing and securing vast amounts of data across various platforms. Unmonitored databases within these hybrid environments pose significant risks, including data breaches and unauthorized access.

This tutorial delves into the critical task of identifying these unmonitored databases and provides a comprehensive guide on leveraging Oracle Data Safe to secure them effectively.

Navigate to Compartments

Discovering all your Oracle databases in a hybrid environment involves identifying databases both on-premises and in the cloud.

Audience

Objectives

Prerequisites

Task 1: Run OCI Cloud Shell

Access the OCI Cloud Shell to utilize its integrated capabilities.

  1. Log in to the OCI Console.

    Navigate to Compartments

  2. Click Cloud Shell from the drop-down menu. Note that the OCI Command Line Interface (CLI) running in the OCI Cloud Shell will run commands against the region selected in the console’s region selection menu when the OCI Cloud Shell was started.

    Select Create Compartment

Task 2: Identify All OCI Databases

Utilize the OCI Cloud Shell to comprehensively discover and catalog all OCI Databases in your environment.

  1. Run the following command to list all Oracle Autonomous Database.

    oci db autonomous-database list --compartment-id <compartment-id>  | jq -r '.data[]."db-name"'
    

    Select Create Compartment

  2. Run the following command to list all Database-as-a-Service (DBaaS) databases.

    oci db database list --compartment-id <compartment-id>  | jq -r '.data[]."db-name"'
    

    Select Create Compartment

  3. Run the following command to list all DBaaS Pluggable Database (PDB) databases.

    oci db database list --compartment-id <compartment-id>  | jq -r '.data[]."pdb-name"'
    

    Select Create Compartment

  4. Run the following command to list all the databases by OCI search.

    oci search resource structured-search --query-text "query dbsystem,AutonomousDatabase resources" --output json | jq -r '.[][][]."display-name"'
    

    Select Create Identity Domain

Task 3: Scan On-Premises and Other Cloud Databases

Employ Nmap to detect and inventory all Oracle databases hosted On-Premises and across other cloud providers.

  1. List the databases with Nmap.

    • Run the following Nmap command to get the list of server IP’s.

      cat server_list.txt
      nmap -sV -p 1521 -iL server_list.txt -oG - | grep '/open/' | awk 'BEGIN { FS="[ /]"; print "Server,Service,Version" }/open/ { print $2 "," $8 "," $13 }'
      

      Select Create Identity Domain

  2. List the databases with Nmap with IP range.

    • Run the following Nmap command with IP’s range.

      nmap -sV -p 1521 129.**.**.0/24 -oG - | grep '/open/' | awk 'BEGIN { FS="[ /]"; print "Server,Service,Version" }/open/ { print $2 "," $8 "," $13 }'
      

      Select Create Identity Domain

Task 4: Secure Database Monitoring

Implement robust security monitoring for all databases using Oracle Data Safe to ensure ongoing protection and compliance.

  1. List the Target Databases registered with Oracle Data Safe.

    oci search resource structured-search --query-text "query DataSafeTargetDatabase resources" --output json |jq -r '.[][][]."display-name"'
    

    The list of databases registered with Oracle Data Safe.

    Select Create Identity Domain

  2. Register the remaining unmonitored databases with Oracle Data Safe.

    In this tutorial, we register all the autonomous databases that are not yet registered in Oracle Data Safe. We use the OCI CLI through OCI Cloud Shell. Using a OCI CLI is easy and efficient for this task. For more information, see OCI CLI Command Reference.

    Run the following command to register the autonomous database with Oracle Data Safe in OCI CLI.

    oci db autonomous-database data-safe register --autonomous-database-id $autonomous_database_id --pdb-admin-password $pdb_admin_password
    

    Expected Output:

    Select Create Identity Domain

Note:

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.