Integrating Secrets Managers
Overview
Integrate secrets management platforms (HashiCorp Vault, AWS Secrets Manager, GCP Secret Manager, Azure Key Vault) into applications and infrastructure. Generate authentication configurations, access policies, secret rotation schedules, and application code patterns for secure credential retrieval at runtime.
Prerequisites
- Secrets manager instance running and accessible (Vault server, AWS Secrets Manager enabled)
- Cloud provider CLI authenticated or Vault CLI installed (
vault, aws, gcloud, az)
- IAM/policy permissions to create secrets and access policies
- Understanding of which application components need which secrets
- Network connectivity between application workloads and the secrets manager endpoint
Instructions
- Inventory all secrets currently in use: database credentials, API keys, TLS certificates, OAuth tokens
- Select the secrets manager based on infrastructure: Vault for multi-cloud, AWS Secrets Manager for AWS-native, GCP Secret Manager for GCP
- Create the secrets store structure: organize by application, environment, and secret type (e.g.,
apps/myapp/prod/database)
- Generate access policies with least-privilege: each application identity gets read access only to its own secrets
- Configure authentication method: Kubernetes service account (Vault K8s auth), IAM role (AWS), Workload Identity (GCP)
- Implement secret retrieval in the application: SDK call at startup, sidecar injection (Vault Agent), or CSI driver mount
- Set up automatic secret rotation: define rotation lambda/function, rotation interval, and notification on rotation events
- Remove hardcoded secrets from code and configuration files; replace with secret references
- Add monitoring: alert on secret access failures, rotation failures, and unauthorized access attempts
Output
- Vault policies (HCL) or IAM policies (JSON) for secret access
- Authentication configuration (Vault K8s auth, AWS IAM role, GCP Workload Identity)
- Application code snippets for secret retrieval (SDK-based or environment variable injection)
- Secret rotation configuration (AWS rotation Lambda, Vault dynamic secrets)
- Kubernetes External Secrets Operator or CSI SecretProviderClass manifests
Error Handling
| Error |
Cause |
Solution |
permission denied on secret read |
Policy does not grant access to the requested path |
Update Vault policy or IAM policy to include the specific secret ARN/path |
Vault token expired |
Authentication token TTL exceeded |
Configure token renewal or use short-lived tokens with auto-renewal via Vault Agent |
Secret not found |
Secret path/name incorrect or secret deleted |
Verify the secret exists with vault kv get or aws secretsmanager describe-secret |
Rotation failed |
Rotation function lacks permissions or target service unreachable |
Check rotation function logs; verify it has permissions to update credentials on the target service |
Connection refused to Vault |
Vault server down or network policy blocking access |
Verify Vault is running and healthy; check network policies/firewalls between application and Vault |
Examples
- "Integrate HashiCorp Vault with a Kubernetes deployment using the Vault Agent sidecar injector to inject database credentials as environment variables."
- "Set up AWS Secrets Manager with automatic rotation every 30 days for an RDS PostgreSQL password, with a Lambda rotation function."
- "Replace all hardcoded API keys in the application with GCP Secret Manager references using Workload Identity for authentication."
Resources
Source: jeremylongshore/claude-code-plugins-plus-skills → skills/.curated/integrating-secrets-managers/SKILL.md
Also appears in: jeremylongshore/claude-code-plugins-plus-skills/plugins/devops/secrets-manager-integrator/skills/integrating-secrets-managers/SKILL.md
1---
2name: integrating-secrets-managers
3description: "'Manage this skill enables AI assistant to seamlessly integrate with various secrets managers like hashicorp vault and aws secrets manager. it generates configurations and setup code, ensuring best practices for secure credential management. use this skill when... Use when appropriate context detected. Trigger with relevant phrases based on skill purpose. '"
4allowed-tools: "Read, Write, Edit, Grep, Glob, Bash(cmd:*)"
5category: security-and-compliance
6source_repo: jeremylongshore/claude-code-plugins-plus-skills
7source_path: "skills/.curated/integrating-secrets-managers/SKILL.md"
8source_url: https://github.com/jeremylongshore/claude-code-plugins-plus-skills/blob/HEAD/skills/.curated/integrating-secrets-managers/SKILL.md
9metadata:
10 source: https://skillmd.com/skills/thedixitjain/integrating-secrets-managers
11---
12
13# Integrating Secrets Managers
14
15## Overview
16
17Integrate secrets management platforms (HashiCorp Vault, AWS Secrets Manager, GCP Secret Manager, Azure Key Vault) into applications and infrastructure. Generate authentication configurations, access policies, secret rotation schedules, and application code patterns for secure credential retrieval at runtime.
18
19## Prerequisites
20
21- Secrets manager instance running and accessible (Vault server, AWS Secrets Manager enabled)
22- Cloud provider CLI authenticated or Vault CLI installed (`vault`, `aws`, `gcloud`, `az`)
23- IAM/policy permissions to create secrets and access policies
24- Understanding of which application components need which secrets
25- Network connectivity between application workloads and the secrets manager endpoint
26
27## Instructions
28
291. Inventory all secrets currently in use: database credentials, API keys, TLS certificates, OAuth tokens
302. Select the secrets manager based on infrastructure: Vault for multi-cloud, AWS Secrets Manager for AWS-native, GCP Secret Manager for GCP
313. Create the secrets store structure: organize by application, environment, and secret type (e.g., `apps/myapp/prod/database`)
324. Generate access policies with least-privilege: each application identity gets read access only to its own secrets
335. Configure authentication method: Kubernetes service account (Vault K8s auth), IAM role (AWS), Workload Identity (GCP)
346. Implement secret retrieval in the application: SDK call at startup, sidecar injection (Vault Agent), or CSI driver mount
357. Set up automatic secret rotation: define rotation lambda/function, rotation interval, and notification on rotation events
368. Remove hardcoded secrets from code and configuration files; replace with secret references
379. Add monitoring: alert on secret access failures, rotation failures, and unauthorized access attempts
38
39## Output
40
41- Vault policies (HCL) or IAM policies (JSON) for secret access
42- Authentication configuration (Vault K8s auth, AWS IAM role, GCP Workload Identity)
43- Application code snippets for secret retrieval (SDK-based or environment variable injection)
44- Secret rotation configuration (AWS rotation Lambda, Vault dynamic secrets)
45- Kubernetes External Secrets Operator or CSI SecretProviderClass manifests
46
47## Error Handling
48
49| Error | Cause | Solution |
50|-------|-------|---------|
51| `permission denied` on secret read | Policy does not grant access to the requested path | Update Vault policy or IAM policy to include the specific secret ARN/path |
52| `Vault token expired` | Authentication token TTL exceeded | Configure token renewal or use short-lived tokens with auto-renewal via Vault Agent |
53| `Secret not found` | Secret path/name incorrect or secret deleted | Verify the secret exists with `vault kv get` or `aws secretsmanager describe-secret` |
54| `Rotation failed` | Rotation function lacks permissions or target service unreachable | Check rotation function logs; verify it has permissions to update credentials on the target service |
55| `Connection refused to Vault` | Vault server down or network policy blocking access | Verify Vault is running and healthy; check network policies/firewalls between application and Vault |
56
57## Examples
58
59- "Integrate HashiCorp Vault with a Kubernetes deployment using the Vault Agent sidecar injector to inject database credentials as environment variables."
60- "Set up AWS Secrets Manager with automatic rotation every 30 days for an RDS PostgreSQL password, with a Lambda rotation function."
61- "Replace all hardcoded API keys in the application with GCP Secret Manager references using Workload Identity for authentication."
62
63## Resources
64
65- HashiCorp Vault: https://developer.hashicorp.com/vault/docs
66- AWS Secrets Manager: https://docs.aws.amazon.com/secretsmanager/
67- GCP Secret Manager: https://cloud.google.com/secret-manager/docs
68- External Secrets Operator: https://external-secrets.io/
69- Secrets management best practices: https://developer.hashicorp.com/vault/tutorials/recommended-patterns
70
71---
72
73**Source:** [`jeremylongshore/claude-code-plugins-plus-skills`](https://github.com/jeremylongshore/claude-code-plugins-plus-skills) → `skills/.curated/integrating-secrets-managers/SKILL.md`
74
75**Also appears in:** `jeremylongshore/claude-code-plugins-plus-skills/plugins/devops/secrets-manager-integrator/skills/integrating-secrets-managers/SKILL.md`