
iam-identity-management
Use when writing IAM policies, troubleshooting permission denied errors, setting up dynamic groups, or implementing IDCS integration. Covers policy syntax gotchas, principal types confusion, compartment inheritance, and common authorization failures.
- Installs
- 97
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/acedergren/oci-agent-skills --skill iam-identity-management- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads iam-identity-management automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
OCI IAM and Identity Management - Expert Knowledge
🏗️ Use OCI Landing Zone Terraform Modules
Don't reinvent the wheel. Use oracle-terraform-modules/landing-zone for IAM structure.
Landing Zone solves:
- ❌ Bad Practice #1: Flat compartments (Landing Zone provides hierarchical structure)
- ❌ Bad Practice #2: Administrator for daily ops (Landing Zone enforces least privilege)
- ❌ Bad Practice #6: Manual IAM policies (Landing Zone provides CIS-compliant IaC)
This skill provides: IAM syntax, troubleshooting, and policy patterns for resources deployed WITHIN a Landing Zone.
⚠️ OCI CLI/API Knowledge Gap
You don't know OCI CLI commands or OCI API structure.
Your training data has limited and outdated knowledge of:
- OCI CLI syntax and parameters (updates monthly)
- OCI API endpoints and request/response formats
- IAM service CLI operations (
oci iam policy,oci iam dynamic-group) - Policy verb/resource combinations (OCI-specific, not AWS/Azure)
- Latest IAM features and Identity Domains
When OCI operations are needed:
- Use exact CLI commands from this skill's references
- Do NOT guess OCI IAM policy syntax
- Do NOT assume AWS/Azure IAM patterns work in OCI
- Load reference files for detailed IAM policy documentation
What you DO know:
- General IAM concepts (principals, policies, groups)
- Role-based access control principles
- Least privilege security concepts
This skill bridges the gap by providing current OCI-specific IAM patterns and syntax.
You are an OCI IAM expert. This skill provides knowledge Claude lacks: policy syntax gotchas, permission troubleshooting, dynamic group patterns, and OCI-specific IAM operational knowledge.
NEVER Do This
❌ NEVER use overly broad policies (security risk)
# WRONG - grants admin access to everyone
Allow any-user to manage all-resources in tenancy
# WRONG - too broad for production
Allow group Developers to manage all-resources in compartment Production
# RIGHT - least privilege, specific resources
Allow group AppDevelopers to manage instance-family in compartment AppDev where target.instance.name =~ 'dev-*'
❌ NEVER forget compartment hierarchy in policies
# WRONG - policy in child compartment can't access parent resources
Policy location: Compartment A/B/C
"Allow group X to read buckets in compartment A" # Fails! Policy must be in A or above
# RIGHT - policy must be at or above target location
Policy location: Compartment A (or root)
"Allow group X to read buckets in compartment A"
❌ NEVER mix up principal types (causes "not authorized" errors)
# WRONG - instance is NOT a user
Allow user <instance-ocid> to read buckets in compartment X
# RIGHT - use dynamic group for instances
Allow dynamic-group app-instances to read buckets in compartment X
❌ NEVER hardcode resource OCIDs in dynamic group rules
# WRONG - not scalable, breaks when instance replaced
ALL {instance.id = 'ocid1.instance.oc1.phx.xxxxx'}
# RIGHT - use compartment or tag matching
ALL {instance.compartment.id = '<compartment-ocid>'}
ANY {instance.freeform-tags.environment = 'production'}
❌ NEVER create circular policy dependencies
# WRONG - Group A needs policy to manage Group B, but Group B policy grants access to Group A
# Creates deadlock where neither can be created first
# RIGHT - use separate administrative groups with clear hierarchy
❌ NEVER use "any-user" in production policies (security audit failure)
# WRONG - grants access to ALL users including future unknown users
Allow any-user to read buckets in tenancy
# RIGHT - explicit group membership
Allow group DataReaders to read buckets in compartment SharedData
Cost impact: $10,000+ per compliance violation finding in SOC2/HIPAA audits
IAM Permission Troubleshooting
"404 - NotAuthorizedOrNotFound"
This error means EITHER:
- Resource doesn't exist, OR
- User lacks permission to see if resource exists
Troubleshooting decision tree:
404 NotAuthorizedOrNotFound?
│
├─ Does resource definitely exist?
│ ├─ YES → Permission issue
│ │ └─ Check: Does user have 'inspect' or 'read' permission?
│ │ └─ Check: Is policy in correct compartment (at or above target)?
│ └─ NO → Resource doesn't exist
│ └─ Verify OCID, compartment, region
│
├─ Using dynamic group/instance principal?
│ └─ Check: Is instance in dynamic group?
│ └─ `oci compute instance get --instance-id <ocid>` (shows compartment, tags)
│ └─ Verify matching-rule matches instance properties
│
└─ Cross-compartment access?
└─ Policy must be in compartment that CONTAINS both source and target
OR in root compartment
"403 - NotAuthorized"
Clear permission denied. User/principal identified but lacks permission.
Common causes:
- Missing verb: Policy has
readbut action needsuseormanage - Wrong resource-type: Policy grants
instance-familybut trying to accessvolume-family - Condition doesn't match: Policy has
where target.instance.name = 'prod-*'but instance isdev-web-1 - Policy not in effect yet: Policies take 10-60 seconds to propagate
Verb hierarchy (each includes permissions below):
inspect < read < use < manage
Policy Syntax Gotchas
Resource Type Families (Often Confused)
| Family | Includes | Common Mistake |
|---|---|---|
instance-family | instances, instance-consoles, instance-console-connections, vnics, vnic-attachments | Thinking it includes volumes (it doesn't) |
volume-family | volumes, volume-backups, volume-attachments | Separate from instances |
object-family | buckets, objects | Objects are separate resources |
database-family | db-systems, databases, autonomous-databases | Very broad |
all-resources | Everything | Use sparingly - security risk |
Location Syntax
# Compartment (specific)
in compartment <compartment-name or ocid>
# Compartment + descendants
in compartment <compartment-name> where target.compartment.id = <ocid>
# Tenancy (root)
in tenancy
# Specific resource (rare, for delegation)
in resource <resource-ocid>
Conditions (WHERE clause)
# Tag-based conditions
where target.resource.tag.environment = 'production'
where target.resource.freeform-tags.CostCenter = 'Engineering'
# Resource name patterns
where target.instance.name =~ 'web-*' # Regex match
# Request properties
where request.operation = 'LaunchInstance'
where request.region = 'us-phoenix-1'
# Multiple conditions
where all {target.resource.tag.env = 'prod', target.compartment.name = 'AppProd'}
where any {target.instance.shape = 'VM.Standard.E4.Flex', target.instance.shape = 'VM.Standard.A1.Flex'}
Dynamic Group Patterns
Matching Rules Best Practices
By Compartment (most common):
ALL {instance.compartment.id = '<compartment-ocid>'}
By Tag (flexible):
ANY {instance.freeform-tags.app = 'webserver'}
By Multiple Criteria (restrictive):
ALL {instance.compartment.id = '<comp-ocid>', instance.freeform-tags.environment = 'production'}
Common Mistake: Using instance.id (specific instance) instead of instance.compartment.id (all instances in compartment)
Testing Dynamic Group Membership
# 1. Get instance details to see compartment/tags
oci compute instance get --instance-id <instance-ocid>
# 2. Check dynamic group matching rule
oci iam dynamic-group get --dynamic-group-id <group-ocid>
# 3. Verify rule matches instance properties
# Example: If rule is "instance.compartment.id = X"
# Check instance's compartment_id matches X
# 4. Test with actual API call from instance
# SSH to instance and run:
oci os ns get # Should work if instance principal configured correctly
Compartment Strategy Anti-Patterns
❌ WRONG: Flat structure (no organization)
Tenancy
├─ Application1 (mix of dev/test/prod)
├─ Application2 (mix of dev/test/prod)
└─ SharedServices
✅ RIGHT: Environment-based hierarchy
Tenancy
├─ Production
│ ├─ App1
│ └─ App2
├─ Development
│ ├─ App1
│ └─ App2
└─ SharedServices
├─ Networking
└─ Security
Benefits: Clear IAM boundaries, cost reporting by environment, blast radius containment
Authentication Methods (When to Use Each)
| Method | Use Case | Pros | Cons |
|---|---|---|---|
| API Key | Local dev, CI/CD runners outside OCI | Simple, portable | Manual rotation, key management |
| Instance Principal | Apps on OCI compute | No credentials, auto-rotation | Only works on OCI compute |
| Resource Principal | OCI Functions, Data Flow | Serverless auth | Limited to specific services |
| Session Token | Console federation via IDCS | SSO, MFA | Short-lived, complex setup |
IDCS Integration Gotchas
Federation Setup (OCI + IDCS):
- IDCS users map to OCI via federation
- Group membership in IDCS → OCI group mapping
- Critical: OCI group names must match IDCS group names exactly
Common Issues:
- User can log in to console but can't see resources → Missing OCI IAM policy for federated group
- "Invalid credentials" → IDCS federation not configured in OCI tenancy
- Group membership doesn't sync → OCI group name doesn't match IDCS group name
Progressive Loading References
OCI IAM Policies Reference (Official Oracle Documentation)
WHEN TO LOAD oci-iam-policies-reference.md:
- Need comprehensive IAM policy syntax and examples
- Writing complex policies with conditions
- Understanding service-specific verbs and permissions
- Implementing least privilege access patterns
- Troubleshooting policy evaluation order
Do NOT load for:
- Quick policy syntax examples (covered in this skill)
- Common permission patterns (decision trees above)
- Dynamic group rules (covered in this skill)
When to Use This Skill
- Writing IAM policies: syntax, verb selection, conditions
- Troubleshooting: 403/404 errors, authorization failures, permission debugging
- Dynamic groups: matching rules, testing membership, instance principals
- Compartment strategy: hierarchy design, policy placement
- IDCS integration: federation setup, group mapping, SSO troubleshooting
FAQ
What does the iam-identity-management skill do?
Use when writing IAM policies, troubleshooting permission denied errors, setting up dynamic groups, or implementing IDCS integration. Covers policy syntax gotchas, principal types confusion, compartment inheritance, and common authorization failures.
How do I install iam-identity-management?
Run npx skills add https://github.com/acedergren/oci-agent-skills --skill iam-identity-management in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/iam-identity-management/ (personal) or .claude/skills/iam-identity-management/ (project).
Which AI agents can use iam-identity-management?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is iam-identity-management safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains iam-identity-management?
It is published by acedergren in acedergren/oci-agent-skills. It has 97 recorded installs.
More from acedergren/oci-agent-skills
monitoring-operations
acedergren/oci-agent-skills
Use when setting up metrics, alarms, or troubleshooting missing data in OCI Monitoring. Covers metric namespace confusion, alarm threshold gotchas, log collection setup, and common monitoring gaps.
oracle-dba
acedergren/oci-agent-skills
Use when managing Oracle Autonomous Database on OCI, troubleshooting performance issues, optimizing costs, or implementing HA/DR. Covers ADB-specific gotchas, cost traps, SQLID debugging workflows, auto-scaling behavior, and version differences (19c/21c/23ai/26ai).
networking-management
acedergren/oci-agent-skills
Use when designing OCI networks, troubleshooting connectivity, optimizing egress costs, or configuring VCN security. Covers Service Gateway cost savings, VCN CIDR immutability, Security List vs NSG tradeoffs, VCN peering limitations, and Load Balancer subnet requirements.
best-practices
acedergren/oci-agent-skills
Use when architecting OCI solutions, migrating from AWS/Azure, designing multi-AD deployments, or avoiding common OCI anti-patterns. Covers VCN sizing mistakes, Cloud Guard gotchas, free tier specifics, OCI terminology confusion, and multi-AD patterns.
compute-management
acedergren/oci-agent-skills
Use when launching OCI compute instances, troubleshooting out-of-capacity or boot failures, optimizing compute costs, or handling instance lifecycle. Covers shape selection, capacity planning, service limits, and production incident resolution.
database-management
acedergren/oci-agent-skills
Use when creating Autonomous Databases, troubleshooting connection failures, managing PDBs, or optimizing database costs. Covers connection string confusion, password validation errors, stop/start cost traps, clone type selection, and backup retention gotchas.
Popular ai & agents skills
google-agents-cli-publish
google/agents-cli
This skill should be used when the user wants to "publish an agent", "publish my ADK agent", "register an agent with Gemini", "publish to Gemini" (formerly Gemini Enterprise), or needs guidance on the agents-cli publish gemini command. Also use when the user wants to "manage agents in Agent Registry", "list/update/delete registered agents", or "register an MCP server". Covers ADK vs A2A registration modes, programmatic and interactive usage, flag reference, auto-detection from deployment metadata, Agent Registry fleet management, and troubleshooting. Part of the agents-cli skills suite. Do NOT use for deployment (use google-agents-cli-deploy).
google-agents-cli-eval
google/agents-cli
This skill should be used when the user wants to "run an evaluation", "evaluate my agent", "evaluate my ADK agent", "write an eval dataset", "analyze eval failures", "compare eval results", "optimize agent", or needs guidance on the Gemini platform eval methodology and the Quality Flywheel. Covers eval metrics, dataset schema, LLM-as-judge scoring, and common failure causes. Applies to any agents-cli project, whatever framework the agent is written in. Do NOT use for agent API code patterns (ADK: use google-agents-cli-adk-code), deployment (use google-agents-cli-deploy), or project scaffolding (use google-agents-cli-scaffold).
skill-creator
anthropics/skills
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.
codex-pet
prime-skills/runcomfy-agent-skills
Codex Pet generator on RunComfy. Build a Codex-compatible Codex Pet spritesheet.webp + pet.json from a single reference image, drop it into ${CODEXHOME:-$HOME/.codex}/pets/ / and Codex picks it up as a custom Codex Pet next to the 8 built-ins. This skill produces the exact Codex Pet atlas Codex expects (1536x1872 PNG/WebP, 8 cols x 9 rows, 192x208 cells, 9 animation states — idle, running-right, running-left, waving, jumping, failed, waiting, running, review). Calls OpenAI GPT Image 2 edit ONCE via the local RunComfy CLI as runcomfy run openai/gpt-image-2/edit to produce a canonical Codex Pet pose, then assembles all 9 animation rows programmatically with ImageMagick micro-transforms — no Codex Pro, no $imagegen, no OPENAIAPIKEY required, only RUNCOMFYTOKEN. Triggers on "codex pet", "create codex pet", "make codex pet", "hatch codex pet", "/hatch image", "desktop pet codex", "codex pets", "spritesheet.webp", or any explicit ask to build a custom pet for OpenAI Codex.
full-output-enforcement
leonxlnx/taste-skill
Overrides default LLM truncation behavior. Enforces complete code generation, bans placeholder patterns, and handles token-limit splits cleanly. Apply to any task requiring exhaustive, unabridged output.
executing-plans
obra/superpowers
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available