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 attacksRisk 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
To require numeric characters in the OCI IAM password policy using the OCI Console:
-
Sign in to the OCI Console
Log in with an account that has tenancy-level administrator or security admin privileges. -
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).
-
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).
-
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.
-
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.
-
(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.
- If you use OCI Cloud Guard or Security Zones for monitoring:
Using CLI
Using CLI
To require numeric characters in OCI IAM passwords via OCI CLI, update the tenancy’s authentication policy.This file will contain something like:Ensure you keep all other existing fields as they are; OCI expects the full object.The final file should look like:Save as Should return
1. Prereqs
- OCI CLI configured (
oci setup config) - Your tenancy OCID (from Console: Profile → Tenancy Information).
2. Get current password policy
3. Edit the policy to require numeric characters
Opencurrent-auth-policy.json and set:updated-auth-policy.json.4. Apply the updated authentication policy
5. Verify
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.Using Python
Using Python
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
- Install OCI Python SDK:
- 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/configastenancy=.
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
- In the OCI Console, go to:
- Identity & Security → Domains (or Identity → Authentication Policy, depending on tenancy type)
- Check the password policy for the tenancy.
- 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_requiredis False. - Optional: add a pre-check snippet that only calls
update_authentication_policyif the flag is currently False (to keep it idempotent).
Using Terraform
Using Terraform
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.
