-
Notifications
You must be signed in to change notification settings - Fork 1.1k
chore: [wip] PQC POC 2 #13203
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
base: main
Are you sure you want to change the base?
chore: [wip] PQC POC 2 #13203
Changes from all commits
64be800
7c915c7
f0478ae
408496f
ae47748
a61bd9d
6b8816b
5be6b97
4d9e72c
6bbb7fc
a472a87
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| name: PQC Connectivity Integration Tests | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ main ] | ||
| pull_request: | ||
| branches: [ main ] | ||
|
|
||
| jobs: | ||
| pqc-tests: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| # 1. Checkout sibling HTTP Client repository | ||
| - name: Checkout google-http-java-client | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| repository: googleapis/google-http-java-client | ||
| ref: chore/pqc-poc-2 | ||
| path: google-http-java-client | ||
|
|
||
| # 2. Checkout this monorepo | ||
| - name: Checkout google-cloud-java-pqc | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| path: google-cloud-java-pqc | ||
|
|
||
| # 3. Set up JDK 17 | ||
| - name: Set up JDK 17 | ||
| uses: actions/setup-java@v4 | ||
| with: | ||
| java-version: '17' | ||
| distribution: 'temurin' | ||
| cache: 'maven' | ||
| cache-dependency-path: 'google-cloud-java-pqc/pom.xml' | ||
|
|
||
| # 4. Build and install modified google-http-client SNAPSHOT locally | ||
| - name: Build and Install google-http-java-client | ||
| run: | | ||
| cd google-http-java-client | ||
| mvn clean install -DskipTests=true -Dcheckstyle.skip -Dclirr.skip -Denforcer.skip -Dfmt.skip | ||
|
|
||
| # 5. Build the entire monorepo core components required by the tests | ||
| - name: Build and Install Core Dependency Reactor | ||
| run: | | ||
| cd google-cloud-java-pqc | ||
| mvn clean install -pl sdk-platform-java/pqc-test/pqc-test-snapshot,sdk-platform-java/pqc-test/pqc-test-release -am -T 1.5C -Dcheckstyle.skip -Dclirr.skip -Denforcer.skip -Dfmt.skip -DskipTests=true | ||
|
|
||
| # 6. Run Snapshot PQC Tests (EXPECT PASS) | ||
| - name: Run Snapshot PQC Connectivity Tests (Expect PASS) | ||
| run: | | ||
| cd google-cloud-java-pqc/sdk-platform-java/pqc-test/pqc-test-snapshot | ||
| mvn install -Dcheckstyle.skip -Dclirr.skip -Denforcer.skip -Dfmt.skip -Dtest=RunPqcTest | ||
|
|
||
| # 7. Run Release PQC Tests (EXPECT FAIL) | ||
| - name: Run Release PQC Connectivity Tests (Expect FAIL) | ||
| # We expect this step to fail. If it passes, it means release libraries are negotiating PQC (which is incorrect). | ||
| # Thus we run it and assert that the maven command fails (exit code != 0). | ||
| run: | | ||
| cd google-cloud-java-pqc/sdk-platform-java/pqc-test/pqc-test-release | ||
| if mvn install -Dcheckstyle.skip -Dclirr.skip -Denforcer.skip -Dfmt.skip -Dtest=RunPqcTest; then | ||
| echo "Error: Release tests passed but they were expected to fail!" | ||
| exit 1 | ||
| else | ||
| echo "Success: Release tests failed-fast as expected." | ||
| exit 0 | ||
| fi |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,6 +19,7 @@ | |
| </parent> | ||
|
|
||
| <properties> | ||
| <bouncycastle.version>1.80</bouncycastle.version> | ||
| <skipUnitTests>false</skipUnitTests> | ||
| <checkstyle.header.file>java.header</checkstyle.header.file> | ||
| <maven.compiler.release>8</maven.compiler.release> | ||
|
|
@@ -27,7 +28,7 @@ | |
| consistent across modules in this repository --> | ||
| <javax.annotation-api.version>1.3.2</javax.annotation-api.version> | ||
| <grpc.version>1.81.0</grpc.version> | ||
| <google.http-client.version>2.1.0</google.http-client.version> | ||
| <google.http-client.version>2.1.1-SNAPSHOT</google.http-client.version> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Updating |
||
| <gson.version>2.13.2</gson.version> | ||
| <guava.version>33.5.0-jre</guava.version> | ||
| <protobuf.version>4.33.2</protobuf.version> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -42,6 +42,8 @@ | |
| import com.google.auth.mtls.DefaultMtlsProviderFactory; | ||
| import com.google.auth.mtls.MtlsProvider; | ||
| import com.google.common.annotations.VisibleForTesting; | ||
| import javax.net.ssl.SSLContext; | ||
| import java.security.NoSuchAlgorithmException; | ||
|
Comment on lines
+45
to
+46
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| import java.io.IOException; | ||
| import java.security.GeneralSecurityException; | ||
| import java.security.KeyStore; | ||
|
|
@@ -185,6 +187,8 @@ public TransportChannelProvider withCredentials(Credentials credentials) { | |
| } | ||
|
|
||
| HttpTransport createHttpTransport() throws IOException, GeneralSecurityException { | ||
|
|
||
|
|
||
| if (mtlsProvider == null) { | ||
| return null; | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -66,6 +66,9 @@ public HttpTransport create() { | |
| // Maybe not on App Engine | ||
| } | ||
| } | ||
|
|
||
|
|
||
|
|
||
| return new NetHttpTransport(); | ||
| } | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <project xmlns="http://maven.apache.org/POM/4.0.0" | ||
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
| <modelVersion>4.0.0</modelVersion> | ||
|
|
||
| <parent> | ||
| <groupId>com.google.api</groupId> | ||
| <artifactId>gapic-generator-java-pom-parent</artifactId> | ||
| <version>2.73.0-SNAPSHOT</version> | ||
| <relativePath>../gapic-generator-java-pom-parent</relativePath> | ||
| </parent> | ||
|
|
||
| <groupId>com.google.api</groupId> | ||
| <artifactId>pqc-test-parent</artifactId> | ||
| <packaging>pom</packaging> | ||
| <version>2.81.0-SNAPSHOT</version> | ||
|
|
||
| <modules> | ||
| <module>pqc-test-common</module> | ||
| <module>pqc-test-snapshot</module> | ||
| <module>pqc-test-release</module> | ||
| </modules> | ||
| </project> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <project xmlns="http://maven.apache.org/POM/4.0.0" | ||
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
| <modelVersion>4.0.0</modelVersion> | ||
|
|
||
| <parent> | ||
| <groupId>com.google.api</groupId> | ||
| <artifactId>pqc-test-parent</artifactId> | ||
| <version>2.81.0-SNAPSHOT</version> | ||
| <relativePath>../pom.xml</relativePath> | ||
| </parent> | ||
|
|
||
| <artifactId>pqc-test-common</artifactId> | ||
|
|
||
| <dependencies> | ||
| <dependency> | ||
| <groupId>com.google.api</groupId> | ||
| <artifactId>gax-httpjson</artifactId> | ||
| <version>2.81.0-SNAPSHOT</version> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>com.google.api</groupId> | ||
| <artifactId>gax-grpc</artifactId> | ||
| <version>2.81.0-SNAPSHOT</version> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.bouncycastle</groupId> | ||
| <artifactId>bcprov-jdk18on</artifactId> | ||
| <version>${bouncycastle.version}</version> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.bouncycastle</groupId> | ||
| <artifactId>bctls-jdk18on</artifactId> | ||
| <version>${bouncycastle.version}</version> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.junit.jupiter</groupId> | ||
| <artifactId>junit-jupiter-api</artifactId> | ||
| <version>5.10.2</version> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>io.grpc</groupId> | ||
| <artifactId>grpc-netty</artifactId> | ||
| <version>${grpc.version}</version> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>io.grpc</groupId> | ||
| <artifactId>grpc-stub</artifactId> | ||
| <version>${grpc.version}</version> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>com.google.cloud</groupId> | ||
| <artifactId>google-cloud-bigquery</artifactId> | ||
| <version>2.67.0-SNAPSHOT</version> | ||
| <scope>provided</scope> | ||
| </dependency> | ||
| </dependencies> | ||
| </project> |
Uh oh!
There was an error while loading. Please reload this page.