-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
kubernetes_service
does not honour HTTP_PROXY
for outbound requests to clusters
#30550
Labels
Comments
webvictim
added
bug
kubernetes-access
c-bl
Internal Customer Reference
http-proxy
labels
Aug 16, 2023
tigrato
added a commit
that referenced
this issue
Aug 16, 2023
PR #11257 disabled support of `HTTP_PROXY`, `HTTPS_PROXY` and `NO_PROXY` environement flags for Kubernetes Access. The desired behavior was expected to be respected only by the Kubernetes Proxy and Kubernetes Legacy Proxy when dialing over reverse tunnel but ended up applied to all outbound connections from Kube Access flow. This PR enables support for proxy env's when dialing directly to the Kubernetes Cluster - `kubernetes_service` and `legacy_proxy` when the cluster is local. Fixes #30550 Signed-off-by: Tiago Silva <[email protected]>
github-merge-queue bot
pushed a commit
that referenced
this issue
Aug 17, 2023
* Respect `[HTTP(S)|NO]_PROXY` envs when dialing directly to Kube PR #11257 disabled support of `HTTP_PROXY`, `HTTPS_PROXY` and `NO_PROXY` environement flags for Kubernetes Access. The desired behavior was expected to be respected only by the Kubernetes Proxy and Kubernetes Legacy Proxy when dialing over reverse tunnel but ended up applied to all outbound connections from Kube Access flow. This PR enables support for proxy env's when dialing directly to the Kubernetes Cluster - `kubernetes_service` and `legacy_proxy` when the cluster is local. Fixes #30550 Signed-off-by: Tiago Silva <[email protected]> * fix func name * fix comment --------- Signed-off-by: Tiago Silva <[email protected]>
tigrato
added a commit
that referenced
this issue
Aug 17, 2023
* Respect `[HTTP(S)|NO]_PROXY` envs when dialing directly to Kube PR #11257 disabled support of `HTTP_PROXY`, `HTTPS_PROXY` and `NO_PROXY` environement flags for Kubernetes Access. The desired behavior was expected to be respected only by the Kubernetes Proxy and Kubernetes Legacy Proxy when dialing over reverse tunnel but ended up applied to all outbound connections from Kube Access flow. This PR enables support for proxy env's when dialing directly to the Kubernetes Cluster - `kubernetes_service` and `legacy_proxy` when the cluster is local. Fixes #30550 Signed-off-by: Tiago Silva <[email protected]> * fix func name * fix comment --------- Signed-off-by: Tiago Silva <[email protected]>
Reopening because |
github-merge-queue bot
pushed a commit
that referenced
this issue
Aug 22, 2023
…) (#30615) * Respect `[HTTP(S)|NO]_PROXY` envs when dialing directly to Kube PR #11257 disabled support of `HTTP_PROXY`, `HTTPS_PROXY` and `NO_PROXY` environement flags for Kubernetes Access. The desired behavior was expected to be respected only by the Kubernetes Proxy and Kubernetes Legacy Proxy when dialing over reverse tunnel but ended up applied to all outbound connections from Kube Access flow. This PR enables support for proxy env's when dialing directly to the Kubernetes Cluster - `kubernetes_service` and `legacy_proxy` when the cluster is local. Fixes #30550 * fix func name * fix comment --------- Signed-off-by: Tiago Silva <[email protected]>
tigrato
added a commit
that referenced
this issue
Aug 28, 2023
This PR enables support for proxy env's when dialing directly to the Kubernetes Cluster - `kubernetes_service` and `legacy_proxy` when the cluster is local - for the SPDY protocol used by `kubectl exec` and `kubectl portforward`. PR #30583 introduced support for normal HTTP requests but missed support for SPDY requests. Fixes #30550 Signed-off-by: Tiago Silva <[email protected]>
github-merge-queue bot
pushed a commit
that referenced
this issue
Aug 29, 2023
…PDY (#30624) * Respect `[HTTP(S)|NO]_PROXY` envs when dialing directly to Kube via SPDY This PR enables support for proxy env's when dialing directly to the Kubernetes Cluster - `kubernetes_service` and `legacy_proxy` when the cluster is local - for the SPDY protocol used by `kubectl exec` and `kubectl portforward`. PR #30583 introduced support for normal HTTP requests but missed support for SPDY requests. Fixes #30550 Signed-off-by: Tiago Silva <[email protected]> * add proxier helper --------- Signed-off-by: Tiago Silva <[email protected]>
tigrato
added a commit
that referenced
this issue
Aug 29, 2023
…PDY (#30624) * Respect `[HTTP(S)|NO]_PROXY` envs when dialing directly to Kube via SPDY This PR enables support for proxy env's when dialing directly to the Kubernetes Cluster - `kubernetes_service` and `legacy_proxy` when the cluster is local - for the SPDY protocol used by `kubectl exec` and `kubectl portforward`. PR #30583 introduced support for normal HTTP requests but missed support for SPDY requests. Fixes #30550 Signed-off-by: Tiago Silva <[email protected]> * add proxier helper --------- Signed-off-by: Tiago Silva <[email protected]>
github-merge-queue bot
pushed a commit
that referenced
this issue
Aug 29, 2023
…PDY (#30624) (#31133) * Respect `[HTTP(S)|NO]_PROXY` envs when dialing directly to Kube via SPDY This PR enables support for proxy env's when dialing directly to the Kubernetes Cluster - `kubernetes_service` and `legacy_proxy` when the cluster is local - for the SPDY protocol used by `kubectl exec` and `kubectl portforward`. PR #30583 introduced support for normal HTTP requests but missed support for SPDY requests. Fixes #30550 * add proxier helper --------- Signed-off-by: Tiago Silva <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Expected behavior
Teleport's
kubernetes_service
should use theHTTP_PROXY
orHTTPS_PROXY
set in the Teleport's process's environment when accessing remote Kubernetes clusters.Current behavior
The supplied
HTTP_PROXY
seems to only be used when performing the initialSelfSubjectAccessReview
as part of the Teleport process' startup. Regularkubectl
commands do not go through the proxy and cause a connection error to be displayed when outbound traffic via the default gateway is blocked.Logs
Teleport server:
Client:
Outbound traffic was blocked from the VM using
sudo iptables -A OUTPUT -p tcp -m tcp --dport 443 -j REJECT
Charles proxy:
Config files
/etc/teleport.yaml
:/etc/default/teleport
:Teleport process environment:
/etc/teleport/kubeconfig.yaml
:Bug details
Teleport v13.2.3 git:v13.2.3-0-g4785e70 go1.20
This issue was reported by a customer and reproduced by me.
The text was updated successfully, but these errors were encountered: