security: add NetworkPolicy configuration for ATC deployment to address security advisory - GHSA-965m-v4cc-6334#243
Conversation
|
This is awesome!!! The only thing that would be needed to merge this PR in is a test. Basically what you described in your PR comment, but encoded into a test case. The atc integration tests share a kind instance. We could update it to use a k3d instance and then we could add a test case where a pod tries to curl the atc and expect it to fail. If needed I can convert the ATC to use k3d instead of kind for testing. |
yeah gimme sometime, I'll do it by today |
Do you mean replace with KIND in GitHub CI ? |
|
So if you look here we have a TestMain function where we do the setup of the cluster. All of the invocations do the setup with kind, but we could transform that to the equivalent k3d. (Forget about the node port mapping stuff, that was just stuff I was doing when I was using the tests for the setting up of demos as well in the early days). Then once the tests are using k3d, (which I have tested in the past works though I had no reason to switch so I didn't back then), we can add a new test |
…ss security advisory - GHSA-965m-v4cc-6334 Signed-off-by: Sai Sanjay <saisanjay7660@gmail.com>
…d pipeline Signed-off-by: Sai Sanjay <saisanjay7660@gmail.com>
Signed-off-by: Sai Sanjay <saisanjay7660@gmail.com>
…ube-system namespace Signed-off-by: Sai Sanjay <saisanjay7660@gmail.com>
Signed-off-by: Sai Sanjay <saisanjay7660@gmail.com>
…orwarding, coredns wait, and extended timeouts.
080313c to
5e4e55b
Compare
4bc3292 to
7bc2fcb
Compare
|
Okay! Sorry, I had to take over your branch a little to figure out what was going wrong, and exercise it in CI. I tweaked the PR to debug more information -> drop the ATC logs when it fails to takeoff and it dropped this: Essentially that This means that the installation of kubernetes doesn't have the MatchConditions field which has been stable since Kubernetes 1.30. Hence I did the same k3d install as in CI on my machine and running vs my homebrew installation: Which shows that the version in CI is using a very old and incompatible version of Kubernetes. |
7bc2fcb to
bb3fda7
Compare
|
Hey! Just wondering what the status was for the work on this PR? I would love to get this shipped soon :) |
|
Sorry for delayed response , currently checking again with atc unit tests , whether they're failing or not . |
Signed-off-by: Sai Sanjay <saisanjay7660@gmail.com>
|
@davidmdm I made a little bit change , can you approve the workflows for the tests to run in CI ? |
Closes: GHSA-965m-v4cc-6334
Adds network policies to atc installer , which restrict access to ATC service, allowing only kube-apiserver to connect
This pr might not work with kind , bcz
kindnetdoesn't enforce k8s networking policies . So production or any k8s cluster with proper CNI would work .Currently tested with k3d
Workaround :