Commit f481123
feat: Introduce Client-Side Credential Access Boundary (CAB) functionality (#1629)
* feat: Implement ClientSideCredentialAccessBoundaryFactory (#1562)
* feat: Implement ClientSideCredentialAccessBoundaryFactory.refreshCredentials()
Set up the ClientSideCredentialAccessBoundaryFactory class and module.
Implement the function to fetch and refresh intermediary tokens from STS.
* feat: Add the generated ClientSideAccessBoundaryProto class for Client-Side CAB feature. (#1571)
Change-Id: Ic7ef3cbd80b2ad778d61b9ccabf780561d3cc709
* feat: Implement refreshCredentialsIfRequired for intermediate token r… (#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. (#1598)
* 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
* chore: Update version tag in cab-token-generator pom.xml
This commit updates the version tag in the pom.xml file.
* feat: Add integration test for the client side cab
* Remove volatile keyword and use refreshLock when reading intermediateCredentials.
* Define new default values for refreshMargin and minimumTokenLifetime.
* Update version in pom.xml
* Run formatter to resolve lint errors
* add missing dependency
* Swap the assertEquals parameters so the expected value is first.
* Docs: Added javadocs
Improvements: Cleaned up code, resolved readability enhancements
---------
Co-authored-by: Jiahua Huang <jh@jiahuah.com>
Co-authored-by: aeitzman <12433791+aeitzman@users.noreply.github.com>1 parent cd1d160 commit f481123
File tree
15 files changed
+4427
-38
lines changed- cab-token-generator
- javatests/com/google/auth/credentialaccessboundary
- java/com/google/auth/credentialaccessboundary
- protobuf
- oauth2_http
- javatests/com/google/auth/oauth2
- java/com/google/auth/oauth2
15 files changed
+4427
-38
lines changedLines changed: 767 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 2174 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 989 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 153 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
Lines changed: 9 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
47 | 55 | | |
48 | 56 | | |
49 | 57 | | |
| |||
88 | 96 | | |
89 | 97 | | |
90 | 98 | | |
91 | | - | |
92 | 99 | | |
93 | 100 | | |
94 | 101 | | |
| |||
125 | 132 | | |
126 | 133 | | |
127 | 134 | | |
128 | | - | |
129 | | - | |
| 135 | + | |
130 | 136 | | |
131 | 137 | | |
132 | 138 | | |
| |||
Lines changed: 10 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
484 | 484 | | |
485 | 485 | | |
486 | 486 | | |
487 | | - | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
488 | 497 | | |
489 | 498 | | |
490 | 499 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
73 | | - | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
74 | 83 | | |
75 | 84 | | |
76 | | - | |
| 85 | + | |
| 86 | + | |
77 | 87 | | |
| 88 | + | |
| 89 | + | |
78 | 90 | | |
79 | 91 | | |
| 92 | + | |
80 | 93 | | |
81 | 94 | | |
82 | 95 | | |
83 | 96 | | |
84 | 97 | | |
85 | 98 | | |
86 | 99 | | |
87 | | - | |
| 100 | + | |
| 101 | + | |
88 | 102 | | |
89 | 103 | | |
90 | 104 | | |
| |||
241 | 255 | | |
242 | 256 | | |
243 | 257 | | |
244 | | - | |
245 | | - | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
246 | 267 | | |
247 | 268 | | |
248 | 269 | | |
| |||
0 commit comments