-
Notifications
You must be signed in to change notification settings - Fork 7.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor authz HeaderMatcher #42655
refactor authz HeaderMatcher #42655
Conversation
Hi @wulianglongrd. Thanks for your PR. I'm waiting for a istio member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
pilot/pkg/security/authz/builder/testdata/http/allow-full-rule-out.yaml
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, but please confirm it is not a behavior change.
pilot/pkg/security/authz/builder/testdata/http/allow-full-rule-out.yaml
Outdated
Show resolved
Hide resolved
pilot/pkg/security/authz/builder/testdata/http/allow-full-rule-out.yaml
Outdated
Show resolved
Hide resolved
pilot/pkg/security/authz/builder/testdata/http/allow-full-rule-out.yaml
Outdated
Show resolved
Hide resolved
ping @liminw |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please address my open comment
@howardjohn done |
hello @howardjohn, all open comments have been marked as resolved. Did I forget something? |
/ok-to-test |
Reopen because grpc-go already supports it. |
Prefix: v[:len(v)-1], | ||
}, | ||
}, | ||
StringMatch: StringMatcherPrefix(strings.TrimSuffix(v, "*"), true), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please keep the old behavior v[:len(v)-1]
. This changes the behavior of foo**
or similar.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done, thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks!
/retest |
Please provide a description of this PR:
This PR made some refactoring about authz
HeaderMatcher
.HeaderMatcher_StringMatch
instead of deprecatedHeaderMatcher_PrefixMatch
,HeaderMatcher_SuffixMatch
,HeaderMatcher_ExactMatch
andHeaderMatcher_SafeRegexMatch
.StringMatcher
.Use the more readable trim func, e.g. usestrings.TrimPrefix(v, "*")
instead ofv[1:]
.