Skip to content

ci: assume SOPS KMS role with GitHub OIDC#7

Merged
xnoto merged 1 commit into
mainfrom
chore/add-sops-kms-wif
Jun 19, 2026
Merged

ci: assume SOPS KMS role with GitHub OIDC#7
xnoto merged 1 commit into
mainfrom
chore/add-sops-kms-wif

Conversation

@xnoto

@xnoto xnoto commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Summary

  • configure the reusable OpenTofu workflow to assume the SOPS KMS IAM role via GitHub OIDC
  • add id-token: write permission to the reusable workflow
  • make SOPS_AGE_KEY optional while age remains as a fallback recipient
  • document the OIDC role inputs and caller requirements

Dependency

  • Requires makeitworkcloud/tfroot-aws#6 to be merged/applied first so arn:aws:iam::332355796717:role/github-actions-sops-kms exists.

Validation

  • pre-commit run --all-files

xnoto added a commit to makeitworkcloud/tfroot-aws that referenced this pull request Jun 19, 2026
## Summary
- add the Make IT Work Cloud SOPS AWS KMS key as an additional SOPS
recipient
- re-key `secrets/secrets.yaml` while keeping the existing age recipient
for compatibility
- create the GitHub OIDC provider and `github-actions-sops-kms` IAM role
for CI SOPS KMS access
- grant the caller workflow `id-token: write`

## Dependency / rollout
- Merge and apply this PR before merging
`makeitworkcloud/shared-workflows#7`, because the reusable workflow
assumes the role created here.

## Validation
- `AWS_PROFILE=makeitwork sops decrypt --output /dev/null
secrets/secrets.yaml`
- verified SOPS metadata includes both age and KMS recipients
- `tofu init -backend=false -input=false -no-color`
- `tofu validate -no-color`
- `PCT_TFPATH=$(command -v tofu) pre-commit run --all-files`
@xnoto xnoto self-assigned this Jun 19, 2026
@xnoto xnoto merged commit 1ff2734 into main Jun 19, 2026
1 check passed
@xnoto xnoto deleted the chore/add-sops-kms-wif branch June 19, 2026 04:10
xnoto added a commit to makeitworkcloud/tfroot-github that referenced this pull request Jun 19, 2026
## Summary
- add the Make IT Work Cloud SOPS AWS KMS key as the SOPS recipient
- remove the age recipient from `.sops.yaml`
- re-key `secrets/secrets.yaml` so SOPS metadata is KMS-only
- grant the caller workflow `id-token: write` for the shared workflow's
GitHub OIDC role assumption
- stop publishing `SOPS_AGE_KEY` as a GitHub Actions secret to tfroot
repositories
- remove the encrypted `sops_age_key` value from this repo's SOPS
secrets file

## Dependency / rollout
- Requires `makeitworkcloud/tfroot-aws#6` and
`makeitworkcloud/shared-workflows#7`, both now merged/applied.
- Applying this PR will remove managed `SOPS_AGE_KEY` GitHub Actions
secrets from the tfroot repositories.

## Validation
- `AWS_PROFILE=makeitwork sops decrypt --output /dev/null
secrets/secrets.yaml`
- verified SOPS metadata has `kms=1` and `age=0`
- verified no remaining `SOPS_AGE_KEY` / `sops_age_key` references
- `PCT_TFPATH=$(command -v tofu) pre-commit run --all-files`
xnoto added a commit to makeitworkcloud/tfroot-libvirt that referenced this pull request Jun 19, 2026
## Summary
- add the Make IT Work Cloud SOPS AWS KMS key as the SOPS recipient
- remove the age recipient from `.sops.yaml`
- re-key `secrets/secrets.yaml` so SOPS metadata is KMS-only
- grant the caller workflow `id-token: write` for the shared workflow's
GitHub OIDC role assumption

## Dependency / rollout
- Requires `makeitworkcloud/tfroot-aws#6` and
`makeitworkcloud/shared-workflows#7`, both now merged/applied.

## Validation
- `AWS_PROFILE=makeitwork sops decrypt --output /dev/null
secrets/secrets.yaml`
- verified SOPS metadata has `kms=1` and `age=0`
- `PCT_TFPATH=$(command -v tofu) pre-commit run --all-files`
xnoto added a commit to makeitworkcloud/tfroot-cloudflare that referenced this pull request Jun 19, 2026
## Summary
- add the Make IT Work Cloud SOPS AWS KMS key as the SOPS recipient
- remove the age recipient from `.sops.yaml`
- re-key `secrets/secrets.yaml` so SOPS metadata is KMS-only
- grant the caller workflow `id-token: write` for the shared workflow's
GitHub OIDC role assumption
- stop passing `SOPS_AGE_KEY` to the shared workflow

## Dependency / rollout
- Requires `makeitworkcloud/tfroot-aws#6` and
`makeitworkcloud/shared-workflows#7`, both now merged/applied.
- `makeitworkcloud/shared-workflows#8` removes the age secret from the
reusable workflow itself.

## Validation
- `AWS_PROFILE=makeitwork sops decrypt --output /dev/null
secrets/secrets.yaml`
- verified SOPS metadata has `kms=1` and `age=0`
- `PCT_TFPATH=$(command -v tofu) pre-commit run --all-files`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant