Skip to content

refactor!: rename the authz sidecar to proxy - #174

Merged
jbouder merged 1 commit into
mainfrom
refactor/proxy-sidecar
Oct 22, 2026
Merged

jbouder merged 1 commit into
mainfrom
refactor/proxy-sidecar

Conversation

@jbouder

@jbouder jbouder commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

What and why

Renames the authz sidecar to proxy everywhere current. Since #168 the gateway (nebari-operator v0.2.0 SecurityPolicy) enforces sign-in and access.groups; the sidecar authorizes nothing. It only proxies requests and records activity for scale to zero, and gives image Apps the single front port 8080. The name authz made readers think the pod checks access. Doing it now, before 0.2.0 (which already carries the image rename from #169) and before the Quay repositories in #85 exist.

Ports (8080 front, 8081 app, 8082 health/activity) and behaviour are unchanged.

Renames

  • Component: apps-authz -> apps-proxy ("the proxy sidecar"); binary /apps-proxy.
  • Directory and module: authz/ -> proxy/ (git mv), module github.com/nebari-dev/nebari-apps-pack/proxy.
  • Image: matrix entry authz -> proxy in images.yaml, so ghcr.io/nebari-dev/apps-pack/proxy and quay.io/nebari/apps-pack-proxy; release.yaml tag path proxy.image.tag; Dependabot directories; CI job authz / "Authz sidecar" -> proxy / "Proxy sidecar", plus the toolchain/Dockerfile checks.
  • Chart: authz.* -> proxy.* (values.yaml, values.schema.json, _helpers.tpl nebari-apps.proxyImage, operator args); README regenerated with helm-docs.
  • Operator: flags --authz-image, --authz-image-pull-policy, --authz-resources -> --proxy-* (env PROXY_IMAGE, PROXY_IMAGE_PULL_POLICY, PROXY_RESOURCES); container authz -> proxy, port name authz-health -> proxy-health; authz.go/authz_test.go -> proxy.go/proxy_test.go; AuthzImage, DefaultAuthzResources, checkAuthz, addAuthzSidecar etc. -> Proxy*.
  • Sidecar env: AUTHZ_LISTEN, AUTHZ_HEALTH_LISTEN, AUTHZ_UPSTREAM -> PROXY_*. AUTHZ_PASSTHROUGH was no longer read and is dropped from comments/tests rather than renamed.
  • dev/Makefile: PROXY_IMG := apps-proxy:dev, proxy-image target, --set proxy.image.*.
  • CRD/type comments (regenerated CRD and ui/src/lib/crd.gen.ts), API/MCP comments and messages, docs, AGENTS.md, README.md, CONTRIBUTING.md, skill, examples.

What stays, and why

  • The mixed-version guard. The sidecar still refuses to start when AUTHZ_GROUPS, AUTHZ_ISSUERS, AUTHZ_JWKS_URL or AUTHZ_CLIENT_ID is set, under those literal old names (with a comment saying why): an older operator that still passes group settings must never run a restricted App open. The error message is unchanged ("AUTHZ_GROUPS is set, but this sidecar no longer checks tokens or groups ...").
  • New: the old names of its own settings fail closed too. An operator from before this rename passes AUTHZ_LISTEN/AUTHZ_HEALTH_LISTEN/AUTHZ_UPSTREAM. The proxy would already fail on the missing PROXY_UPSTREAM; it now also says explicitly "AUTHZ_UPSTREAM is set, but this sidecar (apps-proxy, formerly apps-authz) reads PROXY_UPSTREAM: upgrade the apps-operator to match this image". Tested with an exact old-operator environment. The reverse (new operator, old authz image) fails on "AUTHZ_UPSTREAM is required".
  • Historical text: CHANGELOG.md and the past "Version notes" in upgrading.md keep their authz wording, except two spots a reader would follow today (the shorter-image-names note now points at proxy, and the 0.1.0 -> 0.2.0 note names proxy.image).
  • api/tests/test_authz.py (API route authorization, unrelated) and "authn/authz filter" in operator/cmd/main_test.go (controller-runtime metrics auth) are not about the sidecar.

Docs

New "Upgrading to the proxy sidecar" section at the top of the version notes (renamed image and authz.* -> proxy.* keys, the schema rejects the old key, pods with the sidecar roll once, kubectl logs -c authz -> -c proxy, upgrade chart and images together). The troubleshooting item now covers both mismatch directions.

Checks run

  • proxy/: go build, go vet, go test ./... -race, go mod tidy -diff, golangci-lint run: pass.
  • operator/: go build, go vet, go test ./... -race, golangci-lint run: pass; envtest suite (k8s 1.37.0): pass. controller-gen v0.21.0 + gen_crd_types.py: no drift beyond the comment changes.
  • api/, mcp/: pytest (316 / 71 passed), ruff check, ruff format --check, mypy: pass.
  • ui/: npm run check:ci, npm test (288 passed): pass.
  • docs/: bun test test, bun run build: pass.
  • Chart: helm lint pass; helm-docs (pinned digest from ci.yaml) regenerated README; helm template with examples/nebari-values.yaml renders --proxy-image=ghcr.io/nebari-dev/apps-pack/proxy:0.1.0 etc. and no authz; --set authz.image.tag=x is rejected by the schema.
  • check_doc_paths.py, check_versions.py, actionlint 1.7.12: pass.

Not tested on a cluster.

Notes

🤖 Generated with Claude Code

https://claude.ai/code/session_01Ap1Tqx1QLHRGVVSXdxeduM

Since the gateway took over sign-in and access.groups (nebari-operator
v0.2.0 SecurityPolicy, #168), the sidecar authorizes nothing: it proxies
requests, records activity for scale to zero and gives image Apps the
single front port 8080. The name "authz" made readers think the pod checks
access. Rename it before 0.2.0, which already renames the images (#169),
and before the Quay repositories are created (#85).

The directory, Go module, image, chart values, operator flags, container
name, port name and sidecar env vars move from authz to proxy. Ports and
behaviour are unchanged. The sidecar still refuses to start when
AUTHZ_GROUPS (or another setting of the removed enforcing mode) is set,
under its old name on purpose, and now also when it gets its own settings
under the old AUTHZ_ names, so an operator from before the rename fails
closed instead of starting an App open. AUTHZ_PASSTHROUGH, which nothing
read any more, is no longer mentioned.

BREAKING CHANGE: the sidecar image is now ghcr.io/nebari-dev/apps-pack/proxy
(quay.io/nebari/apps-pack-proxy) and the chart's authz.* values are now
proxy.*; the schema rejects the old key. The sidecar container is renamed
from authz to proxy, so every pod that runs it rolls once. Upgrade the
chart and images together.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ap1Tqx1QLHRGVVSXdxeduM
@github-actions

Copy link
Copy Markdown

📄 Docs preview for refactor/proxy-sidecar:
https://refactor-proxy-sidecar.apps-pack.pages.dev

@jbouder
jbouder merged commit ebbcbce into main Oct 22, 2026
15 checks passed
@jbouder
jbouder deleted the refactor/proxy-sidecar branch October 22, 2026 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant