From 519e72e7edf959fc9aa9a965b3b78de77961c98f Mon Sep 17 00:00:00 2001 From: Diego Date: Mon, 8 Jun 2026 11:18:09 -0400 Subject: [PATCH 1/7] chore: poc for gax-grpc using grpc's preferJdkSslProvider() --- .../gapic-generator-java-pom-parent/pom.xml | 2 +- sdk-platform-java/gax-java/gax-grpc/pom.xml | 10 + .../InstantiatingGrpcChannelProvider.java | 17 + sdk-platform-java/pom.xml | 1 + sdk-platform-java/pqc-test/pom.xml | 59 ++ .../pqc-test/pqc-test-common/pom.xml | 73 +++ .../api/gax/httpjson/PqcConnectivityTest.java | 173 ++++++ .../com/google/api/gax/pqc/PqcTestServer.java | 505 ++++++++++++++++++ .../src/main/resources/pqctest.p12 | Bin 0 -> 2618 bytes .../pqc-test/pqc-test-release/pom.xml | 53 ++ .../google/api/gax/httpjson/RunPqcTest.java | 43 ++ .../pqc-test/pqc-test-snapshot/pom.xml | 41 ++ .../google/api/gax/httpjson/RunPqcTest.java | 44 ++ 13 files changed, 1020 insertions(+), 1 deletion(-) create mode 100644 sdk-platform-java/pqc-test/pom.xml create mode 100644 sdk-platform-java/pqc-test/pqc-test-common/pom.xml create mode 100644 sdk-platform-java/pqc-test/pqc-test-common/src/main/java/com/google/api/gax/httpjson/PqcConnectivityTest.java create mode 100644 sdk-platform-java/pqc-test/pqc-test-common/src/main/java/com/google/api/gax/pqc/PqcTestServer.java create mode 100644 sdk-platform-java/pqc-test/pqc-test-common/src/main/resources/pqctest.p12 create mode 100644 sdk-platform-java/pqc-test/pqc-test-release/pom.xml create mode 100644 sdk-platform-java/pqc-test/pqc-test-release/src/test/java/com/google/api/gax/httpjson/RunPqcTest.java create mode 100644 sdk-platform-java/pqc-test/pqc-test-snapshot/pom.xml create mode 100644 sdk-platform-java/pqc-test/pqc-test-snapshot/src/test/java/com/google/api/gax/httpjson/RunPqcTest.java diff --git a/sdk-platform-java/gapic-generator-java-pom-parent/pom.xml b/sdk-platform-java/gapic-generator-java-pom-parent/pom.xml index 065399123d03..883c1a05b4a9 100644 --- a/sdk-platform-java/gapic-generator-java-pom-parent/pom.xml +++ b/sdk-platform-java/gapic-generator-java-pom-parent/pom.xml @@ -26,7 +26,7 @@ 1.3.2 - 1.81.0 + 1.82.0-SNAPSHOT 2.1.0 2.13.2 33.5.0-jre diff --git a/sdk-platform-java/gax-java/gax-grpc/pom.xml b/sdk-platform-java/gax-java/gax-grpc/pom.xml index 927518b32cf7..1ce237b5ffb1 100644 --- a/sdk-platform-java/gax-java/gax-grpc/pom.xml +++ b/sdk-platform-java/gax-java/gax-grpc/pom.xml @@ -131,6 +131,16 @@ com.google.protobuf protobuf-java + + org.bouncycastle + bcprov-jdk18on + 1.84 + + + org.bouncycastle + bctls-jdk18on + 1.84 + diff --git a/sdk-platform-java/gax-java/gax-grpc/src/main/java/com/google/api/gax/grpc/InstantiatingGrpcChannelProvider.java b/sdk-platform-java/gax-java/gax-grpc/src/main/java/com/google/api/gax/grpc/InstantiatingGrpcChannelProvider.java index c4543d986741..6b631f5aa677 100644 --- a/sdk-platform-java/gax-java/gax-grpc/src/main/java/com/google/api/gax/grpc/InstantiatingGrpcChannelProvider.java +++ b/sdk-platform-java/gax-java/gax-grpc/src/main/java/com/google/api/gax/grpc/InstantiatingGrpcChannelProvider.java @@ -812,6 +812,7 @@ public ManagedChannelBuilder createDecoratedChannelBuilder() throws IOExcepti if (interceptorProvider != null) { builder.intercept(interceptorProvider.getInterceptors()); } + configurePqc(builder); if (channelConfigurator != null) { builder = channelConfigurator.apply(builder); } @@ -819,6 +820,22 @@ public ManagedChannelBuilder createDecoratedChannelBuilder() throws IOExcepti return builder; } + private void configurePqc(ManagedChannelBuilder builder) { + try { + java.security.Provider bcProvider = new org.bouncycastle.jce.provider.BouncyCastleProvider(); + java.security.Provider bcJsseProvider = + new org.bouncycastle.jsse.provider.BouncyCastleJsseProvider(bcProvider); + + javax.net.ssl.SSLContext sslContext = + javax.net.ssl.SSLContext.getInstance("TLSv1.3", bcJsseProvider); + sslContext.init(null, null, null); + + builder.preferJdkSslProvider(sslContext); + } catch (Exception e) { + LOG.log(Level.WARNING, "Failed to configure gRPC channel for PQC", e); + } + } + private ManagedChannel createSingleChannel() throws IOException { ManagedChannelBuilder builder = createDecoratedChannelBuilder(); diff --git a/sdk-platform-java/pom.xml b/sdk-platform-java/pom.xml index b14a458db938..26a6aa31a4be 100644 --- a/sdk-platform-java/pom.xml +++ b/sdk-platform-java/pom.xml @@ -23,6 +23,7 @@ gapic-generator-java-bom java-shared-dependencies sdk-platform-java-config + pqc-test diff --git a/sdk-platform-java/pqc-test/pom.xml b/sdk-platform-java/pqc-test/pom.xml new file mode 100644 index 000000000000..ced2c020f0e5 --- /dev/null +++ b/sdk-platform-java/pqc-test/pom.xml @@ -0,0 +1,59 @@ + + + 4.0.0 + + + com.google.cloud + google-cloud-shared-config + 1.17.0 + + + com.google.api + pqc-test-parent + pom + 2.81.0-SNAPSHOT + + + pqc-test-common + pqc-test-snapshot + pqc-test-release + + + + + + org.bouncycastle + bcprov-jdk18on + 1.84 + + + org.bouncycastle + bctls-jdk18on + 1.84 + + + org.bouncycastle + bcutil-jdk18on + 1.84 + + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + + -Djavax.net.ssl.trustStore=${project.basedir}/../pqc-test-common/target/classes/pqctest.p12 + -Djavax.net.ssl.trustStorePassword=password + -Djavax.net.ssl.trustStoreType=PKCS12 + + + + + + diff --git a/sdk-platform-java/pqc-test/pqc-test-common/pom.xml b/sdk-platform-java/pqc-test/pqc-test-common/pom.xml new file mode 100644 index 000000000000..927bf757003e --- /dev/null +++ b/sdk-platform-java/pqc-test/pqc-test-common/pom.xml @@ -0,0 +1,73 @@ + + + 4.0.0 + + + com.google.api + pqc-test-parent + 2.81.0-SNAPSHOT + ../pom.xml + + + pqc-test-common + + + + org.junit.jupiter + junit-jupiter-api + 5.10.2 + + + io.grpc + grpc-netty + 1.81.0 + + + io.grpc + grpc-stub + 1.81.0 + + + org.bouncycastle + bcprov-jdk18on + 1.84 + + + org.bouncycastle + bctls-jdk18on + 1.84 + + + com.google.api + gax + 2.81.0-SNAPSHOT + + + com.google.api + gax-httpjson + 2.81.0-SNAPSHOT + + + com.google.api + gax-grpc + 2.81.0-SNAPSHOT + + + com.google.http-client + google-http-client + 2.1.1-SNAPSHOT + + + com.google.cloud + google-cloud-bigquery + 2.67.0-SNAPSHOT + + + com.google.cloud + google-cloud-translate + 2.93.0-SNAPSHOT + + + diff --git a/sdk-platform-java/pqc-test/pqc-test-common/src/main/java/com/google/api/gax/httpjson/PqcConnectivityTest.java b/sdk-platform-java/pqc-test/pqc-test-common/src/main/java/com/google/api/gax/httpjson/PqcConnectivityTest.java new file mode 100644 index 000000000000..c6c5b76a627e --- /dev/null +++ b/sdk-platform-java/pqc-test/pqc-test-common/src/main/java/com/google/api/gax/httpjson/PqcConnectivityTest.java @@ -0,0 +1,173 @@ +/* + * Copyright 2026 Google LLC + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google LLC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package com.google.api.gax.httpjson; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.fail; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.cloud.translate.v3.LocationName; +import com.google.cloud.translate.v3.TranslationServiceClient; +import com.google.cloud.translate.v3.TranslationServiceSettings; +import java.io.InputStream; +import java.security.Provider; +import java.security.Security; +import java.util.Collections; +import java.util.TreeSet; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; + +public abstract class PqcConnectivityTest { + + private static Process serverProcess; + protected static int grpcPqcPort; + protected static int grpcClassicalPort; + + protected boolean clientSupportsPqc() { + return true; + } + + protected abstract boolean grpcTestShouldSucceed(); + + @BeforeAll + public static void setup() throws Exception { + + // 6. Spawn PqcTestServer in a separate background process to ensure physical + // JVM runtime isolation! + ProcessBuilder pb = + new ProcessBuilder( + "java", + "-cp", + System.getProperty("java.class.path"), + "com.google.api.gax.pqc.PqcTestServer"); + + // Force merging of error stream to ease debugging in test output + pb.redirectErrorStream(true); + serverProcess = pb.start(); + + // Read server's stdout to dynamically capture the allocated ephemeral ports + java.io.BufferedReader reader = + new java.io.BufferedReader( + new java.io.InputStreamReader( + serverProcess.getInputStream(), java.nio.charset.StandardCharsets.UTF_8)); + + String line; + boolean grpcPqcFound = false; + boolean grpcClassicalFound = false; + + // Wait for the server process to output its HTTP and gRPC ports + long startTime = System.currentTimeMillis(); + while ((line = reader.readLine()) != null) { + System.out.println("[SERVER-OUT] " + line); + if (line.startsWith("GRPC_PQC_PORT: ")) { + grpcPqcPort = Integer.parseInt(line.substring(15).trim()); + grpcPqcFound = true; + } else if (line.startsWith("GRPC_CLASSICAL_PORT: ")) { + grpcClassicalPort = Integer.parseInt(line.substring(21).trim()); + grpcClassicalFound = true; + } + + if (grpcPqcFound && grpcClassicalFound) { + break; + } + + // Ephemeral port detection timeout (10 seconds) to fail-fast on server startup + // errors + if (System.currentTimeMillis() - startTime > 10000) { + throw new RuntimeException( + "Timeout waiting for PqcTestServer ephemeral ports to be printed!"); + } + } + + if (!grpcPqcFound || !grpcClassicalFound) { + throw new RuntimeException("PqcTestServer failed to initialize ephemeral ports!"); + } + + // Start a background thread to continuously drain the server's stdout + Thread drainThread = + new Thread( + () -> { + try { + String l; + while ((l = reader.readLine()) != null) { + System.out.println("[SERVER-OUT] " + l); + } + } catch (java.io.IOException e) { + // Ignore stream closed + } + }); + drainThread.setDaemon(true); + drainThread.start(); + } + + @AfterAll + public static void teardown() { + if (serverProcess != null) { + // Forcibly destroy the background process and close standard streams to allow + // clean exit + serverProcess.destroyForcibly(); + } + } + + private void runGrpcTest(int port, boolean shouldSucceed) throws Exception { + TranslationServiceSettings settings = + TranslationServiceSettings.newBuilder() + .setEndpoint("localhost:" + port) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + + try (TranslationServiceClient client = TranslationServiceClient.create(settings)) { + LocationName parent = LocationName.of("test-project", "global"); + client.translateText(parent, "es", Collections.singletonList("hello")); + if (!shouldSucceed) { + fail("Expected gRPC call to fail!"); + } + } catch (Exception e) { + if (shouldSucceed) { + fail("Expected gRPC call to succeed, but failed: " + e.getMessage(), e); + } + } + } + + + + @Test + public void testGrpcPqcServerEnforced() throws Exception { + runGrpcTest(grpcPqcPort, grpcTestShouldSucceed()); + } + + @Test + public void testGrpcClassicalServer() throws Exception { + runGrpcTest(grpcClassicalPort, true); + } +} diff --git a/sdk-platform-java/pqc-test/pqc-test-common/src/main/java/com/google/api/gax/pqc/PqcTestServer.java b/sdk-platform-java/pqc-test/pqc-test-common/src/main/java/com/google/api/gax/pqc/PqcTestServer.java new file mode 100644 index 000000000000..5008213bcc3c --- /dev/null +++ b/sdk-platform-java/pqc-test/pqc-test-common/src/main/java/com/google/api/gax/pqc/PqcTestServer.java @@ -0,0 +1,505 @@ +/* + * Copyright 2026 Google LLC + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google LLC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package com.google.api.gax.pqc; + +import com.sun.net.httpserver.HttpsConfigurator; +import com.sun.net.httpserver.HttpsParameters; +import com.sun.net.httpserver.HttpsServer; +import io.grpc.Server; +import io.grpc.netty.NettyServerBuilder; +import io.netty.handler.ssl.ApplicationProtocolConfig; +import io.netty.handler.ssl.ClientAuth; +import io.netty.handler.ssl.IdentityCipherSuiteFilter; +import io.netty.handler.ssl.JdkSslContext; +import java.io.InputStream; +import java.io.OutputStream; +import java.net.InetSocketAddress; +import java.security.KeyStore; +import java.util.List; +import java.util.function.BiFunction; +import javax.net.ssl.KeyManagerFactory; +import javax.net.ssl.SSLContext; +import javax.net.ssl.SSLEngine; +import javax.net.ssl.SSLParameters; +import org.bouncycastle.jce.provider.BouncyCastleProvider; +import org.bouncycastle.jsse.provider.BouncyCastleJsseProvider; + +/** + * PqcTestServer is a specialized test harness designed to validate Post-Quantum Cryptography (PQC) + * transport enforcement in the Google Cloud Java SDK. + */ +public class PqcTestServer { + + private HttpsServer httpServerPqc; + private HttpsServer httpServerClassical; + private Server grpcServerPqc; + private Server grpcServerClassical; + private int httpPqcPort; + private int httpClassicalPort; + private int grpcPqcPort; + private int grpcClassicalPort; + + public void start() throws Exception { + + KeyStore ks = KeyStore.getInstance("PKCS12"); + try (InputStream is = getClass().getResourceAsStream("/pqctest.p12")) { + if (is == null) { + throw new RuntimeException("pqctest.p12 not found in classpath"); + } + ks.load(is, "password".toCharArray()); + } + + KeyManagerFactory kmf = KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm()); + kmf.init(ks, "password".toCharArray()); + + javax.net.ssl.TrustManagerFactory tmf = + javax.net.ssl.TrustManagerFactory.getInstance( + javax.net.ssl.TrustManagerFactory.getDefaultAlgorithm()); + tmf.init(ks); + + BouncyCastleProvider bcProvider = new BouncyCastleProvider(); + BouncyCastleJsseProvider bcJsseProvider = new BouncyCastleJsseProvider(bcProvider); + SSLContext bcContext = SSLContext.getInstance("TLSv1.3", bcJsseProvider); + bcContext.init(kmf.getKeyManagers(), tmf.getTrustManagers(), null); + + SSLContext pqcEnforcingSslContext = + new SSLContext( + new PqcEnforcingSSLContextSpi(bcContext), + bcContext.getProvider(), + bcContext.getProtocol()) {}; + + SSLContext classicalSslContext = bcContext; + + httpServerPqc = HttpsServer.create(new InetSocketAddress(0), 0); + configureHttpServer(httpServerPqc, pqcEnforcingSslContext); + httpServerPqc.start(); + httpPqcPort = httpServerPqc.getAddress().getPort(); + + httpServerClassical = HttpsServer.create(new InetSocketAddress(0), 0); + configureHttpServer(httpServerClassical, classicalSslContext); + httpServerClassical.start(); + httpClassicalPort = httpServerClassical.getAddress().getPort(); + + ApplicationProtocolConfig apn = + new ApplicationProtocolConfig( + ApplicationProtocolConfig.Protocol.ALPN, + ApplicationProtocolConfig.SelectorFailureBehavior.NO_ADVERTISE, + ApplicationProtocolConfig.SelectedListenerFailureBehavior.ACCEPT, + "h2"); + + io.netty.handler.ssl.SslContext nettySslContextPqc = + new JdkSslContext( + pqcEnforcingSslContext, false, null, IdentityCipherSuiteFilter.INSTANCE, apn, ClientAuth.NONE); + + io.netty.handler.ssl.SslContext nettySslContextClassical = + new JdkSslContext( + classicalSslContext, false, null, IdentityCipherSuiteFilter.INSTANCE, apn, ClientAuth.NONE); + + grpcServerPqc = createGrpcServer(nettySslContextPqc); + grpcServerPqc.start(); + grpcPqcPort = grpcServerPqc.getPort(); + + grpcServerClassical = createGrpcServer(nettySslContextClassical); + grpcServerClassical.start(); + grpcClassicalPort = grpcServerClassical.getPort(); + } + + private void configureHttpServer(HttpsServer server, SSLContext sslContext) { + server.setHttpsConfigurator( + new HttpsConfigurator(sslContext) { + @Override + public void configure(HttpsParameters params) { + SSLParameters sslparams = getSSLContext().getDefaultSSLParameters(); + sslparams.setProtocols(new String[] {"TLSv1.3"}); + params.setSSLParameters(sslparams); + } + }); + + server.createContext( + "/test", + exchange -> { + String response = "PQC HTTP OK"; + exchange.sendResponseHeaders(200, response.length()); + exchange.getResponseBody().write(response.getBytes()); + exchange.getResponseBody().close(); + }); + + server.createContext( + "/bigquery/v2/projects/test-project/datasets", + exchange -> { + String response = "{\"kind\": \"bigquery#datasetList\"}"; + exchange.getResponseHeaders().set("Content-Type", "application/json"); + exchange.sendResponseHeaders(200, response.length()); + exchange.getResponseBody().write(response.getBytes()); + exchange.getResponseBody().close(); + }); + + server.createContext( + "/v3/", + exchange -> { + if ("POST".equalsIgnoreCase(exchange.getRequestMethod())) { + String response = + "{\"translations\": [{\"translatedText\": \"mocked translated text\"}]}"; + exchange.getResponseHeaders().set("Content-Type", "application/json"); + exchange.sendResponseHeaders(200, response.length()); + try (OutputStream os = exchange.getResponseBody()) { + os.write(response.getBytes()); + } + } + }); + } + + private Server createGrpcServer(io.netty.handler.ssl.SslContext nettySslContext) { + io.grpc.MethodDescriptor method = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName("Greeter/SayHello") + .setRequestMarshaller(new ByteMarshaller()) + .setResponseMarshaller(new ByteMarshaller()) + .build(); + + io.grpc.ServerServiceDefinition serviceDef = + io.grpc.ServerServiceDefinition.builder("Greeter") + .addMethod( + method, + io.grpc.stub.ServerCalls.asyncUnaryCall( + (request, responseObserver) -> { + responseObserver.onNext("PQC gRPC OK".getBytes()); + responseObserver.onCompleted(); + })) + .build(); + + io.grpc.MethodDescriptor translateMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.translation.v3.TranslationService/TranslateText") + .setRequestMarshaller(new ByteMarshaller()) + .setResponseMarshaller(new ByteMarshaller()) + .build(); + + io.grpc.ServerServiceDefinition translationServiceDef = + io.grpc.ServerServiceDefinition.builder("google.cloud.translation.v3.TranslationService") + .addMethod( + translateMethod, + io.grpc.stub.ServerCalls.asyncUnaryCall( + (request, responseObserver) -> { + responseObserver.onNext(new byte[0]); // Empty proto response + responseObserver.onCompleted(); + })) + .build(); + + return NettyServerBuilder.forPort(0) + .sslContext(nettySslContext) + .addService(serviceDef) + .addService(translationServiceDef) + .build(); + } + + public void stop() { + if (httpServerPqc != null) httpServerPqc.stop(0); + if (httpServerClassical != null) httpServerClassical.stop(0); + if (grpcServerPqc != null) grpcServerPqc.shutdown(); + if (grpcServerClassical != null) grpcServerClassical.shutdown(); + } + + public int getHttpPqcPort() { + return httpPqcPort; + } + + public int getHttpClassicalPort() { + return httpClassicalPort; + } + + public int getGrpcPqcPort() { + return grpcPqcPort; + } + + public int getGrpcClassicalPort() { + return grpcClassicalPort; + } + + private static class ByteMarshaller implements io.grpc.MethodDescriptor.Marshaller { + @Override + public InputStream stream(byte[] value) { + return new java.io.ByteArrayInputStream(value); + } + + @Override + public byte[] parse(InputStream stream) { + try { + return com.google.common.io.ByteStreams.toByteArray(stream); + } catch (java.io.IOException e) { + throw new RuntimeException(e); + } + } + } + + public static void main(String[] args) throws Exception { + PqcTestServer server = new PqcTestServer(); + server.start(); + + System.out.println("HTTP_PQC_PORT: " + server.getHttpPqcPort()); + System.out.println("HTTP_CLASSICAL_PORT: " + server.getHttpClassicalPort()); + System.out.println("GRPC_PQC_PORT: " + server.getGrpcPqcPort()); + System.out.println("GRPC_CLASSICAL_PORT: " + server.getGrpcClassicalPort()); + System.out.flush(); + + try { + while (System.in.read() != -1) { + Thread.sleep(1000); + } + } catch (Exception e) { + } finally { + server.stop(); + } + } + + @org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement + private static class PqcEnforcingSSLEngine extends javax.net.ssl.SSLEngine { + private final javax.net.ssl.SSLEngine delegate; + + PqcEnforcingSSLEngine(javax.net.ssl.SSLEngine delegate) { + this.delegate = delegate; + } + + @Override + public void setSSLParameters(javax.net.ssl.SSLParameters params) { + delegate.setSSLParameters(params); + Object objEngine = delegate; + if (objEngine instanceof org.bouncycastle.jsse.BCSSLEngine) { + org.bouncycastle.jsse.BCSSLEngine bcEngine = (org.bouncycastle.jsse.BCSSLEngine) objEngine; + org.bouncycastle.jsse.BCSSLParameters bcParams = bcEngine.getParameters(); + bcParams.setNamedGroups(new String[] {"X25519MLKEM768"}); + bcEngine.setParameters(bcParams); + } + } + + @Override + public void setHandshakeApplicationProtocolSelector( + BiFunction, String> selector) { + delegate.setHandshakeApplicationProtocolSelector( + (engine, protocols) -> selector.apply(this, protocols)); + } + + @Override + public BiFunction, String> getHandshakeApplicationProtocolSelector() { + return delegate.getHandshakeApplicationProtocolSelector(); + } + + @Override + public String getApplicationProtocol() { + return delegate.getApplicationProtocol(); + } + + @Override + public String getHandshakeApplicationProtocol() { + return delegate.getHandshakeApplicationProtocol(); + } + + @Override + public javax.net.ssl.SSLParameters getSSLParameters() { + return delegate.getSSLParameters(); + } + + @Override + public void beginHandshake() throws javax.net.ssl.SSLException { + delegate.beginHandshake(); + } + + @Override + public void closeInbound() throws javax.net.ssl.SSLException { + delegate.closeInbound(); + } + + @Override + public void closeOutbound() { + delegate.closeOutbound(); + } + + @Override + public java.lang.Runnable getDelegatedTask() { + return delegate.getDelegatedTask(); + } + + @Override + public java.lang.String[] getEnabledCipherSuites() { + return delegate.getEnabledCipherSuites(); + } + + @Override + public java.lang.String[] getEnabledProtocols() { + return delegate.getEnabledProtocols(); + } + + @Override + public javax.net.ssl.SSLEngineResult.HandshakeStatus getHandshakeStatus() { + return delegate.getHandshakeStatus(); + } + + @Override + public boolean getNeedClientAuth() { + return delegate.getNeedClientAuth(); + } + + @Override + public javax.net.ssl.SSLSession getSession() { + return delegate.getSession(); + } + + @Override + public java.lang.String[] getSupportedCipherSuites() { + return delegate.getSupportedCipherSuites(); + } + + @Override + public java.lang.String[] getSupportedProtocols() { + return delegate.getSupportedProtocols(); + } + + @Override + public boolean getUseClientMode() { + return delegate.getUseClientMode(); + } + + @Override + public boolean getWantClientAuth() { + return delegate.getWantClientAuth(); + } + + @Override + public boolean isInboundDone() { + return delegate.isInboundDone(); + } + + @Override + public boolean isOutboundDone() { + return delegate.isOutboundDone(); + } + + @Override + public void setEnabledCipherSuites(java.lang.String[] suites) { + delegate.setEnabledCipherSuites(suites); + } + + @Override + public void setEnabledProtocols(java.lang.String[] protocols) { + delegate.setEnabledProtocols(protocols); + } + + @Override + public void setNeedClientAuth(boolean need) { + delegate.setNeedClientAuth(need); + } + + @Override + public void setUseClientMode(boolean mode) { + delegate.setUseClientMode(mode); + } + + @Override + public void setWantClientAuth(boolean want) { + delegate.setWantClientAuth(want); + } + + @Override + public javax.net.ssl.SSLEngineResult unwrap( + java.nio.ByteBuffer src, java.nio.ByteBuffer[] dsts, int offset, int length) + throws javax.net.ssl.SSLException { + return delegate.unwrap(src, dsts, offset, length); + } + + @Override + public javax.net.ssl.SSLEngineResult wrap( + java.nio.ByteBuffer[] srcs, int offset, int length, java.nio.ByteBuffer dst) + throws javax.net.ssl.SSLException { + return delegate.wrap(srcs, offset, length, dst); + } + + @Override + public boolean getEnableSessionCreation() { + return delegate.getEnableSessionCreation(); + } + + @Override + public void setEnableSessionCreation(boolean flag) { + delegate.setEnableSessionCreation(flag); + } + + @Override + public javax.net.ssl.SSLSession getHandshakeSession() { + return delegate.getHandshakeSession(); + } + } + + private static class PqcEnforcingSSLContextSpi extends javax.net.ssl.SSLContextSpi { + private final javax.net.ssl.SSLContext delegate; + + PqcEnforcingSSLContextSpi(javax.net.ssl.SSLContext delegate) { + this.delegate = delegate; + } + + @Override + protected javax.net.ssl.SSLEngine engineCreateSSLEngine() { + return new PqcEnforcingSSLEngine(delegate.createSSLEngine()); + } + + @Override + protected javax.net.ssl.SSLEngine engineCreateSSLEngine(java.lang.String host, int port) { + return new PqcEnforcingSSLEngine(delegate.createSSLEngine(host, port)); + } + + @Override + protected javax.net.ssl.SSLSessionContext engineGetClientSessionContext() { + return delegate.getClientSessionContext(); + } + + @Override + protected javax.net.ssl.SSLSessionContext engineGetServerSessionContext() { + return delegate.getServerSessionContext(); + } + + @Override + protected javax.net.ssl.SSLServerSocketFactory engineGetServerSocketFactory() { + return delegate.getServerSocketFactory(); + } + + @Override + protected javax.net.ssl.SSLSocketFactory engineGetSocketFactory() { + return delegate.getSocketFactory(); + } + + @Override + protected void engineInit( + javax.net.ssl.KeyManager[] km, + javax.net.ssl.TrustManager[] tm, + java.security.SecureRandom sr) + throws java.security.KeyManagementException {} + } +} diff --git a/sdk-platform-java/pqc-test/pqc-test-common/src/main/resources/pqctest.p12 b/sdk-platform-java/pqc-test/pqc-test-common/src/main/resources/pqctest.p12 new file mode 100644 index 0000000000000000000000000000000000000000..92c74c66d3f06b874c28d388cb06c3260eaa3f3d GIT binary patch literal 2618 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 C?xKbO literal 0 HcmV?d00001 diff --git a/sdk-platform-java/pqc-test/pqc-test-release/pom.xml b/sdk-platform-java/pqc-test/pqc-test-release/pom.xml new file mode 100644 index 000000000000..24e661db6251 --- /dev/null +++ b/sdk-platform-java/pqc-test/pqc-test-release/pom.xml @@ -0,0 +1,53 @@ + + + 4.0.0 + + + com.google.api + pqc-test-parent + 2.81.0-SNAPSHOT + ../pom.xml + + + pqc-test-release + + + + com.google.api + pqc-test-common + 2.81.0-SNAPSHOT + + + com.google.api + gax + + + com.google.api + gax-grpc + + + com.google.api + gax-httpjson + + + + + com.google.cloud + google-cloud-bigquery + 2.66.0 + + + com.google.cloud + google-cloud-translate + 2.92.0 + + + org.junit.jupiter + junit-jupiter-engine + 5.10.2 + test + + + diff --git a/sdk-platform-java/pqc-test/pqc-test-release/src/test/java/com/google/api/gax/httpjson/RunPqcTest.java b/sdk-platform-java/pqc-test/pqc-test-release/src/test/java/com/google/api/gax/httpjson/RunPqcTest.java new file mode 100644 index 000000000000..2ed7e408754c --- /dev/null +++ b/sdk-platform-java/pqc-test/pqc-test-release/src/test/java/com/google/api/gax/httpjson/RunPqcTest.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 Google LLC + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google LLC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package com.google.api.gax.httpjson; + +public class RunPqcTest extends PqcConnectivityTest { + + @Override + protected boolean clientSupportsPqc() { + return false; + } + + @Override + protected boolean grpcTestShouldSucceed() { + return false; + } +} diff --git a/sdk-platform-java/pqc-test/pqc-test-snapshot/pom.xml b/sdk-platform-java/pqc-test/pqc-test-snapshot/pom.xml new file mode 100644 index 000000000000..3b5271924c6c --- /dev/null +++ b/sdk-platform-java/pqc-test/pqc-test-snapshot/pom.xml @@ -0,0 +1,41 @@ + + + 4.0.0 + + + com.google.api + pqc-test-parent + 2.81.0-SNAPSHOT + ../pom.xml + + + pqc-test-snapshot + + + + com.google.api + pqc-test-common + 2.81.0-SNAPSHOT + + + org.junit.jupiter + junit-jupiter-engine + 5.10.2 + test + + + com.google.cloud + google-cloud-bigquery + 2.67.0-SNAPSHOT + test + + + com.google.cloud + google-cloud-translate + 2.93.0-SNAPSHOT + + + + diff --git a/sdk-platform-java/pqc-test/pqc-test-snapshot/src/test/java/com/google/api/gax/httpjson/RunPqcTest.java b/sdk-platform-java/pqc-test/pqc-test-snapshot/src/test/java/com/google/api/gax/httpjson/RunPqcTest.java new file mode 100644 index 000000000000..5454cd4df934 --- /dev/null +++ b/sdk-platform-java/pqc-test/pqc-test-snapshot/src/test/java/com/google/api/gax/httpjson/RunPqcTest.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google LLC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package com.google.api.gax.httpjson; + +public class RunPqcTest extends PqcConnectivityTest { + + @Override + protected boolean clientSupportsPqc() { + return true; + } + + @Override + protected boolean grpcTestShouldSucceed() { + return true; + } +} From 87bb49160351ac568a17bb1df28d2def27a75053 Mon Sep 17 00:00:00 2001 From: Diego Date: Mon, 8 Jun 2026 12:13:05 -0400 Subject: [PATCH 2/7] deps: simplify pqc-test --- .../pqc-test/pqc-test-common/pom.xml | 30 ------------------- .../pqc-test/pqc-test-snapshot/pom.xml | 15 ++++++++-- 2 files changed, 12 insertions(+), 33 deletions(-) diff --git a/sdk-platform-java/pqc-test/pqc-test-common/pom.xml b/sdk-platform-java/pqc-test/pqc-test-common/pom.xml index 927bf757003e..c05adf94bf0f 100644 --- a/sdk-platform-java/pqc-test/pqc-test-common/pom.xml +++ b/sdk-platform-java/pqc-test/pqc-test-common/pom.xml @@ -39,35 +39,5 @@ bctls-jdk18on 1.84 - - com.google.api - gax - 2.81.0-SNAPSHOT - - - com.google.api - gax-httpjson - 2.81.0-SNAPSHOT - - - com.google.api - gax-grpc - 2.81.0-SNAPSHOT - - - com.google.http-client - google-http-client - 2.1.1-SNAPSHOT - - - com.google.cloud - google-cloud-bigquery - 2.67.0-SNAPSHOT - - - com.google.cloud - google-cloud-translate - 2.93.0-SNAPSHOT - diff --git a/sdk-platform-java/pqc-test/pqc-test-snapshot/pom.xml b/sdk-platform-java/pqc-test/pqc-test-snapshot/pom.xml index 3b5271924c6c..cb0365725819 100644 --- a/sdk-platform-java/pqc-test/pqc-test-snapshot/pom.xml +++ b/sdk-platform-java/pqc-test/pqc-test-snapshot/pom.xml @@ -25,16 +25,25 @@ 5.10.2 test + + com.google.api + gax + 2.81.0-SNAPSHOT + + + com.google.api + gax-grpc + 2.81.0-SNAPSHOT + com.google.cloud google-cloud-bigquery - 2.67.0-SNAPSHOT - test + 2.66.0 com.google.cloud google-cloud-translate - 2.93.0-SNAPSHOT + 2.92.0 From 54830ea8e15a980a3c7adff44041992cbc568bad Mon Sep 17 00:00:00 2001 From: Diego Date: Mon, 8 Jun 2026 12:19:53 -0400 Subject: [PATCH 3/7] deps: force grpc snapshot --- sdk-platform-java/pqc-test/pqc-test-snapshot/pom.xml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sdk-platform-java/pqc-test/pqc-test-snapshot/pom.xml b/sdk-platform-java/pqc-test/pqc-test-snapshot/pom.xml index cb0365725819..d3e0760c56ed 100644 --- a/sdk-platform-java/pqc-test/pqc-test-snapshot/pom.xml +++ b/sdk-platform-java/pqc-test/pqc-test-snapshot/pom.xml @@ -13,6 +13,18 @@ pqc-test-snapshot + + + + io.grpc + grpc-bom + 1.82.0-SNAPSHOT + pom + import + + + + com.google.api From 4c13044cf995a706fb016f76957e1857b8cd9015 Mon Sep 17 00:00:00 2001 From: Diego Date: Mon, 8 Jun 2026 14:15:55 -0400 Subject: [PATCH 4/7] chore: adapt to new interface --- .../api/gax/grpc/InstantiatingGrpcChannelProvider.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/sdk-platform-java/gax-java/gax-grpc/src/main/java/com/google/api/gax/grpc/InstantiatingGrpcChannelProvider.java b/sdk-platform-java/gax-java/gax-grpc/src/main/java/com/google/api/gax/grpc/InstantiatingGrpcChannelProvider.java index 6b631f5aa677..45a791defa2a 100644 --- a/sdk-platform-java/gax-java/gax-grpc/src/main/java/com/google/api/gax/grpc/InstantiatingGrpcChannelProvider.java +++ b/sdk-platform-java/gax-java/gax-grpc/src/main/java/com/google/api/gax/grpc/InstantiatingGrpcChannelProvider.java @@ -826,16 +826,13 @@ private void configurePqc(ManagedChannelBuilder builder) { java.security.Provider bcJsseProvider = new org.bouncycastle.jsse.provider.BouncyCastleJsseProvider(bcProvider); - javax.net.ssl.SSLContext sslContext = - javax.net.ssl.SSLContext.getInstance("TLSv1.3", bcJsseProvider); - sslContext.init(null, null, null); - - builder.preferJdkSslProvider(sslContext); + builder.preferJdkSslWithSecurityProvider(bcJsseProvider); } catch (Exception e) { LOG.log(Level.WARNING, "Failed to configure gRPC channel for PQC", e); } } + private ManagedChannel createSingleChannel() throws IOException { ManagedChannelBuilder builder = createDecoratedChannelBuilder(); From 31b64876f60d50543130b5ed8252f719cb988cd9 Mon Sep 17 00:00:00 2001 From: Diego Date: Mon, 8 Jun 2026 14:16:04 -0400 Subject: [PATCH 5/7] test: fix poms --- .../gapic-generator-java-pom-parent/pom.xml | 14 ++++++++++- .../gax-java/dependencies.properties | 2 +- .../pqc-test/pqc-test-common/pom.xml | 10 ++++++++ .../pqc-test/pqc-test-release/pom.xml | 24 ------------------- .../pqc-test/pqc-test-snapshot/pom.xml | 12 +--------- 5 files changed, 25 insertions(+), 37 deletions(-) diff --git a/sdk-platform-java/gapic-generator-java-pom-parent/pom.xml b/sdk-platform-java/gapic-generator-java-pom-parent/pom.xml index 883c1a05b4a9..faeda4d7b926 100644 --- a/sdk-platform-java/gapic-generator-java-pom-parent/pom.xml +++ b/sdk-platform-java/gapic-generator-java-pom-parent/pom.xml @@ -26,7 +26,7 @@ 1.3.2 - 1.82.0-SNAPSHOT + 1.83.0-SNAPSHOT 2.1.0 2.13.2 33.5.0-jre @@ -229,6 +229,17 @@ + + maven-local + Maven Local + file://${user.home}/.m2/repository + + true + + + true + + maven-central Maven Central @@ -236,3 +247,4 @@ + diff --git a/sdk-platform-java/gax-java/dependencies.properties b/sdk-platform-java/gax-java/dependencies.properties index 60e587ba359e..2cb0803991dd 100644 --- a/sdk-platform-java/gax-java/dependencies.properties +++ b/sdk-platform-java/gax-java/dependencies.properties @@ -28,7 +28,7 @@ version.gax_httpjson=2.81.0-SNAPSHOT version.com_google_protobuf=3.25.8 version.google_java_format=1.15.0 -version.io_grpc=1.76.2 +version.io_grpc=1.83.0-SNAPSHOT # Maven artifacts. # Note, the actual name of each property matters (bazel build scripts depend on it). diff --git a/sdk-platform-java/pqc-test/pqc-test-common/pom.xml b/sdk-platform-java/pqc-test/pqc-test-common/pom.xml index c05adf94bf0f..3af1ab9f8628 100644 --- a/sdk-platform-java/pqc-test/pqc-test-common/pom.xml +++ b/sdk-platform-java/pqc-test/pqc-test-common/pom.xml @@ -39,5 +39,15 @@ bctls-jdk18on 1.84 + + com.google.cloud + google-cloud-bigquery + 2.66.0 + + + com.google.cloud + google-cloud-translate + 2.92.0 + diff --git a/sdk-platform-java/pqc-test/pqc-test-release/pom.xml b/sdk-platform-java/pqc-test/pqc-test-release/pom.xml index 24e661db6251..8869051634d9 100644 --- a/sdk-platform-java/pqc-test/pqc-test-release/pom.xml +++ b/sdk-platform-java/pqc-test/pqc-test-release/pom.xml @@ -18,30 +18,6 @@ com.google.api pqc-test-common 2.81.0-SNAPSHOT - - - com.google.api - gax - - - com.google.api - gax-grpc - - - com.google.api - gax-httpjson - - - - - com.google.cloud - google-cloud-bigquery - 2.66.0 - - - com.google.cloud - google-cloud-translate - 2.92.0 org.junit.jupiter diff --git a/sdk-platform-java/pqc-test/pqc-test-snapshot/pom.xml b/sdk-platform-java/pqc-test/pqc-test-snapshot/pom.xml index d3e0760c56ed..f2384a81dce3 100644 --- a/sdk-platform-java/pqc-test/pqc-test-snapshot/pom.xml +++ b/sdk-platform-java/pqc-test/pqc-test-snapshot/pom.xml @@ -18,7 +18,7 @@ io.grpc grpc-bom - 1.82.0-SNAPSHOT + 1.83.0-SNAPSHOT pom import @@ -47,16 +47,6 @@ gax-grpc 2.81.0-SNAPSHOT - - com.google.cloud - google-cloud-bigquery - 2.66.0 - - - com.google.cloud - google-cloud-translate - 2.92.0 - From bf98978c9e24ff800e9045e54a0a9df89d30ca6e Mon Sep 17 00:00:00 2001 From: Diego Date: Mon, 8 Jun 2026 14:32:03 -0400 Subject: [PATCH 6/7] test: fix pom --- sdk-platform-java/pqc-test/pqc-test-release/pom.xml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sdk-platform-java/pqc-test/pqc-test-release/pom.xml b/sdk-platform-java/pqc-test/pqc-test-release/pom.xml index 8869051634d9..1190d7583a92 100644 --- a/sdk-platform-java/pqc-test/pqc-test-release/pom.xml +++ b/sdk-platform-java/pqc-test/pqc-test-release/pom.xml @@ -13,6 +13,18 @@ pqc-test-release + + + + io.grpc + grpc-bom + 1.83.0-SNAPSHOT + pom + import + + + + com.google.api From b3e7d27f583e130c93e4f31f05cfc82d52bdd557 Mon Sep 17 00:00:00 2001 From: Diego Date: Mon, 8 Jun 2026 16:11:57 -0400 Subject: [PATCH 7/7] build: remove local dev changes --- .../gapic-generator-java-pom-parent/pom.xml | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/sdk-platform-java/gapic-generator-java-pom-parent/pom.xml b/sdk-platform-java/gapic-generator-java-pom-parent/pom.xml index faeda4d7b926..5943a238fee3 100644 --- a/sdk-platform-java/gapic-generator-java-pom-parent/pom.xml +++ b/sdk-platform-java/gapic-generator-java-pom-parent/pom.xml @@ -229,17 +229,6 @@ - - maven-local - Maven Local - file://${user.home}/.m2/repository - - true - - - true - - maven-central Maven Central