deploy arrproxy (oauth2-gated *arr proxy + per-user API keys) #377
Reference in New Issue
Block a user
Delete Branch "benvin/arrproxy-deploy"
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?
Deploys arrproxy v0.1.0 (task 9 final integration) into the existing
arrstackapp: the external, Authentik-gated front door for sonarr/radarr/prowlarr with per-user API-key brokering. Manifests are wired to match the arrproxy v0.1.0 code (ports, routes, identity headers, keys dir), mirroring the ghp/artifactapi estate patterns.Topology (
apps/base/arrstack/arrproxy/)arrproxyis the single front (OIDC against the Authentikarrstackapp). It path-routes via--upstreamsto:arrproxy-uifor/and static SPA assets,arrproxy-apifor/api/*(token API) and/sonarr|/radarr|/prowlarr(the *arr proxy).--skip-auth-regex=^/[^/]+/apibypasses oauth only for the *arr proxy API (/sonarr/api...), while/api/tokens,/api/meand the UI stay authenticated.--pass-user-headers(X-Forwarded-{User,Email,Groups}). The api readsARRPROXY_GROUPS_HEADER=X-Forwarded-Groups—--set-xauthrequestonly populates auth_request response headers and never reaches an--upstreamsbackend, so it is intentionally not used.identity.unkin.net(internal Vault-PKI CA) via acombine-certsinitContainer (system roots +vault-ca-cert), same pattern as artifactapi.Data + secrets
arrproxy-db(2 instances, cephrgw S3 backups + nightly ScheduledBackup). arrproxy-api does not self-migrate, so a wave-1 ArgoCDSynchook Job appliesmigrations/0001_init.sql(mirrored into a ConfigMap) as the CNPG app user. DSN built from the generatedarrproxy-db-appSecret.defaultSA / templated role — no terraform-vault change):arrproxy-pepper(seeded) andoauth-credentials. The three real *arr keys are reused from the existing<app>-apikeySecrets, projected one file per app into/etc/arrproxy/keys.Exposure
traefik-external, hostnamearrstack.unkin.net, cert-managervault-issuerTLS (arrproxy-gateway-tls); HTTPRoute → the oauth2-proxy entry Service (+ HTTP→HTTPS redirect).arrstack.unkin.netapex A record → external DMZ VIP198.18.199.0to the bind-operatorunkin.netzone (apps/base/bind-internal/authoritative/records.yaml), mirroring the ghp/identity apex records.Validation
kustomize build --enable-helm apps/overlays/au-syd1/arrstackrenders cleanly;kubeconform= 51/51 valid;pre-commitpasses (no plain Secrets).Prerequisites / flags for end-to-end function (NOT in this PR)
UrlBase=/<app>(path-based hosting) — arrproxy preserves the/<app>prefix upstream.arrstackOIDC app (terraform-authentik PR #18) must be applied, with redirect URIhttps://arrstack.unkin.net/oauth2/callbackregistered and theak_groupsscope emitted. Confirm the discovery slug matchesOAUTH2_PROXY_OIDC_ISSUER_URL(https://identity.unkin.net/application/o/arrstack/)./<app>/apiis oauth-bypassed (skip-auth-regex), so the SPA-driven proxy calls that rely on the session (no per-user token) will not carry identity on that path — expected per the arrproxy trust model; token-based *arr clients are unaffected.ARRPROXY_PEPPER was seeded via the agents AppRole at
kv/kubernetes/namespace/arrstack/default/arrproxy-pepper(keypepper).