Forwarding ROSA HCP Control Plane Audit Logs to Microsoft Sentinel
This content is authored by Red Hat experts, but has not yet been tested on every supported configuration. This guide has been validated on OpenShift 4.22. Operator CRD names, API versions, and console paths may differ on other versions.
Overview
ROSA HCP provides a control plane log forwarder that is a separate system outside your cluster. You can use the control plane log forwarder to send your logs to either an Amazon CloudWatch log group or an Amazon S3 bucket.
This guide walks through one way to get those logs into Microsoft Sentinel, a cloud-native Security Information and Event Management (SIEM) solution. There is no native way to ship control plane logs directly to Sentinel, so you configure the ROSA control plane log forwarder to write to S3, then use an AWS Lambda function (triggered by an SQS queue fed by S3 event notifications) to reshape the audit events and push them into a Microsoft Sentinel custom table through the Azure Monitor Logs Ingestion API.
This guide differs from Forwarding and Monitoring ROSA HCP Control Plane Audit Logs with Filebeat by swapping Filebeat for a serverless Lambda function and a Sentinel destination.
High-Level Audit logs Flow from ROSA HCP to Microsoft Sentinel

Prerequisites
- A ROSA HCP cluster. This guide was validated on ROSA 4.22.
-
ROSA CLI
v1.2.64 or later, logged in (
rosa login). -
AWS CLI
configured with permissions to create, configure, and delete S3 buckets (including bucket policies and notifications), SQS queues, Lambda functions and event source mappings, CloudWatch log groups, and IAM roles and role policies, including
iam:PassRolefor the Lambda execution role. -
Azure CLI
2.61.0 or later, logged in (
az login) with permissions to register resource providers and to create and delete a resource group, a Log Analytics workspace, Microsoft Sentinel, Data Collection Endpoints and Rules, and role assignments. - Microsoft Entra ID permissions to register an application.
jqandzip.- A Bash shell. Run all commands in the same shell session so the environment variables stay set.
Install the Azure CLI extensions used in this guide:
Many enterprise tenants disable self-service app registration for regular users. If you see “You don’t have permission to register applications in this directory” when you reach Register an application for the Lambda function , ask your Entra ID admin to either grant you the Application Developer role, enable self-service app registration tenant-wide, or create the app registration for you and share the client ID, tenant ID, and a client secret.
Set environment variables
Set the values you choose once. The remaining values in this guide are captured automatically as resources are created.
Forward control plane logs to S3
For an S3 bucket that uses the default SSE-S3 encryption, as in this guide, the log forwarder does not need an IAM role; the bucket policy created below grants the required access. See Forwarding control plane logs for other destinations and encryption options.
-
Create the S3 bucket.
The S3 bucket must be in the same AWS region as the ROSA HCP cluster. ROSA validates bucket accessibility from the cluster’s region. A bucket in a different region fails the pre-flight check with
Failed to reach bucket, even if the bucket exists and the policy is correct. -
Create a bucket policy that allows the ROSA central log distribution role to write to the bucket, and attach it.
-
Create the log forwarder configuration and the log forwarder.
This example only specifies log groups. You can also specify one or more applications in addition to the log groups. See Log groups for the log group types and related applications.
-
Capture the log forwarder ID and confirm that its status is
ready.Expected output:
-
Verify that logs are arriving in S3. The first objects usually appear within a few minutes.
Expected output (objects are grouped by cluster namespace, application, and pod):
See S3 Log Format for the format produced by the ROSA log forwarder.
Configure the Sentinel workspace, custom table, and Data Collection Rule
Log Analytics and Microsoft Sentinel bill per GB of data ingested, and Kubernetes API server audit logs are high volume. Review Microsoft Sentinel pricing before forwarding production clusters.
-
Select the subscription, register the resource providers used in this guide, and create the resource group.
-
Create the Log Analytics workspace, capture its resource ID, and enable Microsoft Sentinel on it.
-
Create the Data Collection Endpoint (DCE) and capture its resource ID and logs ingestion endpoint.
-
Create the custom table.
-
Create the Data Collection Rule (DCR). The DCR declares the incoming stream schema and maps it to the custom table’s output stream.
If the
az restcommand fails withInvalidOutputTable, the custom table is not available yet. Wait a minute and run this step again.
Register an application for the Lambda function
The Lambda function authenticates to the Logs Ingestion API as a Microsoft Entra ID application.
-
Create the app registration and its service principal, and capture the IDs and a client secret.
If your Entra ID admin created the app registration for you, set
APP_ID,TENANT_ID, andCLIENT_SECRETto the values they provided, and setAPP_SP_OBJECT_IDwithaz ad sp show --id "${APP_ID}" --query id --output tsv. -
Allow the application to send data through the DCR.
Create the SQS queue and Lambda function
-
Create an SQS queue and allow the S3 bucket to send messages to it.
The queue’s visibility timeout must be at least as long as the Lambda function’s timeout (60 seconds in this guide), or Lambda rejects the event source mapping. AWS recommends a visibility timeout of six times the function timeout.
-
Send S3 object-created events for the log prefix to the queue.
This command replaces the bucket’s entire notification configuration. Use a bucket dedicated to these logs.
-
Create the Lambda function code and package it. The function keeps only Kubernetes audit events (records from the
audit-logscontainer) and setsClusterIdto the ROSA cluster ID taken from the record’s namespace. -
Create the Lambda execution role. It gets the AWS managed policy for reading from SQS and writing logs, plus read access to objects in the log bucket only.
-
Create the Lambda function and wait until it is active.
If this fails with “The role defined for the function cannot be assumed by Lambda”, the new IAM role has not propagated yet. Wait a few seconds and run the command again.
The client secret is stored as a Lambda environment variable. For production, consider storing it in AWS Secrets Manager.
-
Connect the SQS queue to the Lambda function and capture the mapping ID.
Validate the setup
-
Confirm that the event source mapping is enabled.
Expected output:
If the output is
Creating, wait a few seconds and run the command again. -
Query the custom table. New log objects are written every few minutes, and the first rows in a new custom table typically appear within 10 minutes. The Monitoring Metrics Publisher role assignment can take up to 30 minutes to take effect; until then, the Lambda function’s ingestion requests fail with HTTP 403 and SQS retries them.
The setup is working when the output shows a non-zero
Rowscount for your cluster ID. If no rows appear after 30 minutes, check the Lambda function’s logs withaws logs tail "/aws/lambda/${LAMBDA_FUNCTION_NAME}" --region "${CLUSTER_REGION}" --since 30m.
You can also browse the data in the Azure portal. In your Log Analytics workspace, select Logs, open the Tables tab, and under Custom Logs select ROSAControlPlaneAudit_CL.

Useful queries
Run these in the Logs view of the workspace.
Clean up
These commands delete the S3 bucket and every object in it, and the entire resource group, including the Log Analytics workspace, all data collected in it, and any other resources in the group.
-
Remove the log forwarder.
-
Delete the AWS resources.
-
Delete the Azure resources.
If your Entra ID admin created the app registration for you, skip
az ad app deleteand ask them to remove it.