Skip to content

fix(authz): honor namespace bypasses and prevent existence leaks - #1154

Merged
oliverbaehler merged 2 commits into
projectcapsule:mainfrom
oliverbaehler:feat/namespace-rules-fix
Nov 19, 2026
Merged

oliverbaehler merged 2 commits into
projectcapsule:mainfrom
oliverbaehler:feat/namespace-rules-fix

Conversation

@oliverbaehler

Copy link
Copy Markdown
Member

No description provided.

Signed-off-by: Oliver Baehler <oliver@sudo-i.net>
Copilot AI balanced review requested due to automatic review settings November 19, 2026 08:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Namespace self-reviews can expose namespace existence across tenant boundaries and incorrectly deny GETs permitted through allowedPaths or publicPaths bypasses.

2 open issues
What changed in this PR

This PR expands namespace access coverage and aligns named namespace self-reviews with the proxy’s existing namespace GET module.

Changes:

  • Adds tenant-aware end-to-end tests for global namespace grants, isolation, updates, revocation, and disabled caching.
  • Reuses namespace GET authorization for named self-reviews, with unit tests and benchmarks.
  • Adds read-only dependency checks and e2e compilation before cluster provisioning.

Validation was limited to code inspection; tests and benchmarks were not run.

File Description
Taskfile.yml Checks e2e compilation and enforces read-only module dependencies.
internal/​webserver/​webserver.go Retains the namespace GET module for self-review evaluation.
internal/​webserver/​namespace_authorization.go Evaluates named namespace self-reviews through the GET module.
internal/​webserver/​namespace_authorization_test.go Tests review decisions, response formats, concurrency, and lookup counts.
internal/​webserver/​namespace_authorization_bench_test.go Benchmarks namespace review transformations and read counts.
internal/​webserver/​global_proxy.go Reuses the shared resource-name route constant.
internal/​modules/​namespace/​namespace_test.go Adds namespace reader-error and forwarding coverage.
internal/​authorization/​middleware.go Exports the shared self-review grant helper.
go.sum Removes older checksums and adds YAML dependency checksums.
e2e/​README.md Documents namespace scenarios and runner checks.
e2e/​namespace_global_rules_test.go Adds namespace grant, isolation, lifecycle, and latency scenarios.
e2e/​global_access_test.go Allows extra arguments for isolated proxy instances.

Review effort: Balanced

Signed-off-by: Oliver Baehler <oliver@sudo-i.net>
@oliverbaehler oliverbaehler changed the title chore: add namespace rule e2e tests fix(authz): honor namespace bypasses and prevent existence leaks Nov 19, 2026
@oliverbaehler
oliverbaehler requested a balanced review from Copilot November 19, 2026 15:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Human review is needed for security-sensitive native RBAC overrides because real-cluster bypass, reflection revocation, uncached behavior, and latency validation results were unavailable.

No open issues 🎉

2 resolved since last review

Review effort: Balanced

@oliverbaehler
oliverbaehler merged commit c2a0350 into projectcapsule:main Nov 19, 2026
18 of 19 checks passed
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.

3 participants