feat(config): allow global bypass by ip#889
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughAdds a global IP bypass list: config gains ChangesGlobal IP Bypass Configuration
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
|
@scottmckendry only nitpick in #889 (comment) and we can merge. |
1f446d5 to
69d9250
Compare
69d9250 to
e6582d3
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@internal/service/access_controls_rules.go`:
- Around line 189-192: IPAllowedRule.Evaluate is appending into slices that come
from ctx.ACLs (populated by
AccessControlsService.GetAccessControls/lookupStaticACLs) which share backing
arrays; to avoid mutating shared backing memory, copy the ACL slices before
merging: when building blockedIps and allowedIPs, create new slices from
ctx.ACLs.IP.Block and ctx.ACLs.IP.Allow (e.g. allocate a new slice or use a
slice-copy idiom) and then append the per-request entries into those new slices
so you never call append with a shared slice as the destination.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: a6720009-ca18-4999-8849-8695812ef2fa
📒 Files selected for processing (4)
internal/bootstrap/service_bootstrap.gointernal/model/config.gointernal/service/access_controls_rules.gointernal/service/access_controls_rules_test.go
e6582d3 to
98e7f38
Compare
Closes #516
New config env:
TINYAUTH_AUTH_IP_BYPASS=10.0.0.0/16,192.168.1.0/24,172.19.0.0/16or yaml:
Summary by CodeRabbit
New Features
Bug Fixes
Tests