Skip to content

Conversation

rshriram
Copy link
Member

This is essential in multicluster with gateway scenario where we could
apply RBAC at the ingress gateway to determine whether traffic for a
particular global service is allowed or not.

Signed-off-by: Shriram Rajagopalan shriramr@vmware.com

Signed-off-by: Shriram Rajagopalan <shriramr@vmware.com>
@istio-testing
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rshriram

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@istio-testing
Copy link
Collaborator

@rshriram: The following tests failed, say /retest to rerun them all:

Test name Commit Details Rerun command
prow/istio-unit-tests.sh 26cbe58 link /test istio-unit-tests
prow/e2e-simpleTests-cni.sh 26cbe58 link /test e2e-simpleTests-cni
prow/istio-integ-k8s-tests.sh 26cbe58 link /test istio-integ-k8s-tests
prow/e2e_pilotv2_auth_sds.sh 26cbe58 link /test istio_auth_sds_e2e

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.

return nil
}

return setupFilters(in, mutable)
Copy link
Contributor

@yangminzhu yangminzhu Feb 20, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this break any existing usage?
Let's say we have service foo and bar. Assume we only have rbac policy that allows GET access to foo for identity bar.

Before this PR, the rbac filter is generated only in the inbound listener of service foo. foo is still able to access other targets as there is no rbac filter on its outbound listener list.

After this PR, the rbac filter is generated in both inbound listener list and outbound listener list of foo. This has an side effect that foo is unable to access anyone in the mesh as its identity is always foo, not bar.

When generating the outbound listener, can we check the node.type and only generate if it's gateway? So that we exclude the sidecar in this case.

Also we need to test this in real deployment and add e2e tests. We can add e2e tests later but at least a manual test should be done before merging.

cc @liminw

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also RBAC on outbound is very tricky - it doesn't really provide any security, but may impact performance.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But since it's restricted to gateway - I think it is ok.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this do provide more security when the egress gateway is the only entity that is allowed to talk to the external in the mesh, like it's enforced by underlying firewall rule. In this case, using RBAC could provide more control on the egress traffic. For example: https://preliminary.istio.io/docs/examples/advanced-gateways/egress-gateway/

Also the RBAC is not enabled by default so if the user doesn't enable it, there is no performance impact.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So the in.Node.Type != model.Router will make sure it only apply to gateway right? If so I think we just need to test it. It shouldn't break any existing use case.

@stale
Copy link

stale bot commented Mar 6, 2019

This pull request has been automatically marked as stale because it has not had activity in the last 2 weeks. It will be closed in 30 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

@stale stale bot added the stale label Mar 6, 2019
@quanjielin
Copy link
Contributor

/cc @quanjielin

@yangminzhu
Copy link
Contributor

yangminzhu commented Mar 12, 2019

@rshriram I have done the manual test for this, feel free to merge to master. Or you can merge this one #12415 which includes the e2e test together. Thanks!

I prefer to do this in master as we still need to update the documents and probably add a new task, and adding this new feature in the last minute is still too risky for 1.1.

@pitlv2109
Copy link
Member

/cc @pitlv2109

@istio-testing istio-testing requested a review from pitlv2109 March 13, 2019 18:44
@yangminzhu yangminzhu closed this Mar 18, 2019
@rshriram rshriram deleted the enable_rbac_gateway branch December 6, 2019 19:03
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.

7 participants