-
Notifications
You must be signed in to change notification settings - Fork 34
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
[Policy Assistant] calculate all allowed connections in a cluster #221
Comments
Some good discussion on this today. Takeaways:
|
The Kubernetes project currently lacks enough contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
Parent issue: #150
Goal
For all the Deployments and DaemonSets in a cluster, calculate the set of allowed connections given a set of policies.
Current Functionality
Check whether traffic is allowed/denied for the specified source, destination, and port/protocol.
Proposed New Feature
Produce JSON of all allowed connections and the effective policy rules causing this.
Here is one idea for the format (let me put this in a PR):
Implementation
There is a policy engine that calculates whether traffic is allowed/denied for a given set of:
Can we brute force calculate all possible connections between each Deployment/DaemonSet in a cluster? There are only 65,000 ports, so this may be feasible?
Code
It's determined whether traffic is allowed here:
network-policy-api/cmd/policy-assistant/pkg/matcher/policy.go
Line 269 in 669dfbc
network-policy-api/cmd/policy-assistant/pkg/matcher/policy.go
Line 311 in 669dfbc
Based on the port/protocol logic from the
PeerMatcher
interface:network-policy-api/cmd/policy-assistant/pkg/matcher/peermatcher.go
Line 29 in 669dfbc
The text was updated successfully, but these errors were encountered: