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

Self signed certificate in certificate chain. #1451

Closed
HoloPanio opened this issue Nov 25, 2023 · 5 comments
Closed

Self signed certificate in certificate chain. #1451

HoloPanio opened this issue Nov 25, 2023 · 5 comments

Comments

@HoloPanio
Copy link

HoloPanio commented Nov 25, 2023

Prolouge

Before I get into this, I need to state that I am using this library in Bun, and when I moved some demo code with my kubeconfig, it worked fine.

The Issue

I was trying some very basic kubernetes methods such as just fetching pods or namespaces, and when I went to run it, I was met with the following error: Error: SELF_SIGNED_CERT_IN_CHAIN: self signed certificate in certificate chain. I have tried for many hours to get this error to go away, but nothing I have done has worked. I have tried everything, but nothing seems to work. I tried setting it to ignore tls verification in the kubeconfig file, but no dice.

I have tried it with the env var "NODE_TLS_REJECT_UNAUTHORIZED=0", which produced a new error that was:
image

I am pretty sure this is a problem with Bun, and if there is a known, or possible fix that I could introduce that would at least circumvent this error long enough for a permeant fix to be introduced, that would be awesome.

Additional Information

Bun Version: 1.0.8
k8s Package Version: ^0.20.0

@brendandburns
Copy link
Contributor

How are you loading your kubeconfig? Is it from a YAML file? If it is from YAML, adding insecure-tls-skip-verify may help (https://kubernetes.io/docs/reference/config-api/kubeconfig.v1/#Cluster)

If it is being loaded from memory, you will need to figure out how to convince Bun to make cluster.skipTLSVerify be true.

Hope that helps.

@HoloPanio
Copy link
Author

How are you loading your kubeconfig? Is it from a YAML file? If it is from YAML, adding insecure-tls-skip-verify may help (https://kubernetes.io/docs/reference/config-api/kubeconfig.v1/#Cluster)

If it is being loaded from memory, you will need to figure out how to convince Bun to make cluster.skipTLSVerify be true.

Hope that helps.

@brendandburns I did this and it did nothing. That isn't the cert that is erroring at, it is the user certs from everything I have been able to figure out.

@brendandburns
Copy link
Contributor

Given that I don't think that this is a problem in this client, because using client certificates works correctly in my experience. We're happy to help if you have a clean repro w/o Bun involved, but for now I'm not sure there's much more we can do without a reproducible code snippet.

@HoloPanio
Copy link
Author

It is an issue with Bun HTTP client apparently: oven-sh/bun#7332

@brendandburns
Copy link
Contributor

Closing since it is apparently not this client.

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

2 participants