8000 chore: migrate google-auth-library-java to monorepo by chingor13 · Pull Request #12023 · googleapis/google-cloud-java · GitHub
[go: up one dir, main page]

Skip to content

chore: migrate google-auth-library-java to monorepo#12023

Draft
chingor13 wants to merge 1270 commits intomainfrom
migrate-google-auth-library-java
Draft

chore: migrate google-auth-library-java to monorepo#12023
chingor13 wants to merge 1270 commits intomainfrom
migrate-google-auth-library-java

Conversation

@chingor13
Copy link
Contributor

No description provided.

release-please bot and others added 30 commits September 20, 2024 14:27
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: Lawrence Qiu <lawrenceqiu@google.com>
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
…uth2-http to v1.27.0 (#1514)

Co-authored-by: Lawrence Qiu <lawrenceqiu@google.com>
context: b/339259830 and [go/send-auth-metrics-java](http://goto.google.com/send-auth-metrics-java)

Changes include:
- expose `Credentials` type via `getMetricsCredentialType()`. Override this method for UserCredentials, ServiceAccountCredentials, ImpersonatedCredentials, and ComputeEngineCredentials. This is used in both token request and token usage flows.
- add metric headers for each of the in-scope token requests. Below are examples of each request flow with added metrics:
  - User credentials request (at/id):  “gl-java/19.0.1 auth/1.24.3 cred-type/u”
  - SA credentials, VM credentials or Impersonated credentials requests (at/id): “gl-java/19.0.1 auth/1.24.3 auth-request-type/at cred-type/sa”
  - MDS ping (This is used in ADC during the credential detection): “gl-java/19.0.1 auth/1.24.3 auth-request-type/mds”
- What is not tracked: ComputeEngineCredentials getUniverseDomain and getAccount does not send metrics header; TPC flows does not send metrics headers.

Related pr: adding for cred_type for token usage requests
googleapis/sdk-platform-java#3186
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
* Make some enum fields final

See go/bugpattern/ImmutableEnumChecker

* One more field
…e-plugin to v3.5.1 (#1529)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [org.apache.maven.plugins:maven-surefire-plugin](https://maven.apache.org/surefire/) | `3.5.0` -> `3.5.1` | [![age](https://developer.mend.io/api/mc/badges/age/maven/org.apache.maven.plugins:maven-surefire-plugin/3.5.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/org.apache.maven.plugins:maven-surefire-plugin/3.5.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/org.apache.maven.plugins:maven-surefire-plugin/3.5.0/3.5.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/org.apache.maven.plugins:maven-surefire-plugin/3.5.0/3.5.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/googleapis/google-auth-library-java).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC45Ny4wIiwidXBkYXRlZEluVmVyIjoiMzguOTcuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->
…verse domain (#1528)

for context: b/340602527

Changes in this pr:
- Override `getUniverseDomain()` to grab source credentials’s universe domain (UD) by default. Always use source credentials UD, not explicit provided UD. (In current design, impersonated credentials may not have universe domain in the outer layer. relay on UD from source credential. This may change in future)
- Fix `isDefaultUniverseDomain()` in `GoogleCredentials` to account for `getUniverseDomain()` overrides in child classes.
- In refreshAccessToken(), use endpoint url pattern to account for TPC case.
  - note that I choose to bypass this refreshIfExpired step because it wrongly steps into code path meant only for OAuth2 token request (GDU flow). Filed #1534 to address this separately. But for GDU flow here, this refresh step is redundant because the SSJ will get re-generated at [initialize request](https://github.com/googleapis/google-auth-library-java/blob/a987ecd06fd25a0048cdb3da6d1df4d029d85d79/oauth2_http/java/com/google/auth/oauth2/ImpersonatedCredentials.java#L558). Also skip this step for SA GDU with SSJ flow.
- Throw IllegalStateException if UD is explicitly set (with parent class setter) and not matching source credential's UD

- Fix toBuilder() to invoke super, and fix related issue with createScoped. (see #1489, #1428); Also fix equals() to compare super first.


Not in this pr: 
- idtoken and signBlob endpoint changes are out-of-scope for this pr, will raise separate pr for it.

sa-to-sa impersonation is successfully E2E tested for TPC usage according to [go/prptst-testing-service-account-impersonation](http://goto.google.com/prptst-testing-service-account-impersonation).



---------

Co-authored-by: Blake Li <blakeli@google.com>
…e-plugin to v3.5.1 (#1530)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [org.apache.maven.plugins:maven-failsafe-plugin](https://maven.apache.org/surefire/) | `3.5.0` -> `3.5.1` | [![age](https://developer.mend.io/api/mc/badges/age/maven/org.apache.maven.plugins:maven-failsafe-plugin/3.5.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/org.apache.maven.plugins:maven-failsafe-plugin/3.5.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/org.apache.maven.plugins:maven-failsafe-plugin/3.5.0/3.5.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/org.apache.maven.plugins:maven-failsafe-plugin/3.5.0/3.5.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/googleapis/google-auth-library-java).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC45Ny4wIiwidXBkYXRlZEluVmVyIjoiMzguOTcuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->
…-sdk to v2.0.31 (#1539)

Co-authored-by: gcf-merge-on-green[bot] <60162190+gcf-merge-on-green[bot]@users.noreply.github.com>
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
* utils.

* formatted.

* static mtls config.

* update autoconfig endpoint URL.

* plaintext and mtls S2A address.

* utils.

* formatted.

* static mtls config.

* update autoconfig endpoint URL.

* plaintext and mtls S2A address.

* Use logic in ComputeEngineCredentials to get MDS URL.

* retry MDS request.

* rebranch MtlsConfig as S2AConfig.

* change naming to S2AConfig elsewhere.

* set config in constructor.

* make error message more specific.

* move creation of transportFactory and parser out of loop.

* construct request once.

* move declare to loop.

* remove unnecessary empty constructor.

* Use default retry value.

* set config in constructor.

* make MDS MTLS autoconfig endpoint a static constant.

* make S2AConfig private.

* make constants package private.

* Use Builder pattern.

* Improve javadoc.

* Do not retry if autoconfig endpoint doesn't exist.

* add comment around catching IOException.

* Try and parse each address returned from MDS.

* update license dates on added files.

* Use Google Java Http client built in retry.

* Explain why no format check.

* run linter.

* move it all into 1 try block.

* MockMetadataServerTransport populate content on 200.

* MockMetadataServerTransport uses s2aContentMap.

* Run mvn fmt:format.

* Use ImmutableMap.

* update javadoc to reference AIP.

* Don't nest try/catch + add some comments about why no throw errors.

* update javadoc for each public method.

* add experimental note.

* format.
suztomo and others added 7 commits January 29, 2026 16:04
#1882)

* fix: Deserialization checks valid class types for HttpTransportFactory

* chore: Add headers for newly added files

* chore: Fix sonatype complaints

* chore: Address PR comments
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
@chingor13 chingor13 force-pushed the migrate-google-auth-library-java branch 7 times, most recently from 518008e to b69a098 Compare February 26, 2026 19:09
@chingor13 chingor13 force-pushed the migrate-google-auth-library-java branch from 8f9cc43 to 16dabeb Compare March 12, 2026 20:07
@chingor13 chingor13 force-pushed the migrate-google-auth-library-java branch from c5e6e74 to e61d5cd Compare March 12, 2026 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0