ExternalName support update request #1837
Replies: 5 comments 3 replies
-
FWIW my intent was to ignore the suggestion (it is SHOULD not MUST). If 3 implementations are planning to do the same (assuming this based on +1s) then it does seem like it makes sense to drop the phrasing. |
Beta Was this translation helpful? Give feedback.
-
The current wording in the spec was very much focused on ingress use cases where it seems quite difficult to do safely. The concern of course is that any DNS name can be resolved to sensitive IPs that may expose content the proxy has access to but is not supposed to expose. With the Ingress API, ExternalName Services were never intended as targets, but the spec never said anything to prevent or even recommend against their use. Unfortunately this led to situations where ExternalName Services could be used to expose a lot of sensitive information within the proxy. The most common mitigation I've seen for that within Ingress controllers has been to make the functionality opt-in with a warning of the potential consequences. In any case, I'd agree with @howardjohn that "SHOULD NOT" is intentionally different than "MUST NOT". Per the language in RFC 2119, "SHOULD NOT" is analogous to "NOT RECOMMENDED". Here's the full text:
I think everyone in this thread would generally agree that forwarding to ExternalName Services is risky and should not be supported without careful consideration. That's what we're trying to communicate with the spec, but I know the RFC language may not be obvious here. Whenever we handle egress in the API we may need to revisit this, but I personally think the spec is appropriately worded right now. |
Beta Was this translation helpful? Give feedback.
-
Thanks all for the conversation. Thanks all for the conversation. |
Beta Was this translation helpful? Give feedback.
-
@brianehlert sorta related is EndpointSlices supports a FDQN address type - CoreDNS (1.8.4+) takes this FQDN type and makes it a CNAME entry in the K8s DNS. SInce Endpoints/Slices are managed by control planes (ie. Kubernetes,Knative) and users don't typically interact with it - thus creating/updating could be restricted for users. I thought this type of resource would be a good candidate as a potential to support (ie. K8s Headless Service with an FQDN EndpointSlice) - #1718 But upstream looking to deprecate it - it seems people were unaware of the CoreDNS support and thought it wasn't used Could you comment with your ExternalName use cases? |
Beta Was this translation helpful? Give feedback.
-
Hi @robscott @dprotaso, one of the use case for using externalName service is Edge CDN back to origin use case. Use case details: Once the proxy on the edge cluster receives specific user request pattern, it will forward the request to ANOTHER cluster through DNS resolution utilizing the externalName service. Due to security reasons above, gateway APIs does not support externalName service. Is there any other work around? I know we can utilize endpointslice with FQDN. However, I think this approach has the same security risks as using externalName service. Any suggestions or work arounds? |
Beta Was this translation helpful? Give feedback.
-
I would like to raise a conversation around supporting ExternalName.
Or rather raise a change to the rather strongly worded statement here.
// ExternalName services can refer to CNAME DNS records that may live // outside of the cluster and as such are difficult to reason about in // terms of conformance. They also may not be safe to forward to (see // CVE-2021-25740 for more information). Implementations SHOULD NOT // support ExternalName Services.
ExternalName support is a common use case among the NGINX Ingress Controller customers (NGINX's project, I can't speak for the K8s community project)
It is combined with other use cases such as egressMTLS, traffic steering, backup service support, and other use cases that make for a very powerful reverse proxy at the edge all up.
What I would like is for the group to consider striking the opinionated language of: "Implementations SHOULD NOT support ExternalName Services."
The remainder of the advice is fine to maintain. But I think blocking a use case that has become relatively common place with Ingress (at least the NGINX implementation) is a bit of overreach.
Beta Was this translation helpful? Give feedback.
All reactions