ci: authenticate artifactapi rpm upload with a vault token #27

Merged
benvin merged 1 commits from benvin/artifactapi-upload-token into main 2026-10-25 20:27:50 +11:00
Member

artifactapi is about to enforce auth on file uploads (ARTIFACTAPI_AUTH_UPLOADS), and the release upload currently PUTs anonymously.

  • mint an artifactapi-writer OIDC token via Vault k8s auth (role woodpecker_artifactapi_writer) using the step SA token
  • fail the step if minting fails (set -o pipefail)
  • send the token as Authorization: Bearer via a header file, never in argv or logs
artifactapi is about to enforce auth on file uploads (`ARTIFACTAPI_AUTH_UPLOADS`), and the release upload currently PUTs anonymously. - mint an `artifactapi-writer` OIDC token via Vault k8s auth (role `woodpecker_artifactapi_writer`) using the step SA token - fail the step if minting fails (`set -o pipefail`) - send the token as `Authorization: Bearer` via a header file, never in argv or logs
unkin-agent added 1 commit 2026-10-25 19:08:25 +11:00
ci: send vault-minted bearer token on artifactapi rpm upload
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
2d342bc463
Author
Member
  • .woodpecker/release.yaml:124 — step runs as serviceAccountName: default, but the Vault role woodpecker_artifactapi_writer must bind that SA or login 403s and every release fails → confirm bound_service_account_names/namespace in terraform-vault matches default, or set a dedicated SA here and add it in argocd-apps.
  • nit: .woodpecker/release.yaml:101 — $$AUTH file holds the bearer token and is never removed → trap 'rm -f "$$AUTH"' EXIT after mktemp.
- .woodpecker/release.yaml:124 — step runs as `serviceAccountName: default`, but the Vault role `woodpecker_artifactapi_writer` must bind that SA or login 403s and every release fails → confirm `bound_service_account_names`/namespace in terraform-vault matches `default`, or set a dedicated SA here and add it in argocd-apps. - nit: .woodpecker/release.yaml:101 — `$$AUTH` file holds the bearer token and is never removed → `trap 'rm -f "$$AUTH"' EXIT` after mktemp.
benvin merged commit 78ed660066 into main 2026-10-25 20:27:50 +11:00
benvin deleted branch benvin/artifactapi-upload-token 2026-10-25 20:27:50 +11:00
Sign in to join this conversation.