gcp-iam-secret-manager

Configure least-privilege IAM service accounts and manage secrets in Google Cloud Secret Manager.

Updated Jul 24, 2026
One-click install
npx skills add https://github.com/oliverconstance/webapp-scrum-team --skill gcp-iam-secret-manager-oliverconstance
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: gcp-iam-secret-manager
Source: https://github.com/oliverconstance/webapp-scrum-team/tree/main/.agent/skills/gcp-iam-secret-manager
Command: npx skills add https://github.com/oliverconstance/webapp-scrum-team --skill gcp-iam-secret-manager-oliverconstance

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires google-cloud-secretmanager.

What problem does it solve? Hardcoding API keys, database passwords, and private keys in source code or environment variables creates serious security risks. This Skill provides a standard operating procedure for storing credentials in Google Cloud Secret Manager and granting access only through least-privilege IAM service accounts. ## Core Features & Use Cases - Least-Privilege Service Accounts: Create dedicated runtime service accounts for Cloud Run services and ADK agents instead of relying on over-privileged default accounts. - Secret Provisioning & IAM Binding: Create secrets in Secret Manager, add payload versions, and bind the granular roles/secretmanager.secretAccessor role scoped to individual secrets. - Runtime Secret Access in Python: Retrieve secret payloads dynamically at runtime using the official google-cloud-secretmanager SDK, with verification commands and troubleshooting for common 403/404 errors. - Use Case: When deploying a Cloud Run backend that needs a GitHub App private key, follow this procedure to store the key in Secret Manager, bind access to the runtime service account, and read it securely at runtime. ## Quick Start Use the gcp-iam-secret-manager skill to create a least-privilege service account and store my GitHub App private key in Secret Manager.

Frequently Asked Questions about gcp-iam-secret-manager

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I store secrets in Google Cloud Secret Manager?▼

Create a secret container with gcloud secrets create using a replication policy, then add a payload version with gcloud secrets versions add pointing to a local file. Access the payload at runtime via the google-cloud-secretmanager Python SDK.

How to grant a service account access to a GCP secret?▼

Use gcloud secrets add-iam-policy-binding to assign the roles/secretmanager.secretAccessor role to the runtime service account, scoped to the specific secret resource rather than the project root for least privilege.

Why do I get 403 permission denied accessing Secret Manager?▼

The 403 error means the executing service account lacks the secretmanager.versions.access permission. Verify the runtime service account matches the one bound to roles/secretmanager.secretAccessor and that Cloud Run's serviceAccountName is set correctly.

Can I access GCP secrets locally outside Google Cloud?▼

Yes, run gcloud auth application-default login or set GOOGLE_APPLICATION_CREDENTIALS to a valid Workload Identity credential configuration. Without valid application default credentials, the SDK raises a credentials-not-found error.

What does 404 secret not found mean in Secret Manager?▼

The 404 error indicates the secret does not exist or has no versions. Confirm you created at least one version with gcloud secrets versions add and that you are querying the correct project ID and region.