Triage and Remediation
- Remediation
Remediation
Using Console
Using Console
To require uppercase characters in OCI IAM passwords using the OCI Console:
Identity & Security → Security → Authentication Settings → Password Policy, then enable Require Uppercase Characters there and save.
-
Sign in to OCI Console
Log in with a user that has tenancy-level / domain admin privileges. -
Go to Identity Domains
- Open the hamburger menu (☰) in the top-left.
- Navigate to: Identity & Security → Domains.
-
Select the Appropriate Identity Domain
- Click on the identity domain you use for your IAM users (often named Default unless you created others).
-
Open the Password Policy Settings
- In the left-hand menu for that domain, go to:
Security → Password Policy
(In some UIs, it may be under Security → Authentication Settings → Password Policy.)
- In the left-hand menu for that domain, go to:
-
Edit the Password Policy
- Click Edit (or Edit Password Policy).
-
Enable Uppercase Requirement
- Locate the setting similar to:
- Require uppercase letters / Minimum uppercase characters.
- Turn on Require uppercase letters (or set minimum uppercase characters to at least 1).
- Locate the setting similar to:
-
Save Changes
- Click Save / Update to apply the new policy.
-
Verify
- Try creating or changing a test user’s password: the UI should now enforce at least one uppercase character.
Identity & Security → Security → Authentication Settings → Password Policy, then enable Require Uppercase Characters there and save.
Using CLI
Using CLI
To enforce “Require Uppercase Characters” in the OCI IAM password policy using the OCI CLI, do the following:
This file contains the existing password policy.
Ensure it containsIf other
Confirm the output shows:This will remediate the “OCI IAM Password Policy Should Require Uppercase Characters” finding used by OCI IAM/Cloud Guard monitoring.
1. Prerequisites
- OCI CLI installed and configured (
oci setup config) - You know your tenancy OCID (from Console: Profile → Tenancy Details)
2. Get current authentication (password) policy
3. Edit the password policy JSON
Opencurrent-auth-policy.json and locate the passwordPolicy block.Ensure it contains
"isUppercaseCharactersRequired": true.Example minimal structure:passwordPolicy fields exist (length, numeric, lowercase, etc.), keep them as-is and only change/add isUppercaseCharactersRequired.4. Update the authentication policy with OCI CLI
Save your edited JSON asupdated-auth-policy.json, then run:5. Verify the change
Using Python
Using Python
To fix “OCI IAM Password Policy Should Require Uppercase Characters” using Python, you need to update the tenancy’s Authentication Policy via the OCI Python SDK.Below are step-by-step instructions and a sample remediation script.
1. Prerequisites
-
Install the OCI Python SDK:
-
Configure your
~/.oci/configwith a profile that has IAM permissions on the tenancy (e.g.,Tenancy Adminor a policy allowingMANAGE authentication-policieson the tenancy):
2. Python Script to Enforce Uppercase Requirement
This script:- Fetches current authentication (password) policy.
- Sets
is_uppercase_characters_requiredtoTrue(and preserves other settings). - Updates the tenancy authentication policy if needed.
3. How to Use This for “Monitoring + Remediation”
-
Monitoring:
- Run the “get” part (
get_authentication_policy) on a schedule (e.g., via a cron job, OCI Functions, or OCI DevOps pipeline). - If
password_policy.is_uppercase_characters_required is False, log an alert (or push a metric/event).
- Run the “get” part (
-
Auto-remediation:
- Keep the script as is and run it on a schedule or trigger it from an OCI Function when a detector (e.g., from OCI Cloud Guard or your own check) finds the misconfiguration.
- The script is idempotent: if uppercase is already required, it does nothing.
Using Terraform
Using Terraform
terraform plan should show an in-place update (~) to oci_identity_authentication_policy.iam_password_policy with is_uppercase_characters_required changing from false (or null) to true.
