-
Notifications
You must be signed in to change notification settings - Fork 689
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
Alternatives approaches to supporting ExternalName services #3950
Comments
|
I guess defaults can always be discussed (including usual "secure by default" vs "backwards compatible" arguments) but I think it would be important to keep secure option without requiring additional software to avoid use of insecure parts.
From security point-of-view this could be good: it would avoid users from being in full control of routing destinations - assuming the user cannot also control which address the DNS resolves the destination hostname to.
Could Envoy RBAC filter be used to block the admin API? Though we still are left with the impacts of more general Kubernetes CVE-2021-25740 vulnerability. |
I think it's important to remember that the reason that we've added this flag and set it to Let me explain. If I have a Service This totally breaks Contour's aim to be a secure-by-default solution, so when we realised that ExternalName Services could be used this way, we had no choice to add this flag and default processing of ExternalName services to off. Contour must be as secure as we can make it by default, without needing to install any extra software. The flag also functions as an "I accept the risks" checkbox. I know that this breaks Knative, and I'm sorry, but I can't knowingly ship an insecure Contour to the non-Knative users. I understand that Knative works in a different way and isn't really exposing the functionality to users, so the security context of using ExternalName is a bit different, but we gotta look after everyone. In regards to the specific asks:
|
I agree with Nick that as long as ExternalName has this kind of behavior, we should ship with the capability turned off by default to protect users unaware of this vulnerability. It is actually recommended by CNCF if I remember correctly (I will try to dig up the exact phrasing). That should be the default state, realized through whatever means and then we should deliver a way to adjust this through a flag or allowlist for the Knative team. The reason solution 1 might not be the best is because it seems to assume well established teams with clear separation of duties and knowledge of this issue with ExternalName. Since we are moving config to a new CR soon, maybe we can expose the allowlist tuning in the CR. |
Just to clarify, @xaleeks, you mean "since we are moving to a new CR for configuration soon", right? HTTPProxy is staying around for a long time. |
Yup, we are moving to using a CRD for representing the Contour config and the underlying Envoy so that this representation can be validated and reconciled by k8s. HTTPProxy will be around for a long time indeed. Have we shared this design with the community yet? If not, we should socialize the design from Steve Sloka |
I don't think we have shared that design yet, no. |
Another alternative I discovered is that They can RBAC'd separately from K8s Services and there's guidance upstream about limiting write access. If Knative, instead of using Related: #2696 |
That sounds like a good solution that will end up more secure for everyone @dprotaso. I guess the action for Contour there is to get that EndpointSlice support built? |
Yup. Has there been any progress? |
Knative is still on v1.18.x - is there anything new in v1.19 supporting this? |
There hasn't been any further progress on this yet, sorry. |
The Contour project currently lacks enough contributors to adequately respond to all Issues. This bot triages Issues according to the following rules:
You can:
Please send feedback to the #contour channel in the Kubernetes Slack |
The Contour project currently lacks enough contributors to adequately respond to all Issues. This bot triages Issues according to the following rules:
You can:
Please send feedback to the #contour channel in the Kubernetes Slack |
Problem
The
enableExternalNameService
config being defaulted tofalse
is a breaking change for usersNow that there is a PR mitigating envoy admin console access - #3934 we should consider alternatives/modifications to that flag.
contour/examples/contour/01-contour-config.yaml
Lines 53 to 57 in f9f263e
Potential Alternatives
1. Remove the flag
By removing the flag we would defer the responsibility of who can create
ExternalName
services to a separate system - ie. https://www.openpolicyagent.org.This would fall on cluster operators to create policies granting privileges to system components (ie. Knative) & users
2. Allow list
An allow list would allow cluster operators to specify which ExternalName entries are to be included in Contour's routing tier.
I think this list would need to be host/port pairs - ie. Knative uses ExternalName to point to the envoy k8s service of a contour installation. We would only want routing to happen on port 80 or 443 and not any metrics/admin ports etc.
3. EndpointSlices with CNAME Address Type
see: #3950 (comment)
4. Other
There's probably other approaches but I can't think of anything - is there any discussion re: gateway APIs around this?
The text was updated successfully, but these errors were encountered: