Installation
Running the Server
STDIO Transport Mode
HTTP Streaming Transport Mode
Environment Variables
OCI_CONFIG_PROFILE- OCI configuration profile name (default: “DEFAULT”)TENANCY_ID_OVERRIDE- Overrides the tenancy ID from the config file
Available Tools
The server provides the following tools for identity management:| Tool Name | Description |
|---|---|
list_compartments | List compartments in a given tenancy |
get_compartment_by_name | Return a compartment matching the provided name |
get_tenancy_info | Get tenancy information |
get_current_tenancy | Get current tenancy information |
list_availability_domains | List availability domains in a given tenancy |
list_subscribed_regions | Return a list of all regions the customer (tenancy) is subscribed to |
create_auth_token | Create an authentication token for a user |
get_current_user | Get current user information |
Usage Examples
Compartment Management
Tenancy Information
Availability Domains
Region Management
User Operations
Understanding OCI Identity
Compartments
Compartments are logical containers for organizing and isolating cloud resources:- Hierarchical Structure - Organize resources in a tree structure
- Access Control - Apply IAM policies at compartment level
- Cost Tracking - Track costs by compartment
- Resource Isolation - Separate dev, test, and production environments
- Create compartments for different environments (dev, test, prod)
- Use compartments for different projects or teams
- Implement least-privilege access per compartment
- Don’t put all resources in root compartment
Tenancy
The tenancy is the root compartment representing your organization:- Unique across all of OCI
- Contains all compartments and resources
- Has a home region that cannot be changed
- Identified by tenancy OCID
Availability Domains
Availability Domains are isolated data centers within a region:- Physical isolation for fault tolerance
- Independent power, cooling, and networking
- Distribute resources across ADs for high availability
- Some services are AD-specific, others are regional
Regions
OCI is available in multiple geographic regions:- Home Region - Where IAM resources are defined
- Subscribed Regions - Regions you can deploy resources in
- Region keys (e.g., us-phoenix-1, us-ashburn-1)
- Some resources are region-specific
Authentication Tokens
Auth tokens are Oracle-generated tokens for API authentication:- Alternative to API signing keys
- Used with object storage and other services
- Can have multiple tokens per user
- Should be rotated regularly
Authentication
The server uses OCI CLI configuration from~/.oci/config:
Required Permissions
Your OCI user or instance principal needs these IAM permissions: Compartment Management:Common Use Cases
Resource Organization
- List compartments to understand resource hierarchy
- Find compartment OCIDs for resource provisioning
- Organize resources by environment or project
- Implement cost tracking by compartment
Multi-Region Deployments
- List subscribed regions for deployment planning
- Understand region availability
- Plan disaster recovery across regions
- Distribute workloads geographically
High Availability Planning
- List availability domains for resource distribution
- Plan fault-tolerant architectures
- Understand AD-specific services
- Implement multi-AD deployments
Access Management
- Create auth tokens for API access
- Generate tokens for object storage
- Manage user authentication methods
- Implement programmatic access
Governance & Compliance
- Audit compartment structure
- Verify tenancy configuration
- Track user access
- Document resource organization
Architecture Patterns
Environment Separation
Project-Based Organization
Troubleshooting
Authentication Errors
Error: NotAuthenticated- Verify OCI CLI configuration
- Check API key validity
- Ensure correct profile is selected
- Verify TENANCY_ID_OVERRIDE if used
- Check OCI config file has correct tenancy OCID
Permission Denied
Error: NotAuthorizedOrNotFound- Verify IAM policies grant required permissions
- Check policy statements include correct compartments
- Ensure using principal with appropriate access
Compartment Not Found
- Verify compartment name spelling (case-sensitive)
- Check compartment exists in current tenancy
- Ensure compartment is not deleted
- Use exact name match
Related Services
- Compute - Deploy instances in compartments
- Networking - Create VCNs in compartments
- Monitoring - Monitor across compartments
- Cloud Guard - Security monitoring for tenancy
