Prerequisites
Before you begin, ensure you have:-
Prowler installed with OCI dependencies:
-
OCI Python SDK (automatically installed with Prowler):
- OCI Account Access with appropriate permissions to read resources in your tenancy.
Authentication
Prowler supports multiple authentication methods for OCI. For detailed authentication setup, see the OCI Authentication Guide. Note: OCI Session Authentication and Config File Authentication both use the same~/.oci/config
file. The difference is how the config file is generated - automatically via browser (session auth) or manually with API keys.
Quick Start: OCI Session Authentication (Recommended)
The easiest and most secure method is using OCI session authentication, which automatically generates your config file via browser login. Prerequisites: You need to have the OCI CLI installed. See the OCI CLI Installation Guide for installation instructions.-
Authenticate using the OCI CLI:
This will open your browser for OCI Console login and automatically generate the config file.
-
Add your user OCID to
~/.oci/config
: Get your user OCID from the OCI Console: Navigate to: Identity & Security → Users → Click on your username → Copy the OCID Direct link: OCI Console - Users Or use the OCI CLI:Edit~/.oci/config
and add theuser
parameter: -
Run Prowler:
Alternative: Manual API Key Setup
If you prefer to manually generate API keys instead of using browser-based session authentication, see the detailed instructions in the Authentication Guide. Note: Both methods use the same~/.oci/config
file - the difference is that manual setup uses static API keys while session authentication uses temporary session tokens.
Using a Specific Profile
If you have multiple profiles in your OCI config:Using a Custom Config File
2. Instance Principal Authentication
IMPORTANT: This authentication method only works when Prowler is running inside an OCI compute instance. If you’re running Prowler from your local machine, use OCI Session Authentication instead. When running Prowler on an OCI Compute instance, you can use Instance Principal authentication:- Prowler must be running on an OCI compute instance
- The compute instance must have a dynamic group and policy allowing access to OCI resources
- Example policy:
Basic Usage
Scan Entire Tenancy
Scan Specific Region
Scan Specific Compartments
Run Specific Checks
Run Specific Services
Compliance Frameworks
Run CIS OCI Foundations Benchmark v3.0:Required Permissions
Prowler requires read-only permissions to audit your OCI tenancy. Below are the minimum required permissions:Tenancy-Level Policy
Create a groupprowler-users
and add your user to it, then create this policy:
Service-Specific Permissions
For more granular control, you can grant specific permissions:Output Formats
Prowler supports multiple output formats for OCI:JSON
CSV
HTML
Multiple Formats
Common Scenarios
Security Assessment
Full security assessment with CIS compliance:Continuous Monitoring
Run specific security-critical checks:Compartment-Specific Audit
Audit a specific project compartment:Troubleshooting
Authentication Issues
Error: “Could not find a valid config file”- Ensure
~/.oci/config
exists and is properly formatted - Verify the path to your API key is correct
- Check file permissions:
chmod 600 ~/.oci/config ~/.oci/oci_api_key.pem
- Verify the API key fingerprint matches the one in OCI Console
- Ensure the public key is uploaded to your OCI user account
- Check that the private key file is accessible
Permission Issues
Error: “Authorization failed or requested resource not found”- Verify your user has the required policies (see Required Permissions)
- Check that policies apply to the correct compartments
- Ensure policies are not restricted by conditions that exclude your user
Region Issues
Error: “Invalid region”- Check available regions:
prowler oci --list-regions
- Verify your tenancy is subscribed to the region
- Use the region identifier (e.g.,
us-ashburn-1
), not the display name
Advanced Usage
Using Mutelist
Create a mutelist file to suppress specific findings:Custom Checks Metadata
Override check metadata:Filtering by Status
Only show failed checks:Filtering by Severity
Only show critical and high severity findings:Next Steps
- Learn about Compliance Frameworks in Prowler
- Review Prowler Output Formats
- Explore Integrations with SIEM and ticketing systems