Skip to content
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

[SC-7] Restrict egress traffic from EKS workloads by default, allow by configuration #3665

Closed
2 tasks
mogul opened this issue Jan 27, 2022 · 6 comments
Closed
2 tasks
Assignees
Labels
ATO compliance Relating to security compliance or documentation component/ssb Feature

Comments

@mogul
Copy link
Contributor

mogul commented Jan 27, 2022

User Story

In order to meet the intent of SC-7 (and sub-controls), EKS clusters provisioned by the SSB should restrict outbound traffic by default, and allow by exception/explicit configuration.

Acceptance Criteria

[ACs should be clearly demoable/verifiable whenever possible. Try specifying them using BDD.]

Outbound:

  • GIVEN I have provisioned an EKS cluster through the SSB
    AND I did not configure allowed outbound CIDRs during provision
    WHEN I kubectl ssh into a pod
    AND try to ping well-known public IPs
    THEN the traffic is blocked.
  • GIVEN I have provisioned an EKS cluster through the SSB
    AND I configured allowed outbound CIDRs during provision
    WHEN I kubectl ssh into a pod
    AND try to ping an IP in those allowed CIDR ranges
    THEN the traffic is permitted.

Background

[Any helpful contextual notes or links to artifacts/evidence, if needed]
NIST SC-7 says outbound traffic should be permitted by exception, not by default. We can restrict outbound IP ranges to just those configured at provisioning (or none, if none were provided) to meet the intent of this control for the SSB's managed boundary.

Security Considerations (required)

[Any security concerns that might be implicated in the change. "None" is OK, just be explicit here!]

Sketch

Most flexible option for users of the broker (though more complex and not a core k8s feature):

The simplest-to-implement near-term alternative is to just implementing CIDR-based controls:

@mogul mogul added the compliance Relating to security compliance or documentation label Mar 3, 2022
@mogul
Copy link
Contributor Author

mogul commented Mar 17, 2022

Sketch

[...]
Two alternative options for implementing CIDR-based controls:

[...]

I said in our meeting today that I thought the VPC-CNI add-on for EKS would be sufficient for us to implement a default-deny NetworkPolicy, but I was wrong... We still need Calico to do that. Luckily installing and validating Calico is pretty easy these days.

@mogul
Copy link
Contributor Author

mogul commented Mar 17, 2022

Note that the monzo-operator hasn't been touched in 11 months, so it may no longer be a first-choice solution.

@mogul mogul changed the title Restrict egress traffic from EKS clusters by default, allow by configuration [SC-7] Restrict egress traffic from EKS clusters by default, allow by configuration Mar 22, 2022
@mogul mogul added the ATO label Mar 22, 2022
@nickumia-reisys nickumia-reisys self-assigned this Mar 25, 2022
@nickumia-reisys
Copy link
Contributor

@nickumia-reisys
Copy link
Contributor

There's no way to implement a network policy that applies to all namespaces, so we must do them individually 😢

https://kubernetes.io/docs/concepts/services-networking/network-policies/#what-you-can-t-do-with-network-policies-at-least-not-yet

@mogul
Copy link
Contributor Author

mogul commented Mar 25, 2022

That's fine, we can do that with a for_each resource. Besides, right now we're brokering only one namespace, default.

@mogul mogul changed the title [SC-7] Restrict egress traffic from EKS clusters by default, allow by configuration [SC-7] Restrict egress traffic from EKS workloads by default, allow by configuration Mar 25, 2022
@hkdctol hkdctol closed this as completed Mar 31, 2022
@hkdctol hkdctol added this to the Sprint 20220331 milestone Apr 14, 2022
@mogul
Copy link
Contributor Author

mogul commented Apr 24, 2022

For future reference: Replacing Calico with Cilium would give us DNS-based egress control (like the Monzo operator) and mTLS between pods as well as many other service-mesh features.
https://cilium.io/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ATO compliance Relating to security compliance or documentation component/ssb Feature
Projects
Archived in project
Development

No branches or pull requests

3 participants