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

Remove long deprecated options from CertificateConfig #34540

Merged
merged 2 commits into from
Aug 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -40,31 +40,13 @@ public class CertificateConfig {
@ConvertWith(TrimmedStringConverter.class)
public Optional<String> credentialsProviderName = Optional.empty();

/**
* The file path to a server certificate or certificate chain in PEM format.
*
* @deprecated Use {@link #files} instead.
*/
@ConfigItem
@Deprecated
public Optional<Path> file;

/**
* The list of path to server certificates using the PEM format.
* Specifying multiple files require SNI to be enabled.
*/
@ConfigItem
public Optional<List<Path>> files;

/**
* The file path to the corresponding certificate private key file in PEM format.
*
* @deprecated Use {@link #keyFiles} instead.
*/
@ConfigItem
@Deprecated
public Optional<Path> keyFile;

/**
* The list of path to server certificates private key file using the PEM format.
* Specifying multiple files require SNI to be enabled.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ public static HttpServerOptions createSslOptions(HttpBuildTimeConfig buildTimeCo

ServerSslConfig sslConfig = httpConfiguration.ssl;

final Optional<Path> certFile = sslConfig.certificate.file;
final Optional<Path> keyFile = sslConfig.certificate.keyFile;
final List<Path> keys = new ArrayList<>();
final List<Path> certificates = new ArrayList<>();
if (sslConfig.certificate.keyFiles.isPresent()) {
Expand All @@ -54,12 +52,6 @@ public static HttpServerOptions createSslOptions(HttpBuildTimeConfig buildTimeCo
if (sslConfig.certificate.files.isPresent()) {
certificates.addAll(sslConfig.certificate.files.get());
}
if (keyFile.isPresent()) {
keys.add(keyFile.get());
}
if (certFile.isPresent()) {
certificates.add(certFile.get());
}

// credentials provider
Map<String, String> credentials = Map.of();
Expand Down Expand Up @@ -145,8 +137,6 @@ public static HttpServerOptions createSslOptionsForManagementInterface(Managemen

ServerSslConfig sslConfig = httpConfiguration.ssl;

final Optional<Path> certFile = sslConfig.certificate.file;
final Optional<Path> keyFile = sslConfig.certificate.keyFile;
final List<Path> keys = new ArrayList<>();
final List<Path> certificates = new ArrayList<>();
if (sslConfig.certificate.keyFiles.isPresent()) {
Expand All @@ -155,12 +145,6 @@ public static HttpServerOptions createSslOptionsForManagementInterface(Managemen
if (sslConfig.certificate.files.isPresent()) {
certificates.addAll(sslConfig.certificate.files.get());
}
if (keyFile.isPresent()) {
keys.add(keyFile.get());
}
if (certFile.isPresent()) {
certificates.add(certFile.get());
}

// credentials provider
Map<String, String> credentials = Map.of();
Expand Down
21 changes: 2 additions & 19 deletions integration-tests/grpc-mutual-auth/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@
<dependencies>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-resteasy</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-resteasy-mutiny</artifactId>
<artifactId>quarkus-resteasy-reactive</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
Expand Down Expand Up @@ -78,20 +74,7 @@
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-resteasy-deployment</artifactId>
<version>${project.version}</version>
<type>pom</type>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-resteasy-mutiny-deployment</artifactId>
<artifactId>quarkus-resteasy-reactive-deployment</artifactId>
<version>${project.version}</version>
<type>pom</type>
<scope>test</scope>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ quarkus.grpc.server.ssl.trust-store-password=123456
quarkus.grpc.server.ssl.client-auth=REQUIRED

%vertx.quarkus.http.insecure-requests=disabled
%vertx.quarkus.http.ssl.certificate.file=tls/server.pem
%vertx.quarkus.http.ssl.certificate.key-file=tls/server.key
%vertx.quarkus.http.ssl.certificate.files=tls/server.pem
%vertx.quarkus.http.ssl.certificate.key-files=tls/server.key
%vertx.quarkus.http.ssl.certificate.trust-store-file=tls/ca.jks
%vertx.quarkus.http.ssl.certificate.trust-store-password=123456
%vertx.quarkus.http.ssl.client-auth=required
Expand Down
21 changes: 2 additions & 19 deletions integration-tests/grpc-tls/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@
<dependencies>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-resteasy</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-resteasy-mutiny</artifactId>
<artifactId>quarkus-resteasy-reactive</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
Expand Down Expand Up @@ -69,20 +65,7 @@
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-resteasy-deployment</artifactId>
<version>${project.version}</version>
<type>pom</type>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-resteasy-mutiny-deployment</artifactId>
<artifactId>quarkus-resteasy-reactive-deployment</artifactId>
<version>${project.version}</version>
<type>pom</type>
<scope>test</scope>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ quarkus.grpc.clients.hello.ssl.trust-store=tls/ca.pem
quarkus.grpc.server.ssl.certificate=tls/server.pem
quarkus.grpc.server.ssl.key=tls/server.key

%vertx.quarkus.http.ssl.certificate.file=tls/server.pem
%vertx.quarkus.http.ssl.certificate.key-file=tls/server.key
%vertx.quarkus.http.ssl.certificate.files=tls/server.pem
%vertx.quarkus.http.ssl.certificate.key-files=tls/server.key

quarkus.grpc.server.port=9001

Expand Down