Repository navigation
acl: move the domain glob matcher to acl/v2 - #359
Open
shubh-stripe wants to merge 1 commit into
Open
shubh-stripe wants to merge 1 commit into
shubh-stripe wants to merge 1 commit into
Conversation
The v2 ACL replaces acl/v1, so the domain glob validator and matcher move to the new acl/v2 package, with their tests. acl/v1 keeps ValidateDomainGlob and HostMatchesGlob as wrappers until it is removed, and decides exactly as before. The matcher's same-registrable-domain switch is now exported as MatchGlob(host, glob, crossPublicSuffix). The v1 global deny list calls it with crossPublicSuffix=true, as it always matched. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Committed-By-Agent: claude
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.
Each ACL source uses its own layout today, and the v1
Decidehas a precedence order that the file doesn't show: a service's allowed domains win overglobal_deny_list, a service can't deny a domain, and allow lists and the deny list match the same glob text in different ways.This starts a new ACL v2 format and decision engine in
acl/v2. This PR only moves the domain glob matcher there, with no behavior change. Later PRs add the v2 format and the engine, then switch smokescreen andcmdto decide through it and load v2 files only.What changes
v1's domain glob validator and matcher (
ValidateDomainGlob,HostMatchesGlob, the label-wildcard parser and matcher) move fromacl/v1to the newacl/v2package, with their tests. v1 keepsValidateDomainGlobandHostMatchesGlobas wrappers, so it decides exactly as before. The same-registrable-domain switch is now the exportedMatchGlob(host, glob, crossPublicSuffix); the v1 global deny list keeps calling it withcrossPublicSuffix=true, as it always matched.Test plan
The existing v1 tests pass unchanged in their new location, except one that now calls the exported matcher instead of the unexported one.
🤖 Generated with Claude Code