Repository navigation
refactor!: rename the authz sidecar to proxy - #174
Merged
Merged
Conversation
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
|
📄 Docs preview for |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
Renames the
authzsidecar toproxyeverywhere current. Since #168 the gateway (nebari-operator v0.2.0 SecurityPolicy) enforces sign-in andaccess.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 nameauthzmade 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
apps-authz->apps-proxy("the proxy sidecar"); binary/apps-proxy.authz/->proxy/(git mv), modulegithub.com/nebari-dev/nebari-apps-pack/proxy.authz->proxyinimages.yaml, soghcr.io/nebari-dev/apps-pack/proxyandquay.io/nebari/apps-pack-proxy;release.yamltag pathproxy.image.tag; Dependabot directories; CI jobauthz/ "Authz sidecar" ->proxy/ "Proxy sidecar", plus the toolchain/Dockerfile checks.authz.*->proxy.*(values.yaml, values.schema.json,_helpers.tplnebari-apps.proxyImage, operator args); README regenerated with helm-docs.--authz-image,--authz-image-pull-policy,--authz-resources->--proxy-*(envPROXY_IMAGE,PROXY_IMAGE_PULL_POLICY,PROXY_RESOURCES); containerauthz->proxy, port nameauthz-health->proxy-health;authz.go/authz_test.go->proxy.go/proxy_test.go;AuthzImage,DefaultAuthzResources,checkAuthz,addAuthzSidecaretc. ->Proxy*.AUTHZ_LISTEN,AUTHZ_HEALTH_LISTEN,AUTHZ_UPSTREAM->PROXY_*.AUTHZ_PASSTHROUGHwas no longer read and is dropped from comments/tests rather than renamed.PROXY_IMG := apps-proxy:dev,proxy-imagetarget,--set proxy.image.*.ui/src/lib/crd.gen.ts), API/MCP comments and messages, docs, AGENTS.md, README.md, CONTRIBUTING.md, skill, examples.What stays, and why
AUTHZ_GROUPS,AUTHZ_ISSUERS,AUTHZ_JWKS_URLorAUTHZ_CLIENT_IDis 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 ...").AUTHZ_LISTEN/AUTHZ_HEALTH_LISTEN/AUTHZ_UPSTREAM. The proxy would already fail on the missingPROXY_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".upgrading.mdkeep theirauthzwording, except two spots a reader would follow today (the shorter-image-names note now points atproxy, and the 0.1.0 -> 0.2.0 note namesproxy.image).api/tests/test_authz.py(API route authorization, unrelated) and "authn/authz filter" inoperator/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-genv0.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.helm lintpass; helm-docs (pinned digest from ci.yaml) regenerated README;helm templatewithexamples/nebari-values.yamlrenders--proxy-image=ghcr.io/nebari-dev/apps-pack/proxy:0.1.0etc. and noauthz;--set authz.image.tag=xis rejected by the schema.check_doc_paths.py,check_versions.py, actionlint 1.7.12: pass.Not tested on a cluster.
Notes
apps-pack-proxyinstead ofapps-pack-authz(not edited here).🤖 Generated with Claude Code
https://claude.ai/code/session_01Ap1Tqx1QLHRGVVSXdxeduM