More Info:
Compute instances should have in-transit encryption enabled for boot and block volume attachments. This protects data from interception as it moves between the instance and storageRisk Level
MediumAddress
Compliance, SecurityCompliance Standards
- APRA CPS 234 (Australia)
- AWS Startup Security Baseline
- AWS Well Architected Framework
- BSI C5 (Germany)
- Brazil LGPD
- CCPA / CPRA (California)
- CIS Critical Security Controls v8
- CMMC 2.0
- CSA Cloud Controls Matrix v4
- DPDPA
- Digital Operational Resilience Act (EU)
- GDPR
- HIPAA
- ISO 27001
- ISO/IEC 27017
- ISO/IEC 27018
- ISO/IEC 27701
- KSA PDPL
- MAS Technology Risk Management (Singapore)
- MITRE ATT&CK (Cloud)
- NIS2 Directive
- NIST CSF
- NIST SP 800-171
- NYDFS 23 NYCRR 500
- PCI
- Reserve Bank of India (RBI) Cyber Security Framework
- SOC2
- SWIFT Customer Security Controls Framework
- Sarbanes-Oxley IT General Controls
- Securities and Exchange Board of India (SEBI) - Cloud Security Adoption Framework
- UK NCSC Cyber Assessment Framework
Triage and Remediation
- Remediation
Remediation
Using Console
Using Console
To remediate “OCI Compute Instances Should Have In-Transit Encryption Enabled” for OCI Compute Monitoring using the OCI Console, you need to enable in‑transit encryption for the Oracle Cloud Agent Monitoring plugin on each instance.Follow these steps per instance:
-
Sign in to OCI Console
Make sure you’re in the correct tenancy and region. -
Go to the Compute instance
- Open the navigation menu (☰).
- Go to Compute → Instances.
- Select the Compartment where the instance is.
- Click the instance name you want to fix.
-
Open Oracle Cloud Agent plugins
- On the instance details page, in the left-side or main tabs, click Oracle Cloud Agent (or Oracle Cloud Agent plugins).
- You’ll see a list of plugins like:
- Monitoring
- Management Agent
- Block Volume Management
- etc.
-
Edit the Monitoring plugin configuration
- Find the Monitoring plugin in the list.
- Ensure its Status is Enabled (if not, click Edit or the action menu (
⋯) → Enable). - In the same area, look for In‑transit encryption or similar security/encryption option.
- Click Edit (or the pencil icon) for the Monitoring plugin configuration.
-
Enable in‑transit encryption
- In the plugin settings, set In‑transit encryption (or Encrypt data in transit / Use TLS for monitoring data) to Enabled.
- If prompted, choose the appropriate protocol (TLS) and minimum version (e.g., TLS 1.2 or higher).
- Save the changes by clicking Save or Update.
-
Verify plugin and encryption status
- After saving, confirm:
- Monitoring plugin is Enabled.
- In‑transit encryption shows as Enabled for that plugin.
- Optionally, check a few other instances in the same compartment and repeat.
- After saving, confirm:
-
Repeat for all affected instances
- Apply the same configuration for each instance flagged by your security/compliance tool or Cloud Guard.
Using CLI
Using CLI
Below is how to remediate the “OCI Compute Instances Should Have In-Transit Encryption Enabled” finding using the OCI CLI, focusing on block/boot volume attachments to compute instances.In-transit encryption is a property of the volume attachment, not the instance or volume itself, so you must (re)attach with encryption-in-transit enabled.
Check for these fields on each attachment:Record for each non-compliant attachment:
Wait until the instance is
Wait for the attachment to be removed (optional check):
(Use the same attachment type and AD as originally.)
Confirm that:
If you share an example attachment JSON from your environment, I can give exact CLI commands tailored to that specific instance and volume.
1. Prerequisites
- OCI CLI installed and configured:
- You know:
- Your tenancy OCID
- The compartment OCID(s) where the instances reside
- Proper permissions (
readandmanageon compute and block volumes).
2. Identify Non-Compliant Volume Attachments
List all volume attachments in a compartment and filter for those without in-transit encryption.isPvEncryptionInTransitEnabled(for paravirtualized attachments)isIscsiEncryptionEnabled(for iSCSI, if present)
True.To programmatically find non-compliant ones (example using jq):id(volume attachment OCID)instanceIdvolumeIdattachmentType(paravirtualized / iscsi)
3. Stop the Affected Instance (Required for Detach)
For each affectedinstanceId:STOPPED:4. Detach the Existing (Non-Encrypted-in-Transit) Volume Attachment
For each non-compliantvolumeAttachmentId:5. Reattach the Volume with In-Transit Encryption Enabled
You need:instanceId(same as before)volumeIdattachmentType(paravirtualized or iscsi)- For boot volumes: use the boot volume attachment commands.
- For data volumes: use the volume attachment commands.
5.1. Reattach a Data Volume (Paravirtualized)
5.2. Reattach a Data Volume (iSCSI)
5.3. Reattach a Boot Volume with In-Transit Encryption
For boot volumes, useattach-boot-volume:6. Restart the Instance
7. Validate In-Transit Encryption Is Enabled
Re-list the volume attachments:is-pv-encryption-in-transit-enabledistruefor paravirtualizedis-iscsi-encryption-enabledistruefor iSCSI
If you share an example attachment JSON from your environment, I can give exact CLI commands tailored to that specific instance and volume.
Using Python
Using Python
In OCI there is no toggle on a Compute instance called “in‑transit encryption.” It’s enforced by how you expose and connect to the instance (HTTPS, SSH, VPN, SSL/TLS on load balancer, etc.).For “OCI Compute Instances Should Have In-Transit Encryption Enabled” as a monitoring control, what you can do in Python is:
At this point you know which instances are internet‑facing.
This gives you a monitoring view: which compute instances are serving unencrypted HTTP but not working HTTPS.
Now you have a Monitoring metric indicating in‑transit encryption compliance per instance.
If you specify your exact protocol/port (e.g., HTTP on 8080, custom API on 8443), I can adjust the example checks and metrics code accordingly.
- Continuously discover public‑facing compute endpoints.
- Check whether they are using TLS (HTTPS/SSL) or plaintext (HTTP/other).
- Optionally auto‑remediate (e.g., tag non‑compliant instances or send an alarm / notification for manual HTTPS enforcement via LB / web server config).
1. Prerequisites
- Python 3.x
ociSDK installed:- OCI config file (
~/.oci/config) with a profile that has:Compute:ReadVirtualNetwork:ReadMonitoring:manage(if you want to create alarms)Ons:manageorEvents/Notificationsif you’ll send notifications
2. Discover Compute instances and their public endpoints
This script:- Lists all instances in a compartment
- Finds their VNICs & public IPs
- Records TCP ports that look like HTTP/HTTPS (80, 443, others if you choose)
3. Check in‑transit encryption status (simple TCP/TLS check)
For monitoring, a pragmatic test is:- Try connecting via HTTPS (
443) and validate the TLS handshake. - Optionally, detect if HTTP (
80) is open and serving plaintext.
4. Publish results as custom metrics to OCI Monitoring
Create a custom metric namespace (e.g.security/compute_encryption) and push a metric like unencrypted_endpoints per instance.5. Create an OCI Monitoring Alarm (in console) on this metric
In OCI Console → Monitoring → Alarms:- Create alarm
- Metric namespace:
security/compute_encryption - Metric name:
unencrypted_endpoints - Dimension:
instanceId(All) - Query example:
- Metric namespace:
- Severity: Critical / High
- Destination: Choose/Configure Notifications (Email, PagerDuty, etc.)
6. Operational remediation (what actually fixes the misconfiguration)
The script only detects and monitors. To remediate per instance (done outside Python or via automation):- For web workloads:
- Put instance behind an OCI Load Balancer with an HTTPS listener and valid certificate.
- Or configure the web server (Nginx/Apache/etc.) on the instance to:
- Enable HTTPS
- Redirect all HTTP → HTTPS
- For APIs/other services:
- Require TLS (e.g., gRPC over TLS, TLS for custom TCP protocols).
- For admin access:
- Use SSH (already encrypted) instead of telnet/rsh, etc.
- Use VPN / FastConnect for private access only.
- Tag non‑compliant instances:
encryption_in_transit = "non_compliant" - Or send an Operations ticket / webhook for manual remediation.
If you specify your exact protocol/port (e.g., HTTP on 8080, custom API on 8443), I can adjust the example checks and metrics code accordingly.
Using Terraform
Using Terraform
oci_core_instance or monitoring resources, so it cannot be remediated via “OCI Compute Monitoring” directly.Changing is_pv_encryption_in_transit_enabled from false to true may force replacement of the volume attachment (detach/attach), which can cause downtime for that volume.Verification: terraform plan should show is_pv_encryption_in_transit_enabled: "false" => "true" on the relevant oci_core_boot_volume_attachment and/or oci_core_volume_attachment resources.
