Skip to content

Commit

Permalink
Merge branch 'main' into renovate/org.apache.maven.plugins-maven-depl…
Browse files Browse the repository at this point in the history
…oy-plugin-3.x
  • Loading branch information
TimurSadykov authored Oct 27, 2023
2 parents 54802f0 + ca216f9 commit d014015
Show file tree
Hide file tree
Showing 11 changed files with 152 additions and 196 deletions.
4 changes: 2 additions & 2 deletions .github/.OwlBot.lock.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2022 Google LLC
# Copyright 2023 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -13,4 +13,4 @@
# limitations under the License.
docker:
image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest
digest: sha256:a57d2ea6d1a77aa96c17ad0850b779ec6295f88b6c1da3d214b2095d140a2066
digest: sha256:ad9cabee4c022f1aab04a71332369e0c23841062124818a4490f73337f790337
14 changes: 14 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: 2
updates:
- package-ecosystem: "maven"
directory: "/"
schedule:
interval: "daily"
# Disable version updates for Maven dependencies
open-pull-requests-limit: 0
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "daily"
# Disable version updates for pip dependencies
open-pull-requests-limit: 0
1 change: 1 addition & 0 deletions .github/release-trigger.yml
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
enabled: true
multiScmName: google-oauth-java-client
4 changes: 2 additions & 2 deletions .kokoro/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,12 @@ integration)
;;
graalvm)
# Run Unit and Integration Tests with Native Image
mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative -Penable-integration-tests test
mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative test
RETURN_CODE=$?
;;
graalvm17)
# Run Unit and Integration Tests with Native Image
mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative -Penable-integration-tests test
mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative test
RETURN_CODE=$?
;;
samples)
Expand Down
2 changes: 1 addition & 1 deletion .kokoro/presubmit/graalvm-native-17.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/graalvm17"
value: "gcr.io/cloud-devrel-kokoro-resources/graalvm17:22.3.2"
}

env_vars: {
Expand Down
2 changes: 1 addition & 1 deletion .kokoro/presubmit/graalvm-native.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/graalvm"
value: "gcr.io/cloud-devrel-kokoro-resources/graalvm:22.3.2"
}

env_vars: {
Expand Down
40 changes: 6 additions & 34 deletions .kokoro/requirements.in
Original file line number Diff line number Diff line change
@@ -1,34 +1,6 @@
gcp-docuploader==0.6.3
google-crc32c==1.3.0
googleapis-common-protos==1.56.3
gcp-releasetool==1.9.1
cryptography==38.0.3
cachetools==4.2.4
cffi==1.15.1
jeepney==0.7.1
jinja2==3.0.3
markupsafe==2.0.1
keyring==23.4.1
packaging==21.3
protobuf==3.19.5
pyjwt==2.4.0
pyparsing==3.0.9
pycparser==2.21
pyperclip==1.8.2
python-dateutil==2.8.2
requests==2.27.1
certifi==2022.9.24
importlib-metadata==4.8.3
zipp==3.6.0
google_api_core==2.8.2
google-cloud-storage==2.0.0
google-resumable-media==2.3.3
google-cloud-core==2.3.1
typing-extensions==4.1.1
urllib3==1.26.12
zipp==3.6.0
rsa==4.9
six==1.16.0
attrs==22.1.0
google-auth==2.14.1
idna==3.4
gcp-docuploader
gcp-releasetool>=1.10.5 # required for compatibility with cryptography>=39.x
wheel
setuptools
typing-extensions
click<8.1.0
245 changes: 96 additions & 149 deletions .kokoro/requirements.txt

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public class IdTokenVerifierTest extends TestCase {
"https://www.googleapis.com/oauth2/v1/certs";

private static final String SERVICE_ACCOUNT_RS256_TOKEN =
"eyJhbGciOiJSUzI1NiIsImtpZCI6IjcxM2ZkNjhjOTY2ZTI5MzgwOTgxZWRjMDE2NGEyZjZjMDZjNTcwMmEiLCJ0eXAiOiJKV1QifQ.eyJhdWQiOiJodHRwczovL2ZpcmVzdG9yZS5nb29nbGVhcGlzLmNvbS8iLCJhenAiOiIxMDc2OTIyMjkyNzUyMzY5MDMyNzgiLCJleHAiOjE2Njg3MTI3OTUsImlhdCI6MTY2ODcwOTE5NSwiaXNzIjoiaHR0cHM6Ly9hY2NvdW50cy5nb29nbGUuY29tIiwic3ViIjoiMTA3NjkyMjI5Mjc1MjM2OTAzMjc4In0.w62_tnl_8rAjpjsGFzawXxT_t6hZztpHUfHFi9yXkKcuOB0KEM__os7bbC3ApEBZo-S5zmhmzkq8JkHqAmW5VB3-Pu0tJpW2cVeuWDpAtwVOghxiVW0O3HSbEAr7Q9xjW1dTRjyojlxDXtgwQbY2P1DYzZdrE0l3LTHz8b4CTKrI7hxGAM6hM_vLncjlCIc3ykLA1IHy8sfBFEAwBFS6ZTwCutfFeb8ulwkqezx5B1tOg6Sr1QKy5OqIk1HIt958o_iFDVFZwsW4W12CYbyamHy8aDHJVu1UTRgt3DoMu9qEwVFzqiz7DWUrfOE9_dPi148d0uudkZIXqWs5YPN_Mg";
"eyJhbGciOiJSUzI1NiIsImtpZCI6IjYwODNkZDU5ODE2NzNmNjYxZmRlOWRhZTY0NmI2ZjAzODBhMDE0NWMiLCJ0eXAiOiJKV1QifQ.eyJhdWQiOiIzMjU1NTk0MDU1OS5hcHBzLmdvb2dsZXVzZXJjb250ZW50LmNvbSIsImF6cCI6ImludGVncmF0aW9uLXRlc3RzQGNoaW5nb3ItdGVzdC5pYW0uZ3NlcnZpY2VhY2NvdW50LmNvbSIsImVtYWlsIjoiaW50ZW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6Imh0dHBzOi8vYWNjb3VudHMuZ29vZ2xlLmNvbSIsInN1YiI6IjExMjgxMDY3Mjk2MzcyODM2NjQwNiJ9.Q2tG-hN6UHecbzaCIlg58K9msp58nLZWs03CBGO_D6F3cI4LKQEUzsbcztZqmNGWd0ld4zkrKzIP9cQosa_xold4hEzSX_ORRHYQLimLYaQmP3rKqWPMsbIupPdpnGqBDzAYjc7Pw9pQBzuZJj8e3FEG6a5tblDfMcgeklXZIkwzN7ypWCbFDoDP2STSYJYZ-LQIB0-Zlex7dm2KhyB8QSkMQK60YvpXz4L1OtwG7spk3yUCWxul6hYF76klST0iS6DH03YdaDpt4gRXkTUKyTRfB10h-WhCAKKRzmT6d_IT9ApIyqPhimkgkBHhLNyjK8lgAJdk9CLriSEOgVpruy";
private static final String SERVICE_ACCOUNT_CERT_URL =
Expand Down Expand Up @@ -320,18 +320,20 @@ public void testVerifyRs256TokenWithLegacyCertificateUrlFormat()
assertTrue(tokenVerifier.verify(IdToken.parse(JSON_FACTORY, FEDERATED_SIGNON_RS256_TOKEN)));
}

private IdTokenVerifier generateTokenVerifier(long mockClockTime) {
private IdTokenVerifier generateTokenVerifier(long mockClockTime) throws IOException {
MockClock clock = new MockClock(mockClockTime);
HttpTransportFactory transportFactory =
mockTransport(SERVICE_ACCOUNT_CERT_URL, readResourceAsString("certs.json"));
return new IdTokenVerifier.Builder()
.setClock(clock)
.setCertificatesLocation(SERVICE_ACCOUNT_CERT_URL)
.setHttpTransportFactory(new DefaultHttpTransportFactory())
.setHttpTransportFactory(transportFactory)
.build();
}

public void testVerifyServiceAccountRs256Token() throws IOException {
// use newly used signature
IdTokenVerifier tokenVerifier = generateTokenVerifier(1668709195000L);
IdTokenVerifier tokenVerifier = generateTokenVerifier(1686002000000L);
assertTrue(tokenVerifier.verify(IdToken.parse(JSON_FACTORY, SERVICE_ACCOUNT_RS256_TOKEN)));

// a token with a bad signature that is expected to fail in verify, but work in verifyPayload
Expand Down
20 changes: 20 additions & 0 deletions google-oauth-client/src/test/resources/certs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"keys": [
{
"e": "AQAB",
"n": "1qrQCTst3RF04aMC9Ye_kGbsE0sftL4FOtB_WrzBDOFdrfVwLfflQuPX5kJ-0iYv9r2mjD5YIDy8b-iJKwevb69ISeoOrmL3tj6MStJesbbRRLVyFIm_6L7alHhZVyqHQtMKX7IaNndrfebnLReGntuNk76XCFxBBnRaIzAWnzr3WN4UPBt84A0KF74pei17dlqHZJ2HB2CsYbE9Ort8m7Vf6hwxYzFtCvMCnZil0fCtk2OQ73l6egcvYO65DkAJibFsC9xAgZaF-9GYRlSjMPd0SMQ8yU9i3W7beT00Xw6C0FYA9JAYaGaOvbT87l_6ZkAksOMuvIPD_jNVfTCPLQ",
"use": "sig",
"kty": "RSA",
"alg": "RS256",
"kid": "6083dd5981673f661fde9dae646b6f0380a0145c"
},
{
"use": "sig",
"alg": "RS256",
"kid": "85ba9313fd7a7d4afa84884abcc8403004363180",
"e": "AQAB",
"kty": "RSA",
"n": "pP-rCe4jkKX6mq8yP1GcBZcxJzmxKWicHHor1S3Q49u6Oe-bQsk5NsK5mdR7Y7liGV9n0ikXSM42dYKQdxbhKA-7--fFon5isJoHr4fIwL2CCwVm5QWlK37q6PiH2_F1M0hRorHfkCb4nI56ZvfygvuOH4LIS82OzIgmsYbeEfwDRpeMSxWKwlpa3pX3GZ6jG7FgzJGBvmBkagpgsa2JZdyU4gEGMOkHdSzi5Ii-6RGfFLhhI1OMxC9P2JaU5yjMN2pikfFIq_dbpm75yNUGpWJNVywtrlNvvJfA74UMN_lVCAaSR0A03BUMg6ljB65gFllpKF224uWBA8tpjngwKQ"
}
]
}
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@
<plugin>
<groupId>com.coveo</groupId>
<artifactId>fmt-maven-plugin</artifactId>
<version>2.13</version>
<version>2.9</version>
<configuration>
<style>google</style>
<verbose>true</verbose>
Expand All @@ -443,7 +443,7 @@
<dependency>
<groupId>com.google.googlejavaformat</groupId>
<artifactId>google-java-format</artifactId>
<version>1.15.0</version>
<version>1.7</version>
</dependency>
</dependencies>
</plugin>
Expand Down Expand Up @@ -521,7 +521,7 @@
</activation>
<properties>
<!-- default config values -->
<docletName>java-docfx-doclet-1.5.0</docletName>
<docletName>java-docfx-doclet-1.9.0</docletName>
<outputpath>${project.build.directory}/docfx-yml</outputpath>
<projectname>${project.artifactId}</projectname>
<excludeclasses></excludeclasses>
Expand Down

0 comments on commit d014015

Please sign in to comment.