소스 정보
- 저장소
- tomevault-io/skills-registry
- 최근 소스 활동
- 2026년 4월 28일 22:53
- 감지된 SKILL.md 언어
- 영어
- 스타
- 0
- 포크
- 0
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/tomevault-io/skills-registry --skill workload-identity-federation-implementation명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SOC 직업 분류 기준
SKILL.md 표시 중
| name | workload-identity-federation-implementation |
| description | >- Use when this capability is needed. |
from google.cloud import storage
# Credentials automatic
client = storage.Client(project='PROJECT_ID')
bucket = client.bucket('my-bucket')
blob = bucket.blob('data.txt')
blob.download_to_filename('data.txt')
from google.cloud import secretmanager
client = secretmanager.SecretManagerServiceClient()
secret_name = f"projects/PROJECT_ID/secrets/api-key/versions/latest"
response = client.access_secret_version(request={"name": secret_name})
api_key = response.payload.data.decode('UTF-8')
# SERVICE_ACCOUNT_A in PROJECT_A can impersonate SERVICE_ACCOUNT_B in PROJECT_B
gcloud iam service-accounts add-iam-policy-binding \
service-account-b@PROJECT_B.iam.gserviceaccount.com \
--role="roles/iam.serviceAccountUser" \
--member="serviceAccount:service-account-a@PROJECT_A.iam.gserviceaccount.com"
Containers need cloud access. But service account keys are static credentials that never rotate, frequently get stolen, and live forever.
Workload Identity Federation lets containers prove their identity to cloud providers without ever storing keys. The Kubernetes cluster itself becomes a trusted identity provider.
Production Hardening
Workload Identity eliminates the largest attack surface in containerized environments. This is foundational. Get it right.
Instead of storing a static key, your container presents a signed JWT token to prove it's running in your cluster.
| Approach | Token | Rotation | Revocation | Audit |
|---|---|---|---|---|
| Service Account Keys | Static, never changes | Manual | Manual | Weak |
| Workload Identity | Dynamic, short-lived | Automatic | Immediate | Full |
Service account keys are abandoned credentials. Workload Identity is ephemeral proof.
How It Works
- Pod requests token - Kubernetes API issues signed JWT
- Token presented to GCP - GCP validates signature
- GCP issues access token - Short-lived credential for GCP APIs
- Automatic rotation - Token refreshes before expiration
See examples.md for detailed code examples.
This guide is split into focused modules:
See examples.md for detailed code examples.
Verification
Test authentication from inside a pod:
kubectl run -it --image=google/cloud-sdk:slim test-wi \ --serviceaccount=app-sa \ -n production \ -- gcloud auth list
Common Mistakes
- Forgetting to annotate the Kubernetes ServiceAccount
- Using wrong format in IAM binding (
serviceAccount:PROJECT_ID.svc.id.goog[NAMESPACE/SA_NAME])- Not granting
roles/iam.workloadIdentityUserrole- Metadata server enabled on nodes (
workloadMetadataConfig.modemust beGKE_METADATA)
See examples.md for detailed code examples.
Problems:
# Kubernetes ServiceAccount with annotation
apiVersion: v1
kind: ServiceAccount
metadata:
name: app-sa
annotations:
iam.gke.io/gcp-service-account: app-gcp@PROJECT_ID.iam.gserviceaccount.com
Benefits:
See Migration Guide for detailed migration steps.
from google.cloud import storage
# Credentials automatic
client = storage.Client(project='PROJECT_ID')
bucket = client.bucket('my-bucket')
blob = bucket.blob('data.txt')
blob.download_to_filename('data.txt')
from google.cloud import secretmanager
client = secretmanager.SecretManagerServiceClient()
secret_name = f"projects/PROJECT_ID/secrets/api-key/versions/latest"
response = client.access_secret_version(request={"name": secret_name})
api_key = response.payload.data.decode('UTF-8')
# SERVICE_ACCOUNT_A in PROJECT_A can impersonate SERVICE_ACCOUNT_B in PROJECT_B
gcloud iam service-accounts add-iam-policy-binding \
service-account-b@PROJECT_B.iam.gserviceaccount.com \
--role="roles/iam.serviceAccountUser" \
--member="serviceAccount:service-account-a@PROJECT_A.iam.gserviceaccount.com"
Workload Identity eliminates static keys. Tokens rotate automatically. Access revokes immediately. Audit trail complete. Zero-trust credential model in place.
Instead of storing a static key, your container presents a signed JWT token to prove it's running in your cluster.
| Approach | Token | Rotation | Revocation | Audit |
|---|---|---|---|---|
| Service Account Keys | Static, never changes | Manual | Manual | Weak |
| Workload Identity | Dynamic, short-lived | Automatic | Immediate | Full |
Service account keys are abandoned credentials. Workload Identity is ephemeral proof.
How It Works
- Pod requests token - Kubernetes API issues signed JWT
- Token presented to GCP - GCP validates signature
- GCP issues access token - Short-lived credential for GCP APIs
- Automatic rotation - Token refreshes before expiration
See examples.md for detailed code examples.
This guide is split into focused modules:
See examples.md for detailed code examples.
Verification
Test authentication from inside a pod:
kubectl run -it --image=google/cloud-sdk:slim test-wi \ --serviceaccount=app-sa \ -n production \ -- gcloud auth list
Common Mistakes
- Forgetting to annotate the Kubernetes ServiceAccount
- Using wrong format in IAM binding (
serviceAccount:PROJECT_ID.svc.id.goog[NAMESPACE/SA_NAME])- Not granting
roles/iam.workloadIdentityUserrole- Metadata server enabled on nodes (
workloadMetadataConfig.modemust beGKE_METADATA)
See examples.md for detailed code examples.
Problems:
# Kubernetes ServiceAccount with annotation
apiVersion: v1
kind: ServiceAccount
metadata:
name: app-sa
annotations:
iam.gke.io/gcp-service-account: app-gcp@PROJECT_ID.iam.gserviceaccount.com
Benefits:
See Migration Guide for detailed migration steps.
from google.cloud import storage
# Credentials automatic
client = storage.Client(project='PROJECT_ID')
bucket = client.bucket('my-bucket')
blob = bucket.blob('data.txt')
blob.download_to_filename('data.txt')
from google.cloud import secretmanager
client = secretmanager.SecretManagerServiceClient()
secret_name = f"projects/PROJECT_ID/secrets/api-key/versions/latest"
response = client.access_secret_version(request={"name": secret_name})
api_key = response.payload.data.decode('UTF-8')
# SERVICE_ACCOUNT_A in PROJECT_A can impersonate SERVICE_ACCOUNT_B in PROJECT_B
gcloud iam service-accounts add-iam-policy-binding \
service-account-b@PROJECT_B.iam.gserviceaccount.com \
--role="roles/iam.serviceAccountUser" \
--member="serviceAccount:service-account-a@PROJECT_A.iam.gserviceaccount.com"
Workload Identity eliminates static keys. Tokens rotate automatically. Access revokes immediately. Audit trail complete. Zero-trust credential model in place.
See examples.md for code examples.
See reference.md for complete documentation.
Converted and distributed by TomeVault — claim your Tome and manage your conversions.