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

EC Keys are not supported when using the native binary #87

Open
agilob opened this issue Feb 23, 2022 · 7 comments
Open

EC Keys are not supported when using the native binary #87

agilob opened this issue Feb 23, 2022 · 7 comments

Comments

@agilob
Copy link

agilob commented Feb 23, 2022

kubectl infinispan --help
Exception in thread "main" java.lang.RuntimeException: java.lang.RuntimeException: EC Keys are not supported when using the native binary
 at org.infinispan.cli.commands.CLI.main(CLI.java:345)
 at org.infinispan.cli.commands.CLI.main(CLI.java:354)
 at org.infinispan.cli.commands.CLI.main(CLI.java:358)
 at org.infinispan.cli.quarkus.CliQuarkus.main(CliQuarkus.java:14)
Caused by: java.lang.RuntimeException: EC Keys are not supported when using the native binary
 at io.fabric8.kubernetes.client.internal.CertUtils.handleECKey(CertUtils.java:16)
 at io.fabric8.kubernetes.client.internal.CertUtils.loadKey(CertUtils.java:130)
 at io.fabric8.kubernetes.client.internal.CertUtils.createKeyStore(CertUtils.java:108)
 at io.fabric8.kubernetes.client.internal.CertUtils.createKeyStore(CertUtils.java:244)
 at io.fabric8.kubernetes.client.internal.SSLUtils.keyManagers(SSLUtils.java:128)
 at io.fabric8.kubernetes.client.internal.SSLUtils.keyManagers(SSLUtils.java:122)
 at io.fabric8.kubernetes.client.utils.HttpClientUtils.createHttpClient(HttpClientUtils.java:129)
 at io.fabric8.kubernetes.client.utils.HttpClientUtils.createHttpClient(HttpClientUtils.java:66)
 at io.fabric8.kubernetes.client.BaseClient.<init>(BaseClient.java:51)
 at io.fabric8.kubernetes.client.BaseClient.<init>(BaseClient.java:43)
 at io.fabric8.kubernetes.client.BaseKubernetesClient.<init>(BaseKubernetesClient.java:146)
 at io.fabric8.kubernetes.client.DefaultKubernetesClient.<init>(DefaultKubernetesClient.java:32)
 at org.infinispan.cli.impl.KubernetesContext.<init>(KubernetesContext.java:24)
 at org.infinispan.cli.commands.CLI.initialCommandRuntimeBuilder(CLI.java:315)
 at org.infinispan.cli.commands.CLI.main(CLI.java:341)
 ... 3 more

I'm getting this on infinispan-cli-13.0.6.Final and infinispan-cli-14.0.0.Dev01 I'm on linux

@tristantarrant
Copy link
Member

tristantarrant commented Mar 8, 2022

This is a problem with https://github.com/fabric8io/kubernetes-client which only supports EC keys with the BouncyCastle FIPS jar, which has a restrictive redistribution license.
Ideally, if the JDK has been configured with a FIPS-compliant security provider, this should work without explicitly requiring BouncyCastle on the classpath.

@tristantarrant
Copy link
Member

I've opened an issue fabric8io/kubernetes-client#3952

@manusa
Copy link

manusa commented Mar 9, 2022

This is probably also related to: quarkusio/quarkus#21849

@larsw
Copy link

larsw commented Nov 14, 2023

I'm experiencing the same thing.

$ kubectl infinispan
Exception in thread "main" java.lang.RuntimeException: java.lang.RuntimeException: EC Keys are not supported when using the native binary, please add the org.bouncycastle:bcpkix-jdk18on dependency
	at org.infinispan.cli.commands.CLI.main(CLI.java:382)
	at org.infinispan.cli.commands.CLI.main(CLI.java:391)
	at org.infinispan.cli.commands.CLI.main(CLI.java:404)
	at org.infinispan.cli.quarkus.CliQuarkus.main(CliQuarkus.java:16)
Caused by: java.lang.RuntimeException: EC Keys are not supported when using the native binary, please add the org.bouncycastle:bcpkix-jdk18on dependency
	at io.fabric8.kubernetes.client.internal.CertUtils.handleECKey(CertUtils.java:15)
	at io.fabric8.kubernetes.client.internal.CertUtils.loadKey(CertUtils.java:140)
	at io.fabric8.kubernetes.client.internal.CertUtils.createKeyStore(CertUtils.java:116)
	at io.fabric8.kubernetes.client.internal.CertUtils.createKeyStore(CertUtils.java:251)
	at io.fabric8.kubernetes.client.internal.SSLUtils.keyManagers(SSLUtils.java:168)
	at io.fabric8.kubernetes.client.internal.SSLUtils.keyManagers(SSLUtils.java:157)
	at io.fabric8.kubernetes.client.utils.HttpClientUtils.applyCommonConfiguration(HttpClientUtils.java:207)
	at io.fabric8.kubernetes.client.okhttp.OkHttpClientFactory.newBuilder(OkHttpClientFactory.java:94)
	at io.fabric8.kubernetes.client.okhttp.OkHttpClientFactory.newBuilder(OkHttpClientFactory.java:31)
	at io.fabric8.kubernetes.client.utils.HttpClientUtils.createHttpClient(HttpClientUtils.java:146)
	at io.fabric8.kubernetes.client.DefaultKubernetesClient.<init>(DefaultKubernetesClient.java:56)
	at io.fabric8.kubernetes.client.DefaultKubernetesClient.<init>(DefaultKubernetesClient.java:48)
	at org.infinispan.cli.impl.KubernetesContext.<init>(KubernetesContext.java:24)
	at org.infinispan.cli.commands.CLI.initialCommandRuntimeBuilder(CLI.java:353)
	at org.infinispan.cli.commands.CLI.main(CLI.java:379)
	... 3 more

@ryanemerson
Copy link
Contributor

@larsw What version of Infinispan are you using? This should have been resolved when we upgraded to Quarkus 2.6.0.Final quarkusio/quarkus#21849.

@larsw
Copy link

larsw commented Nov 15, 2023 via email

@stephankoelle
Copy link

using ln -s infinispan-cli kubectl-infinispan instead of renaming might be a solution

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

6 participants