Skip to main content

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 cracking

Risk Level

Medium

Address

Compliance, Security

Compliance 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

Using Console

Here’s how to set the IAM password policy to require a minimum of 14 characters in OCI using the Console:
  1. Sign in to OCI Console
    Log in to the Oracle Cloud Console with an account that has tenancy-level IAM admin privileges (e.g., Administrator group).
  2. 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).
  3. 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).
  4. Open Security Settings
    • In the domain page, in the left-hand menu, click Security.
    • Under Security, click Password Policies (or Password policy).
  5. Edit the Password Policy
    • On the Password Policy page, click Edit (or the pencil icon).
  6. 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.
  7. Save the Policy
    • Click Save or Save changes.
    • The new minimum length applies to all new password changes and resets in that identity domain.
  8. (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.
If your tenancy still uses the older “Identity > Security > Password Policy” layout at tenancy level, the steps are the same conceptually:
Navigation menu → Identity & SecuritySecurityPassword PolicyEdit → Set minimum length to 14 → Save.
To enforce a minimum 14-character password policy in OCI IAM using the OCI CLI, do the following:

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-policies or tenancy admin).

2. Get Your Tenancy OCID

If you don’t already have it:
(or copy it from the Console: Profile → Tenancy: <name> → OCID)

3. View Current Authentication Policy

Look at the output under 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):
Adjust booleans as needed, but keep "minimumPasswordLength": 14.

Option B – Modify only the minimum length (using a file)

  1. Save the existing policy from step 3 into a file (for example, auth-policy.json) and edit it:
    • Under "passwordPolicy", set:
  2. Apply the updated policy:

5. Verify the Change

Run:
This should return:
That enforces a minimum 14-character password policy in OCI IAM via OCI CLI.
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.

1. Prerequisites

  1. Install OCI Python SDK (if not already):
  2. Configure OCI CLI/SDK config (tenancy OCID, user OCID, key, region, etc.), usually at: ~/.oci/config with a profile, e.g. [DEFAULT].
  3. 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.
Or from your config file:

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.
Example quick check:
This ensures your OCI IAM password policy always requires at least 14 characters.
This updates the tenancy-level IAM password policy without forcing replacement of the resource; it will be an in‑place update.Verification with 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.