Skip to content

Commit

Permalink
Add com.sun.security.sasl.Provider automatically for Infinispan
Browse files Browse the repository at this point in the history
  • Loading branch information
gsmet committed Aug 11, 2021
1 parent 57d1dae commit 5443e82
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
import io.quarkus.deployment.builditem.HotDeploymentWatchedFileBuildItem;
import io.quarkus.deployment.builditem.SystemPropertyBuildItem;
import io.quarkus.deployment.builditem.nativeimage.NativeImageConfigBuildItem;
import io.quarkus.deployment.builditem.nativeimage.NativeImageSecurityProviderBuildItem;
import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem;
import io.quarkus.infinispan.client.runtime.InfinispanClientBuildTimeConfig;
import io.quarkus.infinispan.client.runtime.InfinispanClientProducer;
Expand All @@ -62,6 +63,7 @@ class InfinispanClientProcessor {
private static final String META_INF = "META-INF";
private static final String HOTROD_CLIENT_PROPERTIES = META_INF + File.separator + "hotrod-client.properties";
private static final String PROTO_EXTENSION = ".proto";
private static final String SASL_SECURITY_PROVIDER = "com.sun.security.sasl.Provider";

/**
* The Infinispan client build time configuration.
Expand All @@ -76,6 +78,7 @@ InfinispanPropertiesBuildItem setup(ApplicationArchivesBuildItem applicationArch
BuildProducer<FeatureBuildItem> feature,
BuildProducer<AdditionalBeanBuildItem> additionalBeans,
BuildProducer<ExtensionSslNativeSupportBuildItem> sslNativeSupport,
BuildProducer<NativeImageSecurityProviderBuildItem> nativeImageSecurityProviders,
BuildProducer<NativeImageConfigBuildItem> nativeImageConfig,
CombinedIndexBuildItem applicationIndexBuildItem) throws ClassNotFoundException, IOException {

Expand All @@ -86,6 +89,7 @@ InfinispanPropertiesBuildItem setup(ApplicationArchivesBuildItem applicationArch

// Enable SSL support by default
sslNativeSupport.produce(new ExtensionSslNativeSupportBuildItem(Feature.INFINISPAN_CLIENT));
nativeImageSecurityProviders.produce(new NativeImageSecurityProviderBuildItem(SASL_SECURITY_PROVIDER));

InputStream stream = Thread.currentThread().getContextClassLoader().getResourceAsStream(HOTROD_CLIENT_PROPERTIES);
Properties properties;
Expand Down

0 comments on commit 5443e82

Please sign in to comment.