Add arrstack secrets engine (mount, roles, config, policies) #124
Reference in New Issue
Block a user
Delete Branch "benvin/arrstack-secret-engine"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
The new
vault-plugin-secrets-arrstackdynamic secrets engine lets theterraform-sonarr / terraform-radarr / terraform-prowlarr runs mint short-lived,
app-scoped arrproxy API keys instead of holding a static admin token. This wires
that engine into terraform-vault, mirroring the existing
litellmengineend to end (catalog registration, mount + config, roles, and consumer policies).
Changes
vault-plugin-secrets-arrstackv0.1.0 in the plugincatalog (
config/plugins/vault-plugin-secrets-arrstack.yaml,sha256
f8ee60ca…37972), mirroring the sibling plugin YAMLs.arrstackand write its config(
base_url = https://arrstack.unkin.net,request_timeout_seconds = 30) via adedicated
arrstackvaultsecretprovider module(
modules/vault_cluster/modules/arrstack_secret_backend), mirroringlitellm_secret_backend. The sensitiveadmin_tokenis not stored in git:it is read from KV via a
vault_kv_secret_v2data source atkv/kubernetes/namespace/arrstack/default/arrproxy-admin-token(keytoken),seeded by argocd-apps #384 — the same KV-sourcing mechanism litellm uses for
its master key.
ca_certis supported but omitted (arrstack.unkin.net uses aninternal-CA cert the OpenBao nodes already trust, matching the gitea engine).
sonarr,radarr,prowlarr(each scoped to one app) andall(all three), each
ttl = 3600/max_ttl = 86400mirroring the litellm roleTTLs. The engine additionally caps renewal at the arrproxy admin token's fixed
mint expiry.
policies/arrstack/admin.yaml— grant the terraform-vault deployer(
approle/tf_vault,k8s/au/syd1/woodpecker_terraform_vault) management ofarrstack/configandarrstack/roles/*.policies/arrstack/creds/{sonarr,radarr,prowlarr}.yaml— grant eachterraform_<arr>approle +woodpecker_terraform_<arr>k8s role read on thematching
arrstack/creds/<role>. (No consumer is wired toarrstack/creds/allyet; that role exists for a future combined consumer.)
policies/kv/kubernetes/namespace/arrstack/default/arrproxy-admin-token/read.yaml— the deployer's existing
secret_backends_readpolicy only coverskv/data/service/vault/+/+/secret_backend/*, which does not match thiskubernetes/namespace path, so this adds the minimal read (data + metadata)
grant rather than duplicating the secret.
config/config.hcl,modules/vault_cluster/{variables,main}.tf,environments/au/syd1/terragrunt.hcl,and register the
arrstackprovider inenvironments/root.hcl.Ordering / apply gating
Do not apply this PR until its prerequisites land. Per the plugin-order rule
(install → config/policy → resources):
openbao-plugin-secrets-arrstackRPM(
/opt/openbao-plugins/vault-plugin-secrets-arrstack) on the OpenBao nodesfirst — catalog registration verifies the on-disk binary's sha256 and fails if
the binary is absent.
arrstackvaultsecretterraform provider v0.1.0 must be published to theartifactapi terraform registry (as litellm/gitea/rancher providers are), or
tofu init/plan/validatecannot resolve it.Until both land, CI
planand thetofu-validatepre-commit hook are expectedred solely on the missing
arrstackvaultsecretprovider; all other validationpasses. Note that plan-green ≠ apply-green here: the KV-sourced
admin_tokenis only read at apply time, so a green plan does not prove the seed is present.
Consumer role bindings for the minted creds are exercised by the
terraform-sonarr/radarr/prowlarr runs (task 11).
Superseded by #125/#126/#127 — split into register/policy/resources per review.
unkin-agent referenced this pull request2026-08-30 21:59:35 +10:00
Pull request closed