More Info:
The OCI IAM password policy should enforce a minimum password length of 14 characters. Short passwords are vulnerable to brute-force attacks and dictionary-based crackingRisk 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 AWS
- CIS Critical Security Controls v8
- CMMC 2.0
- CSA Cloud Controls Matrix v4
- Cloudanix Best Practice
- DPDPA
- Digital Operational Resilience Act (EU)
- GDPR
- HIPAA
- HITRUST CSF
- ISO 27001
- ISO/IEC 27017
- ISO/IEC 27018
- ISO/IEC 27701
- KSA PDPL
- MAS Technology Risk Management (Singapore)
- MITRE ATT&CK (Cloud)
- NIST
- NIST CSF
- NIST SP 800-171
- NYDFS 23 NYCRR 500
- PCI
- Reserve Bank of India (RBI) Cyber Security Framework
- Reserve Bank of India (RBI) Master Direction – Information Technology Framework
- SOC2
- SWIFT Customer Security Controls Framework
- Sarbanes-Oxley IT General Controls
- UK NCSC Cyber Assessment Framework
Triage and Remediation
- Remediation
Remediation
Using Console
Using Console
Here’s how to set the IAM password policy to require a minimum of 14 characters in OCI using the Console:
Navigation menu → Identity & Security → Security → Password Policy → Edit → Set minimum length to 14 → Save.
-
Sign in to OCI Console
Log in to the Oracle Cloud Console with an account that has tenancy-level IAM admin privileges (e.g.,Administratorgroup). -
Go to Identity & Security
- Open the Navigation menu (≡) in the top left.
- Under Identity & Security, click Domains (or Identity > Domains depending on your Console layout).
-
Select the Target Domain
- You’ll see a list of identity domains (or the default one if you’re using the older model).
- Click the identity domain where your users are managed (often
Default).
-
Open Security Settings
- In the domain page, in the left-hand menu, click Security.
- Under Security, click Password Policies (or Password policy).
-
Edit the Password Policy
- On the Password Policy page, click Edit (or the pencil icon).
-
Set Minimum Password Length to 14
- Find the field Minimum password length (or similar).
- Change the value to 14.
- Review other password policy settings (complexity, reuse, lockout) as needed, but not required for this specific control.
-
Save the Policy
- Click Save or Save changes.
- The new minimum length applies to all new password changes and resets in that identity domain.
-
(Optional) Re-check in Monitoring/Cloud Guard
- If you’re using Cloud Guard or another OCI monitoring tool/policy that flagged this misconfiguration, wait a few minutes and re-run the check or assessment to confirm the issue is resolved.
Navigation menu → Identity & Security → Security → Password Policy → Edit → Set minimum length to 14 → Save.
Using CLI
Using CLI
To enforce a minimum 14-character password policy in OCI IAM using the OCI CLI, do the following:(or copy it from the Console: Profile → Tenancy: Look at the output under Adjust booleans as needed, but keep This should return:That enforces a minimum 14-character password policy in OCI IAM via OCI CLI.
1. Prerequisites
- OCI CLI installed and configured (
oci setup config) - You have permission to manage the tenancy’s authentication policy (e.g.,
identity-domains-authentication-policiesor tenancy admin).
2. Get Your Tenancy OCID
If you don’t already have it:<name> → OCID)3. View Current Authentication Policy
passwordPolicy. You’ll see fields like minimumPasswordLength, isLowercaseCharactersRequired, etc.4. Update Password Policy to Require Minimum 14 Characters
You can either:Option A – Provide full password policy JSON inline
If you want to explicitly define the full policy (recommended when you know the desired settings):"minimumPasswordLength": 14.Option B – Modify only the minimum length (using a file)
- Save the existing policy from step 3 into a file (for example,
auth-policy.json) and edit it:- Under
"passwordPolicy", set:
- Under
- Apply the updated policy:
5. Verify the Change
Run:Using Python
Using Python
To enforce a minimum 14-character password policy in OCI IAM using Python, you need to update the tenancy’s Authentication Policy via the OCI Python SDK.
This ensures your OCI IAM password policy always requires at least 14 characters.
1. Prerequisites
-
Install OCI Python SDK (if not already):
-
Configure OCI CLI/SDK config (tenancy OCID, user OCID, key, region, etc.), usually at:
~/.oci/configwith a profile, e.g.[DEFAULT]. -
Your user must have IAM permissions similar to:
2. Find Your Tenancy OCID
You can get it from the OCI Console:- Profile (top-right) → Tenancy: click it → copy OCID.
3. Python Code: Update Password Policy to Minimum 14 Characters
4. Notes for “Monitoring / Auto-remediation”
If this is driven by a monitoring system (e.g., a Cloud Security Posture tool) and you want auto-remediation:- Wrap this script into:
- An OCI Function, or
- A scheduled OCI DevOps/cron job, or
- An external scheduler (Jenkins, GitHub Actions, etc.)
- Trigger it whenever a misconfiguration is detected (e.g., from a security scan event, webhook, or scheduled check).
- Optionally first check and only update if
minimum_password_length < 14.
Using Terraform
Using Terraform
terraform plan should show an in-place update in-place on oci_identity_authentication_policy.iam_password_policy with minimum_password_length changing from its current value to 14.
