Production-ready workload identity federation across AWS, GCP, and Azure using OpenID Connect - eliminating long-lived credentials entirely
|
Stored Credentials
100% keyless |
Cloud Providers
AWS, GCP, Azure |
Token Lifetime
Auto-rotating |
Deployment Time
Per cloud provider |
|
Traditional CI/CD pipeline challenges:
Security risks include:
|
Modern Zero Trust CI/CD requires:
Workload Identity Federation solves all of this. |
Complete workload identity federation across all major cloud providers:
| Capability | Technology | Outcome |
|---|---|---|
| AWS Authentication | OIDC Provider + IAM Roles | Short-lived STS tokens |
| GCP Authentication | Workload Identity Federation | Service account impersonation |
| Azure Authentication | Federated Identity Credentials | Managed identity tokens |
| Infrastructure as Code | Terraform Modules | Reproducible deployment |
| CI/CD Integration | GitHub Actions OIDC | Zero secrets in workflows |
| Security Audit | CloudTrail, GCP Logs, Azure Monitor | Complete audit trail |
Federation Dashboard Royal dark stealth theme |
Provider Configuration Multi-cloud setup |
Workflow Status GitHub Actions integration |
Security Audit Cross-cloud audit logs |
Architecture View Federation flow diagram |
|
Workload Identity Federation was chosen because:
|
|
GITHUB ACTIONS OIDC
┌─────────────────────────────────────────────────────────────────┐
│ │
│ Workflow requests OIDC token from GitHub's Identity Provider │
│ Token includes: repo, branch, actor, environment, job_id │
│ │
└─────────────────────────────┬───────────────────────────────────┘
│
│ JWT Token (signed by GitHub)
│
┌─────────────────────┼─────────────────────┐
│ │ │
▼ ▼ ▼
┌──────────────┐ ┌──────────────┐ ┌──────────────┐
│ AWS │ │ GCP │ │ Azure │
│ OIDC Provider│ │ Workload │ │ Federated │
│ │ │ Identity │ │ Identity │
│ Validates │ │ Pool │ │ Credential │
│ JWT claims │ │ │ │ │
└──────┬───────┘ └──────┬───────┘ └──────┬───────┘
│ │ │
▼ ▼ ▼
┌──────────────┐ ┌──────────────┐ ┌──────────────┐
│ IAM Role │ │ Service │ │ Managed │
│ │ │ Account │ │ Identity │
│ AssumeRole │ │ Impersonate │ │ Token │
│ WithWebIdent │ │ │ │ │
└──────┬───────┘ └──────┬───────┘ └──────┬───────┘
│ │ │
└─────────────────────┼─────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────┐
│ CLOUD RESOURCES │
│ │
│ S3 Buckets │ GCS Buckets │ Azure Blob Storage │
│ EC2 Instances │ GCE Instances │ Azure VMs │
│ Lambda │ Cloud Functions│ Azure Functions │
│ │
└─────────────────────────────────────────────────────────────────┘
- Terraform >= 1.5.0
- AWS CLI, gcloud CLI, Azure CLI
- GitHub repository with Actions enabled
# Deploy OIDC provider and IAM role
cd terraform/aws
cp terraform.tfvars.example terraform.tfvars
terraform init && terraform apply
# Get role ARN for GitHub Actions
terraform output github_actions_role_arnGitHub Actions Workflow:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::ACCOUNT_ID:role/github-actions-role
aws-region: us-east-1# Deploy Workload Identity Pool
cd terraform/gcp
cp terraform.tfvars.example terraform.tfvars
terraform init && terraform apply
# Get provider for GitHub Actions
terraform output workload_identity_providerGitHub Actions Workflow:
- name: Authenticate to Google Cloud
uses: google-github-actions/auth@v2
with:
workload_identity_provider: 'projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/github-pool/providers/github-provider'
service_account: 'github-actions@PROJECT_ID.iam.gserviceaccount.com'# Deploy Federated Identity Credential
cd terraform/azure
cp terraform.tfvars.example terraform.tfvars
terraform init && terraform apply
# Get client and tenant IDs
terraform output client_id
terraform output tenant_idGitHub Actions Workflow:
- name: Azure Login
uses: azure/login@v1
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}|
Scenario: Deploy infrastructure to AWS, GCP, and Azure from single pipeline. Implementation:
Outcome: Zero secrets in CI/CD, complete audit trail. |
Scenario: Build and push to ECR, GCR, and ACR. Implementation:
Outcome: Multi-cloud container distribution. |
|
Scenario: Rotate secrets across cloud providers. Implementation:
Outcome: Automated secrets rotation. |
Scenario: Sync data between S3, GCS, and Azure Blob. Implementation:
Outcome: Cross-cloud data replication. |
keyless-kingdom/
├── terraform/
│ ├── aws/ # AWS OIDC Provider + IAM Roles
│ │ ├── main.tf
│ │ ├── variables.tf
│ │ └── outputs.tf
│ ├── gcp/ # GCP Workload Identity Federation
│ │ ├── main.tf
│ │ ├── variables.tf
│ │ └── outputs.tf
│ ├── azure/ # Azure Federated Identity Credentials
│ │ ├── main.tf
│ │ ├── variables.tf
│ │ └── outputs.tf
│ └── modules/ # Reusable Terraform modules
├── .github/workflows/ # GitHub Actions pipelines
│ ├── aws-deploy.yml
│ ├── gcp-deploy.yml
│ ├── azure-deploy.yml
│ └── multi-cloud.yml
├── frontend/ # React dashboard
├── docs/ # Documentation
└── tests/ # Validation scripts
| Aspect | Long-Lived Keys | Keyless Kingdom |
|---|---|---|
| Credential Storage | GitHub Secrets, Vault | None required |
| Token Lifetime | 90 days - Never expires | 1 hour maximum |
| Rotation | Manual process | Automatic per-job |
| Blast Radius | All workflows | Single job |
| Audit Correlation | Limited | Repo/branch/actor/job |
| Exfiltration Risk | High | Minimal |
| Category | Technologies |
|---|---|
| Cloud Security | OIDC Federation, Zero Trust, IAM |
| AWS | OIDC Provider, IAM Roles, STS |
| GCP | Workload Identity Pool, Service Accounts |
| Azure | Federated Identity, Managed Identity |
| Infrastructure | Terraform, Multi-Cloud IaC |
| CI/CD | GitHub Actions, OIDC Tokens |
Verify trust policy matches your repository:
"StringEquals": {
"token.actions.githubusercontent.com:sub": "repo:MikeDominic92/keyless-kingdom:ref:refs/heads/main"
}Add workload identity binding:
gcloud iam service-accounts add-iam-policy-binding \
github-actions@PROJECT_ID.iam.gserviceaccount.com \
--role=roles/iam.workloadIdentityUser \
--member="principalSet://iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/github-pool/attribute.repository/MikeDominic92/keyless-kingdom"Check subject matches branch:
repo:MikeDominic92/keyless-kingdom:ref:refs/heads/main
- v1.0: AWS, GCP, Azure OIDC federation
- v1.1: GitLab CI/CD OIDC support
- v1.2: Bitbucket Pipelines integration
- v1.3: CircleCI OIDC support
- v2.0: Self-hosted runner federation
Mike Dominic
- GitHub: @MikeDominic92
- Focus: Zero Trust Architecture, Supply Chain Security, OIDC Federation
This project demonstrates key competencies for senior IAM engineering roles:
| Requirement | Evidence |
|---|---|
| Zero Trust architecture (AWS, GCP, Azure) | Multi-cloud workload identity federation |
| Supply chain security | Sigstore/Cosign keyless signing in chainguard/ |
| OIDC/SAML expertise | GitHub Actions OIDC token exchange |
| No standing credentials | Short-lived tokens, automatic rotation |
| Infrastructure as Code | Terraform modules for all providers |
See also: chainguard/README.md for Chainguard Images and Sigstore integration patterns.
Zero Trust Workload Identity Federation - No Keys, No Secrets
Demonstrates OIDC Federation, Keyless Signing, and Supply Chain Security




