Oracle Cloud (OCI)¶
Connecting from the web app?
Follow the prerequisites and credential creation instructions below, then return to Cloud Security → Settings → Providers → Add provider. Enter the provider IDs under Configuration and save the private key using New secret under Permissions. Run Test Provider, fix required failures, and save. The LimaCharlie CLI examples below are an alternative. First-time setup and verification explains the full journey.
Collects the Oracle Cloud Infrastructure estate: compartments, compute, networking, load balancers, storage, databases, Kubernetes (OKE), functions, Vault, and the tenancy's identity setup (users, groups, dynamic groups, identity domains and IAM policies). Host vulnerabilities come from the Oracle Vulnerability Scanning Service.
Auth model: an OCI API signing key on a dedicated IAM user. The user is in a group, and one read-only IAM policy gives the group access. LimaCharlie stores the private half of the key as a secret and signs read requests with it.
What the credential can never do
The policy is read-only and it does not let LimaCharlie read your data. It grants no secret values, object contents, database wallets, Kubernetes config files, function configuration values, VPN keys, volume CHAP secrets or Windows initial passwords. Object names stay unreadable too, except the name of an object you shared through a pre-authenticated request. Never granted lists each one and why.
What we check¶
- Identity and access. Policies that give a group
manage all-resourcesin a compartment or the tenancy, users with a console password and no MFA, API keys, customer secret keys, auth tokens and database passwords older than 90 days, more than one active API key per user, tenancy administrators with API keys, credentials unused for 45 days, weak or non-expiring passwords. Identity attack paths and effective permissions are computed from the policy text. - Networking. SSH or RDP open to the internet in a security list or a network security group (NSG), default security lists that allow more than ICMP inside the VCN, Autonomous Databases open to every address.
- Compute. Instances that accept IMDS v1, boot without Secure Boot, or do not encrypt volume traffic in transit.
- Storage. Public buckets, buckets and volumes not encrypted with a customer-managed key, buckets without versioning, file systems without a customer-managed key.
- Logging and monitoring. No Events rule that notifies a person about the IAM, network and sign-in changes CIS lists, topics with no active subscription, subnets without VCN flow logs, buckets that do not log writes, Cloud Guard off at the root, vault keys not rotated yearly, no tag default that records the creator.
- Asset management. Resources created in the root compartment, a tenancy with no compartments.
- Vulnerabilities. Host CVEs reported by the Vulnerability Scanning Service, linked to the instance they affect.
- Exposure. A security list or NSG rule that opens a port to the internet is matched to the instances, load balancers and databases it protects, so exposed workloads show up in attack paths.
The checks follow the CIS Oracle Cloud Infrastructure Foundations Benchmark v3.1.0. The list grows as new checks ship.
Prerequisites¶
- A user who can create groups, users and policies in the tenancy's root
compartment, for example a member of the
Administratorsgroup. - The tenancy OCID, the home region, and, for a single compartment, its compartment OCID. Where to find them is below.
- A dedicated read-only IAM user for LimaCharlie. Do not reuse a person's account: the key stays valid until you delete it.
Required permissions¶
The policy lives in the root compartment, because only a root policy can say
in tenancy. Pick one of two variants.
| Variant | Use it when | Scope |
|---|---|---|
| Whole tenancy | You pay for Cloud Security, or the free tier is not a limit for you | Every compartment and every subscribed region |
| One compartment | Free tier, or you only want one compartment scanned | That compartment and the compartments inside it (free tier: that compartment only) |
The group is assumed to be in the Default identity domain. If it is in
another domain, write the subject as
group '<DomainName>'/'LimaCharlieCloudSec' in every statement.
Whole-tenancy policy¶
Create a policy named LimaCharlieCloudSec in the root compartment with these
37 statements, one per line:
Allow group LimaCharlieCloudSec to inspect all-resources in tenancy where all {request.permission != 'OBJECT_INSPECT', request.permission != 'IPSEC_CONNECTION_READ', request.permission != 'DEVOPS_PULL_REQUEST_INSPECT', request.permission != 'DEVOPS_PULL_REQUEST_COMMENT_INSPECT', request.permission != 'SUPPRESSION_INSPECT', request.operation != 'ListVolumeAttachments', request.operation != 'GetVolumeAttachment'}
Allow group LimaCharlieCloudSec to inspect ipsec-connections in tenancy where all {request.operation != 'GetCpeDeviceConfigContent', request.operation != 'GetIpsecCpeDeviceConfigContent', request.operation != 'GetTunnelCpeDeviceConfigContent', request.operation != 'GetCpeDeviceTemplateContent', request.operation != 'GetIpsecCpeDeviceTemplateContent', request.operation != 'GetTunnelCpeDeviceTemplateContent'}
Allow group LimaCharlieCloudSec to read users in tenancy
Allow group LimaCharlieCloudSec to read domains in tenancy
Allow group LimaCharlieCloudSec to read tag-namespaces in tenancy
Allow group LimaCharlieCloudSec to read buckets in tenancy
Allow group LimaCharlieCloudSec to read instances in tenancy where request.operation != 'GetWindowsInstanceInitialCredentials'
Allow group LimaCharlieCloudSec to read instance-configurations in tenancy
Allow group LimaCharlieCloudSec to read public-ips in tenancy
Allow group LimaCharlieCloudSec to read nat-gateways in tenancy
Allow group LimaCharlieCloudSec to read network-security-groups in tenancy
Allow group LimaCharlieCloudSec to read network-firewall-family in tenancy
Allow group LimaCharlieCloudSec to read load-balancers in tenancy
Allow group LimaCharlieCloudSec to read network-load-balancers in tenancy
Allow group LimaCharlieCloudSec to read waf-family in tenancy
Allow group LimaCharlieCloudSec to read file-family in tenancy
Allow group LimaCharlieCloudSec to read mysql-instances in tenancy
Allow group LimaCharlieCloudSec to read mysql-configurations in tenancy
Allow group LimaCharlieCloudSec to read mysql-backups in tenancy
Allow group LimaCharlieCloudSec to read cluster-family in tenancy
Allow group LimaCharlieCloudSec to read api-gateways in tenancy
Allow group LimaCharlieCloudSec to read vaults in tenancy
Allow group LimaCharlieCloudSec to read keys in tenancy
Allow group LimaCharlieCloudSec to read secrets in tenancy
Allow group LimaCharlieCloudSec to read leaf-certificates in tenancy
Allow group LimaCharlieCloudSec to read certificate-authorities in tenancy
Allow group LimaCharlieCloudSec to read log-groups in tenancy
Allow group LimaCharlieCloudSec to read cloudevents-rules in tenancy
Allow group LimaCharlieCloudSec to read ons-topics in tenancy
Allow group LimaCharlieCloudSec to read cloud-guard-config in tenancy
Allow group LimaCharlieCloudSec to read cloud-guard-targets in tenancy
Allow group LimaCharlieCloudSec to read cloud-guard-detector-recipes in tenancy
Allow group LimaCharlieCloudSec to read cloud-guard-responder-recipes in tenancy
Allow group LimaCharlieCloudSec to read cloud-guard-problems in tenancy
Allow group LimaCharlieCloudSec to read vss-family in tenancy
Allow group LimaCharlieCloudSec to read bastion in tenancy
Allow group LimaCharlieCloudSec to read usage-budgets in tenancy
The web app shows the same text under Permissions, and copies it for you.
One-compartment policy (free tier)¶
Identity objects, tag defaults, budgets and Cloud Guard settings live at the
root, so those statements stay in tenancy. The rest names your compartment by
OCID. Replace every <compartment OCID> with the compartment's OCID
(ocid1.compartment.…). The policy has 46 statements.
Allow group LimaCharlieCloudSec to inspect tenancies in tenancy
Allow group LimaCharlieCloudSec to inspect compartments in tenancy
Allow group LimaCharlieCloudSec to inspect policies in tenancy
Allow group LimaCharlieCloudSec to read users in tenancy
Allow group LimaCharlieCloudSec to inspect groups in tenancy
Allow group LimaCharlieCloudSec to inspect dynamic-groups in tenancy
Allow group LimaCharlieCloudSec to read domains in tenancy
Allow group LimaCharlieCloudSec to inspect authentication-policies in tenancy
Allow group LimaCharlieCloudSec to inspect credentials in tenancy
Allow group LimaCharlieCloudSec to inspect identity-providers in tenancy
Allow group LimaCharlieCloudSec to read tag-namespaces in tenancy
Allow group LimaCharlieCloudSec to inspect tag-defaults in tenancy
Allow group LimaCharlieCloudSec to read cloud-guard-config in tenancy
Allow group LimaCharlieCloudSec to read cloud-guard-targets in tenancy
Allow group LimaCharlieCloudSec to read cloudevents-rules in tenancy
Allow group LimaCharlieCloudSec to read usage-budgets in tenancy
Allow group LimaCharlieCloudSec to inspect all-resources in compartment id <compartment OCID> where all {request.permission != 'OBJECT_INSPECT', request.permission != 'IPSEC_CONNECTION_READ', request.permission != 'DEVOPS_PULL_REQUEST_INSPECT', request.permission != 'DEVOPS_PULL_REQUEST_COMMENT_INSPECT', request.permission != 'SUPPRESSION_INSPECT', request.operation != 'ListVolumeAttachments', request.operation != 'GetVolumeAttachment'}
Allow group LimaCharlieCloudSec to inspect ipsec-connections in compartment id <compartment OCID> where all {request.operation != 'GetCpeDeviceConfigContent', request.operation != 'GetIpsecCpeDeviceConfigContent', request.operation != 'GetTunnelCpeDeviceConfigContent', request.operation != 'GetCpeDeviceTemplateContent', request.operation != 'GetIpsecCpeDeviceTemplateContent', request.operation != 'GetTunnelCpeDeviceTemplateContent'}
Allow group LimaCharlieCloudSec to read buckets in compartment id <compartment OCID>
Allow group LimaCharlieCloudSec to read instances in compartment id <compartment OCID> where request.operation != 'GetWindowsInstanceInitialCredentials'
Allow group LimaCharlieCloudSec to read instance-configurations in compartment id <compartment OCID>
Allow group LimaCharlieCloudSec to read public-ips in compartment id <compartment OCID>
Allow group LimaCharlieCloudSec to read nat-gateways in compartment id <compartment OCID>
Allow group LimaCharlieCloudSec to read network-security-groups in compartment id <compartment OCID>
Allow group LimaCharlieCloudSec to read network-firewall-family in compartment id <compartment OCID>
Allow group LimaCharlieCloudSec to read load-balancers in compartment id <compartment OCID>
Allow group LimaCharlieCloudSec to read network-load-balancers in compartment id <compartment OCID>
Allow group LimaCharlieCloudSec to read waf-family in compartment id <compartment OCID>
Allow group LimaCharlieCloudSec to read file-family in compartment id <compartment OCID>
Allow group LimaCharlieCloudSec to read mysql-instances in compartment id <compartment OCID>
Allow group LimaCharlieCloudSec to read mysql-configurations in compartment id <compartment OCID>
Allow group LimaCharlieCloudSec to read mysql-backups in compartment id <compartment OCID>
Allow group LimaCharlieCloudSec to read cluster-family in compartment id <compartment OCID>
Allow group LimaCharlieCloudSec to read api-gateways in compartment id <compartment OCID>
Allow group LimaCharlieCloudSec to read vaults in compartment id <compartment OCID>
Allow group LimaCharlieCloudSec to read keys in compartment id <compartment OCID>
Allow group LimaCharlieCloudSec to read secrets in compartment id <compartment OCID>
Allow group LimaCharlieCloudSec to read leaf-certificates in compartment id <compartment OCID>
Allow group LimaCharlieCloudSec to read certificate-authorities in compartment id <compartment OCID>
Allow group LimaCharlieCloudSec to read log-groups in compartment id <compartment OCID>
Allow group LimaCharlieCloudSec to read ons-topics in compartment id <compartment OCID>
Allow group LimaCharlieCloudSec to read cloud-guard-detector-recipes in compartment id <compartment OCID>
Allow group LimaCharlieCloudSec to read cloud-guard-responder-recipes in compartment id <compartment OCID>
Allow group LimaCharlieCloudSec to read cloud-guard-problems in compartment id <compartment OCID>
Allow group LimaCharlieCloudSec to read vss-family in compartment id <compartment OCID>
Allow group LimaCharlieCloudSec to read bastion in compartment id <compartment OCID>
OCI applies a grant on a compartment to the compartments inside it too. On the free tier, LimaCharlie reads only the one compartment you name. On a paid plan it reads that compartment and the compartments inside it.
inspect compartments and inspect policies in the tenancy show every
compartment name and all policy text. LimaCharlie needs them to work out who
can do what.
Why each statement is there¶
| Statement | Why |
|---|---|
inspect all-resources … where … |
Inventory across the tenancy: compartments, groups, dynamic groups, policy text, VCNs, subnets, security lists, route tables, gateways, volumes, backups, databases, function and registry summaries, OKE. The where conditions remove the permissions that return content: object names, IPSec device configs (they hold the tunnel pre-shared key), DevOps pull-request text and email suppression addresses. They also remove the two calls that list and read data volume attachments, because both return the volume's iSCSI CHAP secret. So LimaCharlie does not see which instance a data volume is attached to. Boot volume attachments are still read |
inspect ipsec-connections … where … |
IPSec tunnel inventory, without the device-config download |
read users |
API keys (public key and fingerprint), auth tokens, customer secret keys and MFA devices. List calls return no secret |
read domains |
Identity domain type, license and replication |
read tag-namespaces |
Tag defaults, for the CIS check that a CreatedBy tag default exists. With inspect only, OCI lists no tag defaults at all. Tag namespaces and tag keys are names, descriptions and allowed values, not data |
read buckets |
Public access type, versioning, encryption key, replication and retention. It also lists the bucket's pre-authenticated requests, which are a real exposure: anyone with the link can read the object. Each request names the object it shares, so the name of an object shared this way is readable. Other object names are not |
read instances … where …, read instance-configurations |
IMDS version, Shielded Instance settings, launch options, agent config. user_data is dropped before storage. read instances also allows reading a Windows instance's initial password, so the condition removes that one call |
read public-ips, read nat-gateways |
Their inspect verb grants nothing |
read network-security-groups |
NSGs, their rules and the VNICs in them |
read network-firewall-family, read waf-family |
Firewall and WAF policy settings |
read load-balancers, read network-load-balancers |
Listeners, TLS settings and public certificates |
read file-family |
File systems, mount targets and export options. File data is reached over NFS, not through IAM |
read mysql-instances, -configurations, -backups |
MySQL HeatWave settings and backups |
read cluster-family |
OKE endpoints, image policy and node pools |
read api-gateways |
Gateway endpoint type, NSGs and certificate |
read vaults, read keys, read secrets |
Vault, key and secret metadata |
read leaf-certificates, read certificate-authorities |
Certificate validity and algorithms |
read log-groups |
Which logs exist, such as flow logs and bucket write logs |
read cloudevents-rules, read ons-topics |
The CIS notification checks |
| Cloud Guard statements | Cloud Guard status, targets, recipes and problems |
read vss-family |
Vulnerability Scanning recipes, targets and host findings |
read bastion |
Bastion client allow-list and session limit |
read usage-budgets |
The CIS check that a budget exists |
What we never read¶
The collector reads configuration. It never reads what is stored in your resources. The policy above does not grant any of these, so OCI refuses the call even if we tried:
| Not granted | Why |
|---|---|
read all-resources |
It includes secret values, database wallets, object bodies, console output, volume CHAP secrets, IPSec keys, image pulls and Terraform state |
read secret-family, read secret-bundles |
They return the secret value |
use keys |
Encrypt, decrypt and export |
inspect objects, read objects |
Object names and bodies |
read virtual-network-family, read ipsec-connections |
They return the IPSec tunnel shared secret |
read instance-family, read volume-family, read volume-attachments |
A data volume attachment returns the iSCSI CHAP secret, and console history is serial output. The inspect grant above excludes the two attachment calls for the same reason |
| A Windows instance's initial password | read instances would allow it, so that statement excludes the call |
read instance-agent-commands |
Run-command scripts and their output |
read autonomous-databases and its family |
Wallet download |
read databases, read database-family |
Database content |
read repos |
Image pulls |
use clusters |
Kubeconfig download |
read fn-app, read fn-function |
Function configuration values, which are often secrets |
read api-deployments |
Deployment specs can hold literal header values and response bodies |
| Certificate and CA bundles | Bundle content, possibly a private key |
read log-content, read audit-events |
Log search and audit log content |
read cloud-guard-adhoc-query |
Query output from your hosts |
read orm-stacks, read orm-jobs |
Terraform configuration and state |
Where an OCI API returns a sensitive value next to configuration, such as an
instance's user_data, LimaCharlie drops it before anything is stored. It keeps
at most a "was set" flag.
Compared with Oracle's own CIS auditor policy, this policy leaves out
use cloud-shell, use ons-family, read audit-events, read usage-reports,
read data-safe-family and read resource-availability, and adds the
inspect exclusions above.
What we collect¶
| Area | Collected |
|---|---|
| Tenancy and compartments | Compartment tree, region subscriptions, tag defaults, Cloud Guard status, budgets, policy counts |
| Compute | Instances (shape, IMDS version, Shielded Instance settings, VNICs, boot volume key, Cloud Agent plugins), OKE clusters and node pools |
| Network | VCNs, subnets, route tables, internet, NAT and service gateways, DRGs, security list rules and NSG rules (one row per rule), load balancers, network load balancers, API gateways |
| Storage | Object Storage buckets (settings only), block and boot volumes, volume backups, file systems |
| Databases | Autonomous Databases, Base Database DB systems, MySQL HeatWave |
| Serverless | Functions (summary only), API gateways |
| Keys and certificates | Vaults, keys, secret metadata, certificates |
| Identity | Users, groups, dynamic groups (matching rule stored as text), identity domains, identity providers, policies (statement text), credential metadata |
| Logging and monitoring | Log groups and logs, Events rules, Notifications topics, Cloud Guard targets, Bastions |
| Vulnerabilities | Vulnerability Scanning Service recipes, targets and host findings |
| Container Registry | Repositories (public flag and settings) |
Every row is keyed by OCID, never by name, so renaming or moving a resource between compartments keeps its history and its findings.
Find the IDs¶
| Value | Where it is |
|---|---|
| Tenancy OCID | Profile menu → Tenancy: <name> → OCID. Starts with ocid1.tenancy. |
| Home region | The same Tenancy page, Home region. Use the region identifier, like us-ashburn-1, not the short key (iad). Identity data is only served from the home region |
| User OCID | Identity & Security → Domains → Default domain → Users → the scanner user. Starts with ocid1.user. |
| Fingerprint | Shown next to the API key on the user's API keys tab after you upload the key. 16 pairs of hex digits separated by colons |
| Compartment OCID | Identity & Security → Compartments → the compartment. Starts with ocid1.compartment. |
Create the identity¶
- Sign in to the OCI console as a user who can administer IAM. Open
Identity & Security → Domains → Default domain → User management →
Groups → Create group. Name it
LimaCharlieCloudSec. - On the Users tab, choose Create user. Name it
lc-cloudsec-scannerand add it to theLimaCharlieCloudSecgroup. OCI asks for an email address: use a mailbox your team reads. Then open the user, choose Edit user capabilities, and leave only API keys selected. The scanner needs no console password or other credential, and a user that can sign in to the console without MFA is itself a finding. - Open Identity & Security → Policies, select the root
compartment, and choose Create policy. Name it
LimaCharlieCloudSec, switch to the manual editor, and paste the statements from Required permissions. For one compartment, paste the second variant with its OCID filled in. - Open the scanner user, then API keys → Add API key. Choose Generate API key pair, download the private key, and keep the file. Select Add. OCI shows a configuration preview with the fingerprint. Copy it.
- Copy the tenancy OCID, user OCID and home region (see Find the IDs).
- In LimaCharlie's Configuration step, enter those values. In Permissions, use New secret, paste the contents of the private key file into Private key, and fill Passphrase only if the key has one. Then test and save the connection. Delete the downloaded private key file afterwards.
Use OCI Cloud Shell,
or install the OCI CLI and sign in with oci session authenticate. Confirm
you are in the intended tenancy before you run these commands. Replace the
placeholders with your tenancy OCID and an email address for the scanner
user. OCI requires the email on tenancies that use identity domains, and it
must be unique in the tenancy.
[ -n "$ZSH_VERSION" ] && setopt interactive_comments
# (zsh, the macOS default, runs pasted # lines as commands unless that option is on.)
# Runs in a subshell ( ... ), so pasting it into a terminal is safe: a failed
# step stops the subshell (never your shell) before empty values are printed.
(
set -euo pipefail
# 1. Read-only group, dedicated user, the user in the group, and the user
# left with only its API key (no console password or other credentials)
TENANCY="ocid1.tenancy.oc1..<unique-id>"
SCANNER_EMAIL="<a mailbox your team reads>"
GROUP=$(oci iam group create --compartment-id "$TENANCY" --name LimaCharlieCloudSec \
--description "LimaCharlie Cloud Security (read-only)" --query 'data.id' --raw-output)
USER_OCID=$(oci iam user create --compartment-id "$TENANCY" --name lc-cloudsec-scanner --email "$SCANNER_EMAIL" \
--description "LimaCharlie Cloud Security scanner" --query 'data.id' --raw-output)
oci iam group add-user --group-id "$GROUP" --user-id "$USER_OCID" > /dev/null
oci iam user update-user-capabilities --user-id "$USER_OCID" \
--can-use-console-password false --can-use-auth-tokens false \
--can-use-customer-secret-keys false --can-use-smtp-credentials false \
--can-use-db-credentials false --can-use-o-auth2-client-credentials false > /dev/null
# 2. The read-only policy, in the ROOT compartment.
# lc-oci-policy.json is a JSON array of the statements from "Required
# permissions", one string per statement. The web app's Permissions
# step generates it with your compartment OCID filled in.
oci iam policy create --compartment-id "$TENANCY" --name LimaCharlieCloudSec \
--description "LimaCharlie Cloud Security (read-only)" \
--statements file://lc-oci-policy.json > /dev/null
# 3. API signing key. When asked for a passphrase, type N/A (twice) for
# none, or type one and keep it for the secret.
oci setup keys --key-name lc-oci --output-dir .
FINGERPRINT=$(oci iam user api-key upload --user-id "$USER_OCID" --key-file lc-oci_public.pem \
--query 'data.fingerprint' --raw-output)
HOME_REGION=$(oci iam region-subscription list --tenancy-id "$TENANCY" \
--query 'data[?"is-home-region"]|[0]."region-name"' --raw-output)
echo "User OCID: $USER_OCID"
echo "Fingerprint: $FINGERPRINT"
echo "Home region: $HOME_REGION"
)
The web app's Permissions step shows this script for Linux, macOS and Windows (PowerShell), with your tenancy OCID and the policy filled in.
The private key is lc-oci.pem. Store it as the
credentials secret, then delete
lc-oci.pem and lc-oci-policy.json from the machine.
Only the Default identity domain is assumed
oci iam group create and oci iam user create create objects in the
Default domain. If your users and groups live in another domain, create
them there in the console and write the policy subject as
group '<DomainName>'/'LimaCharlieCloudSec'.
Create the credentials secret¶
The secret is JSON that holds the private key. passphrase is only for an
encrypted key.
{"private_key": "-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n", "passphrase": "<optional>"}
In the web app, New secret builds this for you: paste the PEM text, and fill Passphrase only when the key has one.
For CLI setup, build the JSON from the key file with jq, so the line breaks
are escaped correctly. Put the passphrase, if any, in an environment variable
rather than on the command line.
# No passphrase. The key file is deleted only if every step of the pipeline succeeds.
( set -o pipefail
jq -n --rawfile k lc-oci.pem '{private_key: $k}' \
| jq -Rs '{secret: .}' \
| limacharlie secret set --key oci-scanner --enabled ) \
&& rm -f lc-oci.pem
# With a passphrase in $OCI_KEY_PASSPHRASE:
( set -o pipefail
jq -n --rawfile k lc-oci.pem '{private_key: $k, passphrase: env.OCI_KEY_PASSPHRASE}' \
| jq -Rs '{secret: .}' \
| limacharlie secret set --key oci-scanner --enabled ) \
&& rm -f lc-oci.pem
jq -Rs wraps the credential JSON into the secret record for stdin: the
equivalent of limacharlie hive set --hive-name secret with {"secret": "<the
credential JSON as a string>"}.
Key format
LimaCharlie reads an RSA private key in PEM form:
-----BEGIN RSA PRIVATE KEY-----or-----BEGIN PRIVATE KEY-----, with no passphrase. This is what the console's Generate API key pair downloads.-----BEGIN ENCRYPTED PRIVATE KEY-----(encrypted PKCS#8), with its passphrase inpassphrase. This is whatoci setup keyswrites when you give it a passphrase. LimaCharlie reads PBES2 encryption with PBKDF2 (HMAC-SHA1 or HMAC-SHA256) or scrypt, and AES or 3DES. OpenSSL 3's default encrypted keys qualify.- An encrypted
-----BEGIN RSA PRIVATE KEY-----that has aProc-Type: 4,ENCRYPTEDheader, with its passphrase inpassphrase.
The OCI_API_KEY line that oci setup keys adds after the key can stay.
An encrypted key with another scheme (PBES1, PBKDF2 with HMAC-SHA512, or
ciphers such as Camellia) is refused: create the key with oci setup keys
instead. Public keys, OpenSSH keys and EC keys are refused too.
Create the provider record¶
In the wizard's Configuration step, enter the tenancy OCID, user OCID, fingerprint and home region. Regions to scan and Compartment OCID are optional. Then test and save.
The equivalent CLI configuration is below.
provider.yaml:
provider_type: oci
oci_tenancy_id: "ocid1.tenancy.oc1..<unique-id>"
oci_user_id: "ocid1.user.oc1..<unique-id>"
oci_fingerprint: "12:34:56:78:9a:bc:de:f0:12:34:56:78:9a:bc:de:f0"
oci_region: us-ashburn-1 # the tenancy HOME region
# oci_regions: [us-ashburn-1, eu-frankfurt-1] # optional; omit = every subscribed region
# oci_compartment_id: "ocid1.compartment.oc1..<unique-id>" # optional; omit = whole tenancy
credentials: hive://secret/oci-scanner
internal_domains: [example.com]
refresh: 6h
| Field | Required | Meaning |
|---|---|---|
oci_tenancy_id |
✅ | The tenancy OCID, ocid1.tenancy.… |
oci_user_id |
✅ | The scanner user's OCID, ocid1.user.… |
oci_fingerprint |
✅ | The API key's fingerprint: 16 colon-separated hex bytes |
oci_region |
✅ | The tenancy's home region identifier, like us-ashburn-1 or us-gov-ashburn-1 |
oci_regions |
Allow-list of region identifiers to scan. Empty means every region the tenancy subscribes to. Each entry must be a subscribed region | |
oci_compartment_id |
Collect only this compartment's subtree. Empty, or the tenancy OCID, means the whole tenancy | |
credentials |
✅ | hive://secret/<name>, the secret above |
All oci_* fields are rejected on any other provider_type, and an unknown
field on the record is an error, as for every provider.
Whole tenancy or one compartment¶
- Whole tenancy (paid plans). Leave
oci_compartment_idempty. Every compartment is collected, in every subscribed region (or the ones inoci_regions). - One compartment. Set
oci_compartment_idto a compartment OCID. That compartment and the compartments inside it are collected. Use the one-compartment policy. - Free tier. A connection covers one compartment and nothing inside it.
oci_compartment_idis required and must be a compartment, not the tenancy. Saving a free-tier connection with an emptyoci_compartment_id, or one set to the tenancy OCID, is rejected with an explanation. See free tier and limits.
Resources your compartment depends on may live in another compartment, for example a shared network compartment. LimaCharlie cannot read those on a one-compartment connection, so their rules are missing from the exposure calculation.
Infrastructure as code¶
The provider record is a cloudsec_provider Hive record, so it deploys like any
other. The secret is created separately and is never synced to Git.
# 1. The secret, as above (oci-scanner).
# 2. The record, with an enabled flag:
limacharlie hive set --hive-name cloudsec_provider --key oci-prod \
--oid $OID --input-file provider.yaml --enabled
Or as part of a limacharlie sync configuration, one entry per tenancy:
hives:
cloudsec_provider:
oci-prod:
data:
provider_type: oci
oci_tenancy_id: "ocid1.tenancy.oc1..<unique-id>"
oci_user_id: "ocid1.user.oc1..<unique-id>"
oci_fingerprint: "12:34:56:78:9a:bc:de:f0:12:34:56:78:9a:bc:de:f0"
oci_region: us-ashburn-1
credentials: hive://secret/oci-scanner
refresh: 6h
usr_mtd:
enabled: true
Push it with limacharlie sync push --config-file cloudsec.yaml
--hive-cloudsec-provider. See
Cloud Security API & IaC
for the sync flags and Git Sync.
Verify¶
The report opens with the config and credential checks common to every
provider, documented once in Provider Setup;
the OCI-specific checks follow. Each optional check is one policy statement, and
its failure names the statement that looks missing.
| Check | Required | Meaning if it fails |
|---|---|---|
auth |
✅ | OCI refused the signature. The user OCID, fingerprint and private key must belong to the same API key, and that key must be uploaded to that user. A key that works but fails here means the policy is missing or is not in the root compartment |
home_region |
✅ | oci_region is not the tenancy's home region, an entry in oci_regions is not subscribed, or inspect tenancies is missing |
compartment |
✅ | Only with oci_compartment_id: the compartment is not an active compartment of this tenancy, or inspect compartments is missing |
compute |
— | read instances is missing: no instance inventory |
network |
— | The inspect all-resources statement is missing: no VCNs, subnets, security lists or gateways |
network_security_groups |
— | read network-security-groups is missing: NSG rules are not read, and exposure through NSGs is not computed |
load_balancers, network_load_balancers |
— | The matching read statement is missing: no load balancers of that type |
object_storage |
— | read buckets is missing: no bucket settings |
mysql |
— | read mysql-instances is missing |
container_engine |
— | read cluster-family is missing: no OKE clusters |
api_gateway |
— | read api-gateways is missing |
vault |
— | read vaults, read keys or read secrets is missing |
certificates |
— | read leaf-certificates is missing |
bastion |
— | read bastion is missing |
logging |
— | read log-groups is missing: flow-log and write-log checks stay unassessed |
notifications |
— | read ons-topics is missing |
vulnerability_scanning |
— | read vss-family is missing: no host vulnerabilities |
events |
— | read cloudevents-rules is missing: the CIS notification checks stay unassessed |
cloud_guard |
— | read cloud-guard-config is missing |
budgets |
— | read usage-budgets is missing |
iam_users |
— | read users is missing: no API key, MFA or credential-age data |
iam_policies |
— | inspect policies is missing (see below): no effective permissions |
identity_domains |
— | read domains is missing |
A failed optional check leaves that part of the inventory unobserved. It never fails the sweep or deletes rows already collected. A control that needs the unread data reports NOT_ASSESSED, not PASS.
Regions and refresh¶
- LimaCharlie reads every region the tenancy is subscribed to, or only the ones
in
oci_regions. A region that is still being subscribed is skipped until it is ready. - Identity data (users, groups, dynamic groups, identity domains) is read once, from the home region.
- OCI is collected by a periodic sweep, every
refresh(default 6 hours). There is no change feed for OCI yet, so usesync_nowfor an on-demand sweep.
CIS OCI Foundations benchmark¶
The cis-oci-v3-1 framework covers the
CIS Oracle Cloud Infrastructure Foundations Benchmark
v3.1.0. It lists all 54 recommendations: 43 automated, 7 partly automated and 4
manual.
- Automated controls are graded from what LimaCharlie reads.
- Partly automated controls can FAIL from what is read, but a PASS also needs your attestation. Without one they report NOT_ASSESSED.
- Manual controls are NOT_ASSESSED until you attest.
- A control whose data was not read, for example because a policy statement is missing, reports NOT_ASSESSED and names what was missing.
Three recommendations cannot be assessed with a read-only policy, so they never report PASS from LimaCharlie alone:
- Audit log retention (365 days). Reading the audit configuration needs a permission no read-only verb grants.
- API Gateway route authentication. It lives in deployment specs, which the policy does not grant (see What we never read).
- API key last use. It needs the audit log.
See Compliance for how reports and scoped assignments work.
Findings are scoped per compartment¶
Each OCI finding has the compartment of the resource it is about as its
account. The account filter, suppression rules (account), compliance
assignment scopes and the per-account rollups all use it:
| Finding about | Account |
|---|---|
| A resource (instance, bucket, NSG rule, database, …) | The compartment the resource is in |
| A compartment | That compartment |
| A user, group, dynamic group, identity provider or identity domain | The root compartment (the tenancy OCID) |
| An IAM policy | The compartment the policy is attached to |
| An attack path | The compartment of the path's entry, the exposed resource. A path from a web server in App to a bucket in Data belongs to App. A path that starts outside your tenancy, such as another tenancy's group, belongs to the first of your resources it reaches |
Access by a public or external principal (public-or-external-access-to-sensitive, such as another tenancy's group admitted into yours) |
No compartment, because the finding is about the principal, which is not one of your resources. Assignments scoped to a compartment include it, and account suppression rules do not match it |
| A rollup, such as default security lists | One finding per compartment |
When you move a resource to another compartment, its findings move with it on
the next sweep and keep their IDs. Events (cloud_resource.*) carry the same
account. In a compliance assignment scoped to a child compartment, a control
about IAM policies FAILs on a policy attached there. Otherwise it is
NOT_APPLICABLE, because policy inventory counts in the root compartment.
Policy statements that are not evaluated¶
Effective permissions and identity attack paths come from your IAM policy text.
When a statement cannot be evaluated in full, LimaCharlie lists it rather than
guess what it grants. Examples are a resource type OCI does not document, or a
group that does not exist. The same report lists every Endorse statement that
lets one of your groups act in another tenancy. Those are not drawn as graph
edges, because the other tenancy is not collected.
The report is part of the tenancy's account record:
oci_policy_report holds the number of policies and statements read, then
issues (each statement with its policy, compartment and the reason it was
not evaluated) and endorsements (the group, the target tenancy, the actions
and any condition). When the report cannot be built, the record carries
oci_policy_report_error instead. The policy LimaCharlie asks you to create
produces no issues.
Known gaps¶
- No audit data. Audit log retention and API key last use are not read.
- No event feed. Changes are picked up by the periodic sweep.
- Account rules name one compartment. An
accountin an exclusion, suppression or compliance assignment that is a compartment OCID matches that compartment only, not the compartments inside it. The tenancy OCID matches only the root compartment. List every compartment you want to cover. - How internet exposure is decided. Security-list and NSG rules are matched to instances, load balancers and databases by VCN and attachment. An instance or load balancer is internet-exposed only when all of these hold:
- a rule admits the whole internet (
0.0.0.0/0or::/0). For a load balancer, the rule must cover one of its listener ports; - its subnet's route table sends the internet to an internet gateway (or to a private IP, such as a firewall appliance). Routes to a NAT gateway, a service gateway, a DRG or a local peering gateway do not count;
- if the admitting rule is stateless, an egress rule on the same resource also lets the answer out to the internet.
When a subnet or route table cannot be read, the resource keeps its exposure. A load balancer's rules are checked only when the connection covers the whole tenancy, no collection exclusion can remove network rules, and all its subnets were read. Otherwise an active public load balancer with a listener counts as exposed.
Databases are not judged by these checks. A database's internet exposure comes from its own settings: a public endpoint, and the access list that guards it. Inside the VCN, the same rules decide which instances can reach a database.
Limits that can over-report, never hide: a more specific route that overrides
part of an internet route is not considered, nor is an internet gateway that is
turned off; one VNIC's route counts for every public IP of a multi-VNIC
instance; lateral paths between resources do not check stateless return rules.
The plaintext-listener finding on a public load balancer checks its routes but
not its NSGs.
- Dynamic groups. An instance or function gets its dynamic groups from
matching rules on its OCID, compartment and defined tags. A rule on anything
else is not evaluated, and API
gateways and other resource principals get no dynamic-group identity.
- Identity domain sign-on policies are not read, so "console MFA required"
and the domain session timeout stay unknown. Per-user MFA is read.
- WAF and Network Firewall policies are not collected as rows yet, and Cloud
Guard recipes and certificate authorities are not collected as rows.
- Function configuration is never read, so environment variables are not
checked.
- Container Registry images are not listed, because that needs read repos
(image pulls). Repositories are inventoried, images are not, and OCIR images
carry no vulnerability rows.
- Vulnerabilities come from the Vulnerability Scanning Service. A host it
does not scan, because no host scan target covers it or the Oracle Cloud Agent's
vulnerability scanning plugin is off, has no vulnerability rows.
- Autonomous Databases on dedicated Exadata infrastructure are listed, but
their container database and Exadata settings are not read.
- Data volume attachments are not read. The policy keeps them out because
they return the iSCSI CHAP secret, so a data volume does not show which
instance it is attached to or whether that attachment encrypts in transit.
Boot volumes do.
- Pre-authenticated requests are not collected yet.
- Cross-compartment reads. A boot volume attachment, key, secret or mount target
in a compartment outside the connection's scope is not read. On a
one-compartment connection this includes shared networks.
Join sensors to OCI instances¶
Cloud Security can match a LimaCharlie sensor to the OCI instance it runs on, so a finding on an instance links to the live endpoint and the other way around. The sensor reads its instance OCID, compartment and region from the instance metadata service (IMDSv2) and reports them when it connects. The collector stores the same identity on the instance row.
Coming in an upcoming sensor release
Reporting the OCI instance identity needs a sensor version that is not released yet. Until then, OCI instances are inventoried and checked, but no sensor resolves onto them. An unprotected-workload expectation in CAASM would flag every OCI instance until the sensors report.
The join works with IMDSv2, which the sensor requests. An instance that has IMDS disabled cannot report its identity.
Troubleshooting¶
provider test result |
Cause | Fix |
|---|---|---|
auth fails with "refused the signature" |
The fingerprint, user OCID and key do not belong together, or the public key was uploaded to a different user | Check the API keys tab of the scanner user: its fingerprint must match oci_fingerprint, and the user OCID must match oci_user_id |
auth fails with "the API key works, but the policy does not let this user read the tenancy" |
The policy is missing, is not in the root compartment, or names a different group or domain | Create the policy in the root compartment and check the group name, and the domain in the subject |
| The credential check says the key is encrypted and the secret has no passphrase | The key has a passphrase and passphrase is empty |
Add the passphrase to the secret |
| The credential check says the key is not readable | The key is an EC key, an OpenSSH key, a public key, or an encrypted key with a scheme LimaCharlie cannot read, or the passphrase is wrong | See Key format |
home_region fails: "the tenancy's home region is … not …" |
oci_region holds a subscribed region that is not the home region |
Set oci_region to the home region. Limit regions with oci_regions |
home_region fails: "the tenancy does not subscribe to …" |
An oci_regions entry is not a subscribed region |
Remove it, or subscribe the tenancy to that region |
| Optional checks fail for a compartment-scoped policy | A <compartment OCID> placeholder was not replaced |
Replace every placeholder with the compartment's OCID |
| A resource you expect is missing | It is in a compartment outside oci_compartment_id, in a region not in oci_regions, or the matching optional check failed |
Run provider test and check which statement it names |
| Identity data is missing or stale | An API key and policy can take a few minutes to take effect after you create them | Retry the test after a few minutes |