-
Notifications
You must be signed in to change notification settings - Fork 234
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
feat: Introduce Client-Side Credential Access Boundary (CAB) functionality #1629
Conversation
* feat: Implement ClientSideCredentialAccessBoundaryFactory.refreshCredentials() Set up the ClientSideCredentialAccessBoundaryFactory class and module. Implement the function to fetch and refresh intermediary tokens from STS.
…t-Side CAB feature. (#1571) Change-Id: Ic7ef3cbd80b2ad778d61b9ccabf780561d3cc709
#1583) * feat: Implement refreshCredentialsIfRequired for intermediate token refresh Implement `refreshCredentialsIfRequired`, called by `generateToken()`, to handle token refresh. It uses `refreshMargin` and `minimumTokenLifetime` to decide on synchronous or asynchronous refresh * Add unit tests for the builder and refreshCredentials() * Improve concurrency handling during credential refresh. Introduced a refresh task to manage concurrent refresh requests, preventing redundant attempts and potential race conditions. This aligns the refresh mechanism with the pattern used in OAuth2Credentials and ensures more robust credential management. * Update existing unit tests for compatibility and readability. * Add unit tests for refreshCredentialsIfRequired. * Fix a merge issue. * Temporary add sonatype-snapshots repository and cel version to fix the build error. * Remove duplicated code. * Fix lint issue. * Fix: Propagate credential refresh exceptions in blocking refresh. * Change cel version * Change cel version * Add jsr305 dependency * Fix Javadoc error * Minor code readability enhancements. * Revert "Fix Javadoc error" This reverts commit 2157fdb. * Address comments (add javadoc and use assertThrows in tests) * Run format script
* feat: Implement Client-Side CAB token generation. Change-Id: I2c217656584cf5805297f02340cbbabca471f609 * Use IllegalStateException(String, Throwable) to capture upstream exception during Tink initialization Change-Id: I12af5b84eae4dcec5865adfdad1f9396d54c0200 * Rethrow exceptions from tink and CEL Change-Id: If8c94c786ee39201029d9c27856fd2eafb61e51c * Add tests for invalid keys from upstream, and rename test cases. Change-Id: Ib41cb81c779534fc6efd74d66bf4728efd743906 * Add additional throws comment for generatToken method. Change-Id: I9cfc589ade8a91040fc9c447740493fd49e392af * Refactor tests for better readability. Change-Id: Icfd0bc24c1694f220bcbffc6cde41462c59119c4 * Catch and rethrow the exception of session key not being base64 encoded. Change-Id: I5fa0c25fe020e9612735e4ac5df2b85a2a5aab11 * Format the code using mvn com.coveo:fmt-maven-plugin:format. Change-Id: I46572488dcd28de450a6b1b2f732bee5baa86910 * Fix a typo in the javadoc comment. Change-Id: Icef9ef5f7c3567224ec507303543b78e61f43ec1
# Conflicts: # oauth2_http/java/com/google/auth/oauth2/OAuth2Utils.java # pom.xml
This commit updates the version tag in the pom.xml file.
nit: Could we update the PR title to reflect the changes that are coming into main. We try use the PR titles to create release notes for each release.
Thoughts on something like |
...java/com/google/auth/credentialaccessboundary/ClientSideCredentialAccessBoundaryFactory.java
Outdated
Show resolved
Hide resolved
...java/com/google/auth/credentialaccessboundary/ClientSideCredentialAccessBoundaryFactory.java
Show resolved
Hide resolved
...java/com/google/auth/credentialaccessboundary/ClientSideCredentialAccessBoundaryFactory.java
Outdated
Show resolved
Hide resolved
...java/com/google/auth/credentialaccessboundary/ClientSideCredentialAccessBoundaryFactory.java
Outdated
Show resolved
Hide resolved
...java/com/google/auth/credentialaccessboundary/ClientSideCredentialAccessBoundaryFactory.java
Outdated
Show resolved
Hide resolved
.../com/google/auth/credentialaccessboundary/ClientSideCredentialAccessBoundaryFactoryTest.java
Outdated
Show resolved
Hide resolved
.../com/google/auth/credentialaccessboundary/ClientSideCredentialAccessBoundaryFactoryTest.java
Show resolved
Hide resolved
...tests/com/google/auth/credentialaccessboundary/ITClientSideCredentialAccessBoundaryTest.java
Outdated
Show resolved
Hide resolved
Improvements: Cleaned up code, resolved readability enhancements
|
@@ -308,7 +354,8 @@ | |||
<groupId>org.codehaus.mojo</groupId> | |||
<artifactId>clirr-maven-plugin</artifactId> | |||
<configuration> | |||
<ignoredDifferencesFile>clirr-ignored-differences.xml</ignoredDifferencesFile> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this still needed?
| Package | Type | Package file | Manager | Update | Change | |---|---|---|---|---|---| | org.flywaydb.flyway | plugin | misk/gradle/libs.versions.toml | gradle | patch | `11.3.0` -> `11.3.1` | | [com.google.auth:google-auth-library-oauth2-http](https://github.com/googleapis/google-auth-library-java) | dependencies | misk/gradle/libs.versions.toml | gradle | minor | `1.31.0` -> `1.32.0` | | [com.google.auth:google-auth-library-credentials](https://github.com/googleapis/google-auth-library-java) | dependencies | misk/gradle/libs.versions.toml | gradle | minor | `1.31.0` -> `1.32.0` | | [software.amazon.awssdk:sdk-core](https://aws.amazon.com/sdkforjava) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `2.30.12` -> `2.30.13` | | [software.amazon.awssdk:dynamodb-enhanced](https://aws.amazon.com/sdkforjava) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `2.30.12` -> `2.30.13` | | [software.amazon.awssdk:dynamodb](https://aws.amazon.com/sdkforjava) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `2.30.12` -> `2.30.13` | | [software.amazon.awssdk:aws-core](https://aws.amazon.com/sdkforjava) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `2.30.12` -> `2.30.13` | | [software.amazon.awssdk:bom](https://aws.amazon.com/sdkforjava) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `2.30.12` -> `2.30.13` | | [software.amazon.awssdk:auth](https://aws.amazon.com/sdkforjava) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `2.30.12` -> `2.30.13` | --- ### Release Notes <details> <summary>googleapis/google-auth-library-java (com.google.auth:google-auth-library-oauth2-http)</summary> ### [`v1.32.0`](https://github.com/googleapis/google-auth-library-java/blob/HEAD/CHANGELOG.md#1320-2025-02-04) ##### Features - Introduce Client-Side Credential Access Boundary (CAB) functionality ([#​1629](googleapis/google-auth-library-java#1629)) ([f481123](googleapis/google-auth-library-java@f481123)) ##### Bug Fixes - Handle 404 and non 200 Status Code from MDS Identity Token calls ([#​1636](googleapis/google-auth-library-java#1636)) ([152c851](googleapis/google-auth-library-java@152c851)) - Respect token_uri from json in UserCredentials creation. ([#​1630](googleapis/google-auth-library-java#1630)) ([f92cc4f](googleapis/google-auth-library-java@f92cc4f)) ##### Documentation - Re-organize the README + Add a section on migrating to GoogleCredentials ([#​1644](googleapis/google-auth-library-java#1644)) ([30b26b2](googleapis/google-auth-library-java@30b26b2)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - "after 6pm every weekday,before 2am every weekday" in timezone Australia/Melbourne, Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Never, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://github.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). GitOrigin-RevId: f984e57edb0f670423a82dec1bcfe012849eb91d
See: go/client-side-cab-design-doc
Notes: