Skip to content

fix: acl rule precedence - #1219

Merged
steveiliop56 merged 1 commit into
mainfrom
fix/acl-rule-precedence
Nov 2, 2026
Merged

steveiliop56 merged 1 commit into
mainfrom
fix/acl-rule-precedence

Conversation

@nicotsx

@nicotsx nicotsx commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • Bug Fixes
    • IP access rules are now checked before path-based rules. Requests from blocked IPs are rejected even when their path would otherwise be allowed, while permitted IPs and bypasses continue to work as expected.

@coderabbitai

coderabbitai Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between c3b5c04 and b60c919.

Files selected for processing: 3
  • internal/controller/proxy_controller.go
  • internal/controller/proxy_controller_test.go
  • internal/test/test.go

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

Walkthrough

The proxy now evaluates IP access rules before returning success when authentication is disabled. Added tests cover app-level and global IP rules alongside path rules, including IP bypass behavior.

Changes: Proxy ACL precedence

Layer / File(s) Summary
IP ACL evaluation and test coverage
internal/controller/proxy_controller.go, internal/controller/proxy_controller_test.go, internal/test/test.go
The proxy handles IP rejection before the authentication-disabled success response. Test configurations and cases cover app-level and global IP rules combined with path rules, including unrestricted and bypassed IPs.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: steveiliop56

Merge Risk: Minimal · up to b60c9

IP rules now apply before authentication-disabled success. No merge-blocking issue was identified.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly identifies the main change: fixing ACL rule precedence. It is concise and specific.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 3 files.

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Oct 30, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 13.11475% with 53 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
internal/test/test.go 0.00% 53 Missing ⚠️

📢 Thoughts on this report? Let us know!

@steveiliop56
steveiliop56 merged commit 35bdfa8 into main Nov 2, 2026
9 checks passed
@steveiliop56
steveiliop56 deleted the fix/acl-rule-precedence branch November 2, 2026 13:45
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.

2 participants