Note:

Send Oracle Cloud Guard Problems through Email using Oracle Cloud Infrastructure Functions

Introduction

Today, cybersecurity teams across industries face the complex challenge of maintaining a solid security posture while dealing with cloud environments’ dynamic nature. With countless resources, configurations, and evolving threats, tracking and addressing issues promptly is crucial. At Oracle, we recognize the importance of equipping organizations with tools to streamline their security management, helping them tackle these challenges head-on. Oracle Cloud Guard offers robust functionality to help enterprises simplify cloud security management, moving from merely identifying vulnerabilities to automatically distributing issues across teams for timely resolution.

This tutorial outlines an automated solution leveraging OCI’s native services that enables security teams to receive and share detailed Oracle Cloud Guard security reports directly through email. This approach reduces manual intervention, facilitates continuous monitoring, and ensures a proactive stance in cloud security.

Image of the high level architecture

Objective

Prerequisites

Task 1: Set Up the Required Policies and Oracle Cloud Infrastructure Identity and Access Management (OCI IAM) Permissions

Each component of this solution must have access to the OCI resources it interacts with.

Task 2: Configure the OCI Email Delivery Service

  1. Set up the OCI Email Delivery service by creating an Approved Sender email address, which will be used to send reports. For more information, see Creating an Approved Sender.

    Image of the approved senders configuration

  2. Generate Simple Mail Transfer Protocol (SMTP) credentials for the email account by creating a dedicated user with limited SMTP access permissions.

    1. Create an OCI IAM user. For more information, see Creating a User.

    2. To edit user capabilities, see Editing a User’s Capabilities.

    3. To create SMTP credentials, see Creating SMTP Credentials.

    Image of the user account configuration

Task 3: Store SMTP Credentials in OCI Vault

Using OCI Vault, securely store SMTP credentials. This adds an extra layer of security by keeping sensitive information outside the function.

  1. Set up an OCI Vault. For more information, see Creating a Vault.

  2. To create a Master Encryption Key, see Creating a Master Encryption Key.

  3. To create a secret, see Creating a Secret in a Vault.

Image of the vault configuration

Task 4: Develop and Deploy the Function

This function fetches unresolved security posture issues detected in the past year. It formats the data into a structured report based on parameters such as risk level and detection time and then sends it as a comma-separated values (CSV) attachment via email. For more information, see Deploying a function.

Here is an overview of the core function steps:

Using OCI’s serverless function capabilities, this report can be customized to provide maximum clarity on critical security areas for cybersecurity teams.

Image of the function configuration

Task 5: Schedule the Function with OCI Resource Scheduler

The final task is to use OCI Resource Scheduler to automate the execution of the function. This configuration can run weekly or at a customized interval, ensuring timely and consistent security reporting. For more information, see Creating Schedules.

Image of the Scheduler configuration

  1. To run the function, enter the following required information.

    Before deploying the function, gather the following configuration details. These inputs will be provided in the function configuration file (func.yaml) or directly in the OCI Console, depending on your deployment method.

    • Compartment ID: This is your tenancy ID where Oracle Cloud Guard is enabled.
    • From Email: The approved sender email you created in the OCI Email Delivery Service.
    • To Email: The email address where the report will be sent.
    • SMTP Endpoint: To find it, go to Email Delivery and Configuration.
    • SMTP Port: Typically 587 or 25, as specified in OCI Email Delivery service configuration.
    • SMTP Username Secret OCID: The OCID for SMTP username, securely stored in OCI Vault.
    • SMTP Password Secret OCID: The OCID for SMTP password, securely stored in OCI Vault.
    • Cloud Guard Access Level: Defines access level for resources (ACCESSIBLE or RESTRICTED). Defaults to ACCESSIBLE.
  2. We will get a sample output which is an actionable Oracle Cloud Guard report.

    This Oracle Cloud Guard report provides a structured overview of unresolved security issues in your OCI environment, categorized by risk level. Critical details like region, resource type, severity, and detection timestamps enable cybersecurity teams to assess and prioritize actions.

    Image of the output

Next Steps

Oracle Cloud Guard’s automated reporting offers cybersecurity teams a streamlined, proactive approach to managing cloud security risks. Organizations can receive weekly reports on unresolved security issues with a one-time configuration, categorized by severity and risk level. This solution addresses the complex manual task of cloud security management, empowering teams to focus on timely issue resolution rather than tracking down issues. For more information on using Oracle Cloud Guard and its CNAPP capabilities, contact your Oracle representative or see Cloud Security Services.

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.