-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Add additional fields for ServiceRole, issue: #11516 (#11712) #12299
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
Conversation
fe51daf
to
23ec18a
Compare
/test istio-pilot-e2e-envoyv2-v1alpha3 |
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.
Based on previous review in #11712, looks good for the changes to rbac.
Could you copy the original PR description to this PR as well.
/lgtm
23ec18a
to
b69f5bc
Compare
@yangminzhu |
/test istio_auth_sds_e2e |
What does this PR do? |
@andraxylia Originally PR and discussion here: #11712 |
/cc @diemtvu |
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.
Just few nits
/lgtm
@@ -555,6 +558,26 @@ func convertRbacRulesToFilterConfig(service *serviceMetadata, option rbacOption) | |||
return &http_config.RBAC{Rules: rbac} | |||
} | |||
|
|||
// appendRule appends a |rule| to |rules| if |rule| is not nil. | |||
func appendRule(rules *policyproto.Permission_AndRules, rule *policyproto.Permission) { | |||
if rule == nil { |
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.
[nit] Reverse the condition and put the append inside the if is more readable.
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! I will make the change in the next PR.
|
||
// appendNotRule appends a |notRule| to AndRules of |rules| if |notRule| is not nil. | ||
func appendNotRule(rules *policyproto.Permission_AndRules, notRule *policyproto.Permission) { | ||
if notRule == nil { |
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.
same here
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: diemtvu, pitlv2109, yangminzhu The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@pitlv2109: The following tests failed, say
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. I understand the commands that are listed here. |
For #12394 |
Similar to #11712 from the
authz-v2
feature branch. This is to merge some changes fromauthz-v2
tomaster
.Support notPaths, notMethods, ports, notPorts, hosts, notHosts in ServiceRole (+ unit testing and refactoring).
PR for #11516.