How to do global allow-nothing policies in ambient
#53206
Closed
ca-scribner
started this conversation in
General
Replies: 1 comment 1 reply
-
|
@ca-scribner, I think we did all the work and just left the ticket hanging. Any issue with closing this one out based on: https://istio.io/latest/docs/ops/best-practices/security/#default-deny-pattern-with-waypoints |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Istio recommends using a "deny by default" approach to
AuthorizationPoliciesthrough policies likeallow-nothing. The logic is that it is safest to restrict everything and then explicitly allow the traffic you want. I'm having trouble implementing this same approach with ambient mode. With sidecar-enforced policies this felt straightforward, since L4 and L7 policy decisions were made by the same entity and defined by the sameAuthorizationPolicy. For ambient, however, we have two enforcement points: ztunnel (L4) and the waypoint (L7).What are the recommendations for this approach in ambient?
For example, a typical
allow-nothingpolicy that we'd use from sidecar configurations:will block all traffic as an L4 policy, including
waypoint->destinationtraffic, which means if I have:targetallow-nothingpolicyallow-source-to-targetL7 policyThe traffic is still rejected because
waypoint->targetis not allowed. I can address that case by:waypoint->targetwaypoint->any service it is working forPILOT_AUTO_ALLOW_WAYPOINT_POLICY=true, which effectively creates (2) automatically(1) works but feels tedious (doubles the number of
AuthorizationPolicies)(2) and (3) allow
source->targettraffic, but because all traffic goes through the waypoint now they also allowsource->target2iftarget2uses the same waypoint andtarget2doesn't already have an existing L7AuthorizationPolicy.I think I could create a policy for each waypoint that is an L7
allow-nothing, which brings things back to always requiring an allow even in cases (2) and (3), but I don't see a way without an extra policy per waypoint. And I don't see a way of doing this without creating policies specific to each waypoint. The beauty of theallow-nothingpolicy above is that it can be globalBeta Was this translation helpful? Give feedback.
All reactions