Scaffold vault-plugin-secrets-arrstack engine #1
Reference in New Issue
Block a user
Delete Branch "benvin/scaffold-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
arrproxy fronts the *arr apps (Sonarr/Radarr/Prowlarr) behind an OAuth-gated proxy whose human token path derives scope from identity headers, so a non-interactive caller cannot use it. This engine mints DYNAMIC arrproxy machine tokens via arrproxy's bearer-gated admin API (locked by arrproxy PR #2), giving Terraform-driven *arr onboarding a way to issue and revoke per-role tokens without a human in the loop. Each token is a Vault lease: revoke disables it in arrproxy.
Changes
arrstacksecrets backend (backend.go) mirroring the siblingvault-plugin-secrets-litellmengine; the same binary runs on Vault and OpenBao.config(base_url, write-only admin_token, optional ca_cert PEM, request_timeout_seconds); client.go sendsAuthorization: Bearer <admin_token>.roles/<name>withapps(non-empty subset of sonarr/radarr/prowlarr, de-duplicated and sorted),ttl,max_ttl.creds/<name>: POST/api/admin/tokenswith subjectvault:arrstack:<role>and ttl_seconds from the effective lease TTL; returntoken,id,apps; storeidfor revocation./api/admin/tokens/{id}(idempotent); cap lease renewal at the arrproxy token's fixed expiry (honouring max_ttl), documented in the README.go build,go vet,gofmt -l, andgo test -raceare clean.