Skip to main content

More Info:

The OCI IAM password policy should require at least one numeric character. Including numbers in passwords increases the keyspace and strengthens protection against brute-force attacks

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

To require numeric characters in the OCI IAM password policy using the OCI Console:
  1. Sign in to the OCI Console
    Log in with an account that has tenancy-level administrator or security admin privileges.
  2. Go to Identity Domains
    • Open the navigation menu (☰).
    • Select Identity & Security (or Identity & Security → Identity depending on your console layout).
    • Click Domains.
    • Click the identity domain where your IAM users reside (often named Default).
  3. Open Password Policy Settings
    Inside the selected domain:
    • In the left-hand menu, go to Security.
    • Click Password policy (or Authentication settings → Password policy if shown that way).
  4. Enable Numeric Character Requirement
    In the password policy configuration:
    • Locate the option similar to Require numbers in passwords or Must contain at least one number.
    • Check or toggle this option ON.
    • Confirm or adjust related fields if present (for example, minimum password length, uppercase, lowercase, special characters) to match your security standards.
  5. Save the Policy
    • Click Save, Update, or Apply (button text may vary slightly).
    • Confirm any prompt indicating that the new policy will apply to all future password changes/resets for users in this domain.
  6. (Optional) Validate via IAM Monitoring / Security Posture
    • If you use OCI Cloud Guard or Security Zones for monitoring:
      • Go to Navigation menu → Identity & Security → Cloud Guard.
      • Ensure the target (tenancy/compartment) including this identity domain is monitored.
      • Check that the IAM Password Policy detector family (or equivalent) is enabled so future drift (e.g., disabling numeric requirement) will raise a new problem.
Once saved, new and changed passwords must include at least one numeric character, resolving the “OCI IAM Password Policy Should Require Numeric Characters” finding.
To require numeric characters in OCI IAM passwords via OCI CLI, update the tenancy’s authentication policy.

1. Prereqs

  • OCI CLI configured (oci setup config)
  • Your tenancy OCID (from Console: Profile → Tenancy Information).

2. Get current password policy

This file will contain something like:

3. Edit the policy to require numeric characters

Open current-auth-policy.json and set:
Ensure you keep all other existing fields as they are; OCI expects the full object.The final file should look like:
Save as updated-auth-policy.json.

4. Apply the updated authentication policy

5. Verify

Should return true.This change will cause new/changed passwords in that tenancy to require at least one numeric character, which will clear the related IAM monitoring / compliance finding.
To require numeric characters in the OCI IAM password policy using Python, you need to update the tenancy’s Authentication Policy via the OCI Python SDK.Below are the minimal, step‑by‑step instructions.

1. Prerequisites

  1. Install OCI Python SDK:
  1. Ensure you have an OCI config file (usually ~/.oci/config) with:
  • Tenancy OCID
  • User OCID
  • API key + fingerprint
  • Region
  • A profile name (e.g., DEFAULT)

2. Get Your Tenancy OCID

You can find it in:
  • OCI Console → Governance & Administration → Tenancy details
    or in your ~/.oci/config as tenancy=.
You must pass this tenancy OCID to the script.

3. Python Script to Enable Numeric Characters in Password Policy

This script:
  • Fetches the current authentication policy
  • Sets is_numeric_characters_required = True
  • Preserves all other existing password-policy settings

4. Verification

  1. In the OCI Console, go to:
    • Identity & Security → Domains (or Identity → Authentication Policy, depending on tenancy type)
    • Check the password policy for the tenancy.
  2. Confirm “Require numbers” / numeric characters is enabled.

5. Integrating with Monitoring / Compliance

If you’re using a monitoring/compliance tool (e.g., custom script, Cloud Guard target):
  • Run this Python code as a remediation step when a rule detects that is_numeric_characters_required is False.
  • Optional: add a pre-check snippet that only calls update_authentication_policy if the flag is currently False (to keep it idempotent).
This change does not force replacement of the resource; it updates the existing tenancy password policy in place.To verify, terraform plan should show an in‑place update (~) of oci_identity_password_policy.iam_password_policy with is_numeric_characters_required changing from false (or unset) to true.