3 Commits

Author SHA1 Message Date
unkin-agent 4fe89092ab Add IUCLabs GitHub jwt roles for terraform repos (#187)
ci/woodpecker/push/apply Pipeline was successful
terraform-git, -vault, -artifactapi, -authentik and -binarylane are moving to private IUCLabs GitHub repos and will plan/apply from GitHub Actions, so each needs a jwt/github/iuclabs role with the same policies as its Woodpecker k8s role.

- add terraform_<repo> jwt roles bound to owner IUCLabs, repository IUCLabs/terraform-<repo>, push/pull_request events on the default branch and pull_request merge refs
- bind each role to the exact policy set of woodpecker_terraform_<repo>, with matching token TTLs
- keep the Woodpecker k8s roles unchanged

Reviewed-on: #187
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
2026-11-21 01:18:54 +11:00
unkin-agent fb6ff73fb9 Add IUCLabs release JWT role for artifactapi-writer tokens (#182)
ci/woodpecker/push/apply Pipeline was successful
IUCLabs repos publishing releases to artifactapi need a GitHub OIDC role that can only be used from version tag pushes within the org.

- add `jwt/github/iuclabs` role `release`, bound to `repository_owner: IUCLabs`, `event_name: push`, `ref: refs/tags/v*`
- allow `refs/tags/v*` in the `auth_jwt_role` ref validation, with tests
- bind the `artifactapi-writer` policy to the `release` role

Reviewed-on: #182
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
2026-11-17 23:29:54 +11:00
unkin-agent b9ae4a6802 Add GitHub Actions JWT auth mount for IUCLabs (#175)
ci/woodpecker/push/apply Pipeline failed
IUCLabs GitHub Actions workflows need read access to their own KV secrets without per-repo role and policy plumbing.

- add `auth/jwt/github/iuclabs` JWT mount trusting GitHub Actions OIDC
- add org-wide `default` role (mount `default_role`): audience `https://vault.service.consul:8200`, `user_claim=jti`, metadata mappings, 15m/1h TTLs
- restrict to `repository_owner=IUCLabs`, events push/release/schedule/pull_request, refs heads/tags/pull-merge; validation rejects anything wider
- attach templated read-only policy on `kv/github/<repo>/event/<event>/*` and `kv/github/<repo>/ref/<ref>/.secrets/*`
- add `tofu test` cases, run by `make test` and pre-commit
- document login, KV layout, event-path scope, `+` ref caveat and entity growth

Pairs with the terraform-git ref-name ruleset.

Reviewed-on: #175
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
2026-11-10 23:25:31 +11:00