diff --git a/extensions/oidc-common/runtime/src/main/java/io/quarkus/oidc/common/runtime/OidcCommonConfig.java b/extensions/oidc-common/runtime/src/main/java/io/quarkus/oidc/common/runtime/OidcCommonConfig.java index c8512c4ae35b6..12a109c3e9f45 100644 --- a/extensions/oidc-common/runtime/src/main/java/io/quarkus/oidc/common/runtime/OidcCommonConfig.java +++ b/extensions/oidc-common/runtime/src/main/java/io/quarkus/oidc/common/runtime/OidcCommonConfig.java @@ -439,6 +439,14 @@ public enum Verification { @ConfigItem public Optional keyStoreFileType = Optional.empty(); + /** + * An optional parameter to specify a provider of the key store file. If not given, the provider is automatically + * detected + * based on the key store file type. + */ + @ConfigItem + public Optional keyStoreProvider; + /** * A parameter to specify the password of the key store file. If not given, the default ("password") is used. */ @@ -484,6 +492,14 @@ public enum Verification { @ConfigItem public Optional trustStoreFileType = Optional.empty(); + /** + * An optional parameter to specify a provider of the trust store file. If not given, the provider is automatically + * detected + * based on the trust store file type. + */ + @ConfigItem + public Optional trustStoreProvider; + public Optional getVerification() { return verification; } @@ -516,6 +532,22 @@ public void setTrustStoreCertAlias(String trustStoreCertAlias) { this.trustStoreCertAlias = Optional.of(trustStoreCertAlias); } + public Optional getKeyStoreProvider() { + return keyStoreProvider; + } + + public void setKeyStoreProvider(String keyStoreProvider) { + this.keyStoreProvider = Optional.of(keyStoreProvider); + } + + public Optional getTrustStoreProvider() { + return trustStoreProvider; + } + + public void setTrustStoreProvider(String trustStoreProvider) { + this.trustStoreProvider = Optional.of(trustStoreProvider); + } + } @ConfigGroup diff --git a/extensions/oidc-common/runtime/src/main/java/io/quarkus/oidc/common/runtime/OidcCommonUtils.java b/extensions/oidc-common/runtime/src/main/java/io/quarkus/oidc/common/runtime/OidcCommonUtils.java index 744dcc9e6e1ff..5ad51f3bc1e1f 100644 --- a/extensions/oidc-common/runtime/src/main/java/io/quarkus/oidc/common/runtime/OidcCommonUtils.java +++ b/extensions/oidc-common/runtime/src/main/java/io/quarkus/oidc/common/runtime/OidcCommonUtils.java @@ -131,7 +131,8 @@ public static void setHttpClientOptions(OidcCommonConfig oidcConfig, TlsConfig t .setPassword(oidcConfig.tls.getTrustStorePassword().orElse("password")) .setAlias(oidcConfig.tls.getTrustStoreCertAlias().orElse(null)) .setValue(io.vertx.core.buffer.Buffer.buffer(trustStoreData)) - .setType(getStoreType(oidcConfig.tls.trustStoreFileType, oidcConfig.tls.trustStoreFile.get())); + .setType(getStoreType(oidcConfig.tls.trustStoreFileType, oidcConfig.tls.trustStoreFile.get())) + .setProvider(oidcConfig.tls.trustStoreProvider.orElse(null)); options.setTrustOptions(trustStoreOptions); if (Verification.CERTIFICATE_VALIDATION == oidcConfig.tls.verification.orElse(Verification.REQUIRED)) { options.setVerifyHost(false); @@ -150,7 +151,8 @@ public static void setHttpClientOptions(OidcCommonConfig oidcConfig, TlsConfig t .setAlias(oidcConfig.tls.keyStoreKeyAlias.orElse(null)) .setAliasPassword(oidcConfig.tls.keyStoreKeyPassword.orElse(null)) .setValue(io.vertx.core.buffer.Buffer.buffer(keyStoreData)) - .setType(getStoreType(oidcConfig.tls.keyStoreFileType, oidcConfig.tls.keyStoreFile.get())); + .setType(getStoreType(oidcConfig.tls.keyStoreFileType, oidcConfig.tls.keyStoreFile.get())) + .setProvider(oidcConfig.tls.keyStoreProvider.orElse(null)); options.setKeyCertOptions(keyStoreOptions); } catch (IOException ex) {