-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
java.io.IOException: Invalid DER: object is not integer (continued) #185
Comments
I'd rather not have a working kubeconfig. Is there any chance you can re-create a similar kubeconfig with fake (or deleted) certificates? |
Hi, why not? It's not a problem working with it cause the certificates are created by an in company CA. The ones I have sent you already expired. Or do you see another issue? |
Yeah, you re fine. The cluster was removed a couple of weeks again - also only available within the local company network |
Hi, to [email protected] |
Ok, I found the problem. We are hard-coding "RSA" here: java/util/src/main/java/io/kubernetes/client/util/credentials/ClientCertificateAuthentication.java Line 29 in 505a812
And your key is an eliptical curve key. For now, you need to use an RSA key, or manually edit the library SSHUtils.java code to change 'RSA' to 'EC' I'll work to add EC support to the library... |
I took a stab at EC support today, it did not end well... I think the short term fix is to convert to RSA. I'll continue to try to convince Java to load an EC key, but it might take a while... |
Ok, that took longer than it should have, but the fix is now in PR, I'd love it if you could try it out and verify... |
Hi,
seems like the certificates are empty (see IllegalArgumentException) ApiClient.applySslSettings
|
@jevin36 looks like I may have hit the same thing in #197 |
@jevin36 initially verifySSL by default was false. but after push #175, verifySSL by default is true. we can also skip verify ssl instead of adding above key value pair to config ApiClient client = ClientBuilder
.kubeconfig(KubeConfig.loadKubeConfig(new FileReader("/home/karthik/.kube/config")))
.setVerifyingSsl(false)
.build(); |
#198 fixes the problem correctly for me too |
unfortunately I am unable to reopen the task #135 again, so I am posting this question here again.
Hi,
I am trying to get the client api (0.2) up and running but unfortunately I am getting the following error:
2017-12-05 16:21:10 ERROR {main} io.kubernetes.client.util.Config - Failed to invoke build key managers
java.io.IOException: Invalid DER: object is not integer
at io.kubernetes.client.util.SSLUtils$Asn1Object.getInteger(SSLUtils.java:229)
at io.kubernetes.client.util.SSLUtils.next(SSLUtils.java:160)
at io.kubernetes.client.util.SSLUtils.decodePKCS1(SSLUtils.java:155)
at io.kubernetes.client.util.SSLUtils.createKeyStore(SSLUtils.java:100)
at io.kubernetes.client.util.SSLUtils.createKeyStore(SSLUtils.java:78)
at io.kubernetes.client.util.SSLUtils.keyManagers(SSLUtils.java:63)
at io.kubernetes.client.util.Config.fromConfig(Config.java:110)
I tried it with the following code (via config yaml as string and via ~/.kube/config file)
ApiClient apiClient = Config
.fromConfig(configAsString)
//.fromConfig(new FileReader("/Users/me/.kube/config"))
.setVerifyingSsl(false);
Configuration.setDefaultApiClient(apiClient);
kubectl on command line works fine with my config
Do you have any suggestions? Is there anybody whom I can send an example kubeconfig with the keys and certificates for testing? I am not allowed to post it here though.
The text was updated successfully, but these errors were encountered: