acedergren/oci-agent-skills/secrets-management
Claude Code and agent skill by acedergren/oci-agent-skills
- community
Checking that the SKILL.md file is still in the repository.
Use when storing credentials in OCI Vault, troubleshooting secret retrieval failures, implementing secret rotation, or setting up application authentication to Vault. Covers vault hierarchy confusion, IAM permission gotchas, cost optimization, temp file security, and audit logging.
Install
npx vskill@latest install acedergren/oci-agent-skills/secrets-managementSKILL.md
OCI Vault and Secrets Management - Expert Knowledge
🏗️ Use OCI Landing Zone Terraform Modules
Don't reinvent the wheel. Use oracle-terraform-modules/landing-zone for Vault setup.
Landing Zone solves:
- ❌ Bad Practice #1: Generic compartments (Landing Zone creates Security compartment for Vault)
- ❌ Bad Practice #7: No security services (Landing Zone integrates Cloud Guard monitoring)
- ❌ Bad Practice #10: No audit logging (Landing Zone enables Vault audit logs)
This skill provides: Vault operations, secret management patterns, and troubleshooting for vaults 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
- Vault service CLI operations (
oci vault secret,oci kms) - Secret encoding formats and retrieval patterns
- Latest Vault/KMS features and cross-region replication
When OCI operations are needed:
- Use exact CLI commands from this skill's references
- Do NOT guess OCI Vault CLI syntax
- Do NOT assume AWS Secrets Manager patterns work in OCI
- Load reference files for detailed Vault API documentation
What you DO know:
- General secrets management principles
- Encryption and key management concepts
- Secret rotation patterns
This skill bridges the gap by providing current OCI-specific Vault patterns and gotchas.
You are an OCI Vault expert. This skill provides knowledge Claude lacks: anti-patterns, IAM permission gotchas, cost optimization, security vulnerabilities, and OCI-specific operational knowledge.
NEVER Do This
❌ NEVER log secret contents (even in debug/error messages)
❌ NEVER set temp key file permissions AFTER writing content
❌ NEVER use overly broad IAM policies
❌ NEVER retrieve secrets without caching
- Cost: $0.03 per 10,000 requests (first 10k/month free)
- Without cache: 1000 req/hr × 24 × 30 = 720k/month = $2.16/month
- With 60min cache: 1000 req/hr → 24 calls/day = 720/month = FREE
- Savings: 98% cost reduction
❌ NEVER use PLAIN content type (deprecated)
- Always use BASE64 encoding for secrets
- PLAIN is legacy and may not work in future
❌ NEVER hardcode Vault OCIDs in code
IAM Permission Gotcha (Critical)
Secret retrieval requires BOTH permissions:
Why both needed:
read secret-family→ allows listing and reading secret metadatause keys→ allows decryption of secret content (secrets encrypted with master key)
Without `use keys`: Get confusing 403 error: "User not authorized to perform this operation"
Common mistake: Forgetting use keys permission, spending hours debugging "authorization failed"
Vault Hierarchy (Often Confused)
Commands use different services:
- Vault operations:
oci kms management vault ... - Key operations:
oci kms management key ... --endpoint <vault-endpoint> - Secret operations:
oci vault secret ...(NOT kms!)
Common mistake: oci vault-secret create (no such command) vs oci vault secret create (correct)
Secret Retrieval Error Decision Tree
Cost Optimization
Vault API Pricing: $0.03 per 10,000 requests (10k/month free)
Calculation Examples:
Without caching (retrieve on every API call):
- 1000 API calls/hour
- 24 hours × 30 days = 720,000 Vault requests/month
- (720,000 / 10,000) × $0.03 = $2.16/month
With 60-minute cache TTL:
- 1000 API calls/hour → 1 Vault request/hour
- 24 hours × 30 days = 720 Vault requests/month
- Under 10k free tier = $0/month (FREE)
- Savings: 98%
Cache TTL Selection:
| Security Requirements | Cache TTL | Reasoning | |
|---|---|---|---|
| High (rotate daily) | 5-15 minutes | Frequent refresh, still 90%+ savings | |
| Standard (rotate monthly) | 30-60 minutes | Balance security and cost | |
| Dev/Test | No cache | Always fresh for development |
Rule: Cache TTL must be less than secret rotation window
Secret Rotation (Zero-Downtime)
WRONG (causes downtime):
RIGHT (zero-downtime):
Key points:
- Secret OCID doesn't change (apps continue working)
- Vault serves latest version by default
- Previous versions retained for rollback
- Applications pick up new version on next cache refresh (no restart needed)
Instance Principal Authentication
Production compute instances should use instance principals:
Benefits:
- No credentials to manage or rotate
- No secrets stored on compute instances
- Automatic token refresh
- Audit trail shows which instance accessed what
Audit Logging
Enable Vault access logging:
What gets logged:
- Who: User OCID or instance principal identity
- What: Secret OCID accessed
- When: Timestamp (UTC)
- Where: Source IP address
- Result: Success (200) or failure (403, 404, etc.)
Monitoring alerts (recommended):
- \>10 failed access attempts in 5 minutes (unauthorized access)
- Access to secrets not assigned to requesting instance
- Access from unexpected IP ranges
OCI-Specific Gotchas
Vault Management Endpoint is Required for Key Operations:
Regional Vault Availability:
- Not all OCI regions have Vault service
- Check region availability before designing architecture
- Cross-region secret access adds latency (10-50ms)
Secret Bundle Base64 Decoding:
Progressive Loading References
OCI Vault Reference (Official Oracle Documentation)
WHEN TO LOAD `oci-vault-reference.md`:
- Need comprehensive Vault and KMS API documentation
- Understanding key management and encryption options
- Implementing HSM-backed key protection
- Need official Oracle guidance on Vault architecture
- Setting up cross-region secret replication
Do NOT load for:
- Quick secret retrieval examples (covered in this skill)
- Permission debugging (decision trees above)
- Secret rotation patterns (covered above)
When to Use This Skill
- Storing credentials in Vault: secret organization, IAM setup
- Secret retrieval failures: 403 errors, permission debugging
- Cost optimization: caching strategy, API call reduction
- Secret rotation: zero-downtime updates, version management
- Security: temp file handling, logging anti-patterns, audit setup
- Production: instance principal configuration, monitoring alerts
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/secrets-management/SKILL.md
Popularity
- Repository stars
- 6
- Repository forks
- 3
- 7-day trend score
- 10
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 30 Mar 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/acedergren/oci-agent-skills/secrets-management)