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

Fork and exec is dangerous and slow #422

Closed
kingdonb opened this issue Feb 13, 2023 · 1 comment
Closed

Fork and exec is dangerous and slow #422

kingdonb opened this issue Feb 13, 2023 · 1 comment

Comments

@kingdonb
Copy link
Collaborator

Expected behaviour

When the Flux/VSCode extension reaches out to remote clusters, it should use a stateful connection and batch requests. I am unsure if this can be done with the Kubernetes API directly, because of the common nature of Kubernetes APIs which always have a self-signed certificate.

This means that we cannot connect with a client like
https://github.com/kubernetes-client/javascript or https://www.npmjs.com/package/@kubernetes/client-node
which has a facet that accepts a certificate-authority-data in the kubeconfig, since in the sandbox you cannot have any custom certificate data, you are sandboxed.

This is a hard one to solve. It results in performance issues (#407), security issues (this fork and exec danger has been there, at the site of every CVE we have published so far), and generally would be a good idea to solve this in a cross-cutting way.

Actual behaviour

The kubectl and flux binaries are always used through fork and exec.

We could hit the Kubernetes API instead, if we were able to reach it from inside of the sandbox, but we cannot do that because of the linked issue above (self-signed certificates cannot be used for connections inside of the sandbox, unless they have been added to the certificate trust in the sandbox.)

Steps to reproduce

N/A

Versions

VSCode version: 0.23.1 and earlier

@kingdonb
Copy link
Collaborator Author

kingdonb commented Jul 28, 2023

Closed in v0.25.0 ...let's link to the actual release notes of v0.25.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant