MEDIUM OCP (Platform) M12: Audit Profile P3

Pending Compare Branch Scanned: 2026-08-12

Overview

This remediation configures the OpenShift API server audit logging to capture request and response bodies, providing enhanced visibility into cluster operations.

Settings

Setting Value Description
audit.profile WriteRequestBodies Enhanced audit logging with request bodies

Implementation

Modify the APIServer custom resource:

apiVersion: config.openshift.io/v1
kind: APIServer
metadata:
  name: cluster
spec:
  audit:
    profile: WriteRequestBodies

Apply with:

oc patch apiserver cluster --type merge -p '{"spec":{"audit":{"profile":"WriteRequestBodies"}}}'

Audit Profile Options

Profile Description
Default Log metadata for all requests
WriteRequestBodies Log metadata and request bodies for write operations
AllRequestBodies Log metadata and request bodies for all operations
None Disable API audit logging (not recommended)

Compliance Checks Remediated

Check Profile Docs
ocp4-cis-audit-profile-set CIS 📖

Source Remediation Files

  • medium/ocp4-cis-audit-profile-set.yaml

Verification

Check current audit profile:

oc get apiserver cluster -o jsonpath='{.spec.audit.profile}'
# Expected: WriteRequestBodies

Security Impact

Enhanced audit logging provides:

  • Full request body capture for forensic analysis
  • Visibility into what was created/modified
  • Compliance evidence for security audits
  • Incident response capability

Note: WriteRequestBodies increases log volume. Ensure adequate log storage capacity.

Legend
Remediation Status
✅ PASS (vanilla) Passes on unhardened RHCOS; no remediation needed
🟢 Verified Remediation tested on live cluster, confirmed PASS
🔵 In Progress Remediation actively being developed or tested
🟡 Pending Not yet started; needs remediation work
🟠 Partial Some checks pass or remediation not fully validated
⚪ On Hold Work paused (blocked or deprioritized)
Upstream Verdict
🔼 Candidate Suitable for upstreaming to ComplianceAsCode
🟣 PR Open Upstream PR filed
🎯 RAN Only Only applies to RAN deployments
⚙️ Platform Requires OCP platform-level configuration
✅ Pass Already passing upstream
📍 Site Site/deployment-specific configuration
— N/A Not applicable for upstreaming
Platform
RHCOS Node-level checks (MachineConfig)
OCP Platform-level checks (API/CR)
Mixed Both RHCOS and OCP checks
Severity
HIGH
MEDIUM
LOW
MANUAL

Keyboard Shortcuts

Navigation
j / Next row
k / Previous row
Enter Open selected / Expand details
Esc Clear selection / Close modal
Actions
/ Focus search
d Toggle dark mode
? Show this help
g h Go to home
Filters
1 Show all
2 Pending only
3 In Progress only
4 Complete only