From 7b7186961055d0a8bf50e738ae8958739eb14797 Mon Sep 17 00:00:00 2001 From: AB Date: Wed, 2 Dec 2026 03:59:15 +0200 Subject: [PATCH] Authorize ra2-rs playtest publishing in OpenArtifact Register the ra2-playtest-publisher account, GitHub OIDC trust policy and scoped permissions for raw playtest installers and x86_64 Arch packages in hexor-pacman. Bind trust to the ra2-rs tag-push playtest workflow and playtest environment, reusing the policy name already referenced by the producer CI. Include the new manifest in the generated policy ConfigMap so the existing ArgoCD PostSync job applies it on sync. Existing WinGet permissions are preserved. Validation: rendered the policy ConfigMap and Job with kubectl kustomize and verified the manifest and ConfigMap reference. Python policy-application tests passed. No push or live cluster changes were performed. --- k8s-ng/apps/openartifact/kustomization.yaml | 1 + .../openartifact/policies/ra2-playtest.yaml | 53 +++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 k8s-ng/apps/openartifact/policies/ra2-playtest.yaml diff --git a/k8s-ng/apps/openartifact/kustomization.yaml b/k8s-ng/apps/openartifact/kustomization.yaml index a50bd9a..e56d68f 100644 --- a/k8s-ng/apps/openartifact/kustomization.yaml +++ b/k8s-ng/apps/openartifact/kustomization.yaml @@ -16,6 +16,7 @@ configMapGenerator: - name: openartifact-policies files: - policies/winget-publisher.yaml + - policies/ra2-playtest.yaml helmCharts: - name: openartifact diff --git a/k8s-ng/apps/openartifact/policies/ra2-playtest.yaml b/k8s-ng/apps/openartifact/policies/ra2-playtest.yaml new file mode 100644 index 0000000..fb6295f --- /dev/null +++ b/k8s-ng/apps/openartifact/policies/ra2-playtest.yaml @@ -0,0 +1,53 @@ +# Applied by the OpenArtifact PostSync job. Authorizes the ra2-rs playtest +# workflow to publish installers and Arch packages without static deploy tokens. +apiVersion: openartifact.io/v1 +kind: ServiceAccount +metadata: + name: ra2-playtest-publisher +spec: + description: Publishes ra2-rs playtest installers from GitHub Actions +--- +apiVersion: openartifact.io/v1 +kind: PermissionTarget +metadata: + name: ra2-playtest-publish +spec: + repository_filter: '^binaries$' + path_pattern: '^ra2-rs/playtest/.*$' + actions: [read, write] + assignments: + users: [ra2-playtest-publisher] +--- +apiVersion: openartifact.io/v1 +kind: OIDCTrustPolicy +metadata: + name: github-ra2-playtest-publish +spec: + issuer: https://token.actions.githubusercontent.com + audience: https://repo.hexor.cy + service_account: ra2-playtest-publisher + token_ttl_seconds: 900 + enabled: true + conditions: + - claim: repository + patterns: [house-of-vanity/ra2-rs] + - claim: ref + patterns: ['refs/tags/*'] + - claim: workflow_ref + patterns: ['house-of-vanity/ra2-rs/.github/workflows/playtest.yml@refs/tags/*'] + - claim: environment + patterns: [playtest] + - claim: event_name + patterns: [push] +--- +# The same playtest workflow/principal also publishes the Arch package. +apiVersion: openartifact.io/v1 +kind: PermissionTarget +metadata: + name: ra2-playtest-pacman-publish +spec: + repository_filter: '^hexor-pacman$' + path_pattern: '^os/x86_64/ra2-rs-[A-Za-z0-9._+-]+-x86_64\.pkg\.tar\.zst$' + actions: [read, write] + assignments: + users: [ra2-playtest-publisher]