Commit 34a6beb
Add Environment Token support (#6130)
* Prototype implementation of Auth Scheme Preference
* Add tracking of explictly set token provider
* Use generated PreferredAuthSchemeProvider to wrap/delegate
* Add generic-service environment token provider + customization config (support for bedrock)
* Use generated PreferredAuthSchemeProvider to wrap/delegate
* Include tokenProvider in service config when bearer is on the model
* Support sourcing token from jvm settings + env variable.
* Refactor + use namingStrategy + add tests
* Set business metric using an interceptor
* Add ability to override token provider on request
* Adding functionality to config preferred authschemeProvider
* adding test coverage
* fix formatting checkstyle
* Added changelog
* Fix checkstyle on prefered auth scheme provider
* Add validation of service+customization
* Refactor env token customizaiton logic + add more tests
* Testing and cleanup
* Adding test coverage
* Use SdkSystemSetting for both env and system
* Add changelog
* Add profiles to service pom
* Minor cleanups
* Fix test
* Fix protocol test dependencies
* Remove dependency on profiles (use option get in generated code instead)
* Fix checkstyle
* Move AuthSchemePreferenceProvider out of internal module
* More checkstyle fixes
* Refactor and cleanup - move anon classes to full codegen classes.
* Update docs
* Additional codegen tests
* Update core/aws-core/src/main/java/software/amazon/awssdk/awscore/internal/AwsExecutionContextBuilder.java
Co-authored-by: David Ho <70000000+davidh44@users.noreply.github.com>
* Add codegen tset for base client builder w/ env bearer token
* Fixing comments, adding fixture file, renaming provider to resolver, adding coverage
* Add async client test
* Move metric interceptor logic from beforeExecute to beforeMarshall
* Move metrics logic into auth scheme interceptor
* Remove unused import
* Add codegen test for preferred auth scheme provider
* Check for empty string
* Add more documentation
* Revert "Add codegen test for preferred auth scheme provider"
This reverts commit 141b9d6.
* Replace authprovider builder with overridden defaultProvider method
* Update core/aws-core/src/main/java/software/amazon/awssdk/awscore/auth/AuthSchemePreferenceResolver.java
Co-authored-by: Olivier L Applin <olapplin@amazon.com>
* Update core/aws-core/src/main/java/software/amazon/awssdk/awscore/auth/AuthSchemePreferenceResolver.java
Co-authored-by: Olivier L Applin <olapplin@amazon.com>
* Fix import from suggested changes
* move test to aws-core module
* Update codegen tests
* Fix checkstyle
* Fix checkstyle
* Improve test coverage
* Fix docs
---------
Co-authored-by: Ran Vaknin <RanVaknin@users.noreply.github.com>
Co-authored-by: David Ho <70000000+davidh44@users.noreply.github.com>
Co-authored-by: RanVaknin <50976344+RanVaknin@users.noreply.github.com>
Co-authored-by: Olivier L Applin <olapplin@amazon.com>1 parent 992948a commit 34a6beb
File tree
53 files changed
+1986
-339
lines changed- .changes/next-release
- codegen/src
- main/java/software/amazon/awssdk/codegen
- emitters/tasks
- model/config/customization
- naming
- poet
- auth/scheme
- builder
- client
- model
- utils
- test
- java/software/amazon/awssdk/codegen
- naming
- poet
- auth/scheme
- builder
- client
- utils
- resources/software/amazon/awssdk/codegen/poet
- auth/scheme
- builder
- sra
- client
- c2j/json-bearer-auth
- model
- core
- aws-core/src
- main/java/software/amazon/awssdk/awscore
- internal
- test/java/software/amazon/awssdk/awscore
- internal
- sdk-core/src/main/java/software/amazon/awssdk/core
- interceptor
- useragent
- test/codegen-generated-classes-test/src
- main/resources/codegen-resources/environmenttokenprovider
- test/java/software/amazon/awssdk/services
- bearerauth
- environmenttokenprovider
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
53 files changed
+1986
-339
lines changedLines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
Lines changed: 14 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
36 | | - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
37 | 44 | | |
38 | 45 | | |
39 | 46 | | |
| |||
46 | 53 | | |
47 | 54 | | |
48 | 55 | | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
49 | 61 | | |
50 | 62 | | |
51 | 63 | | |
| |||
Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
350 | 350 | | |
351 | 351 | | |
352 | 352 | | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
353 | 360 | | |
354 | 361 | | |
355 | 362 | | |
| |||
924 | 931 | | |
925 | 932 | | |
926 | 933 | | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
927 | 942 | | |
Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
432 | 432 | | |
433 | 433 | | |
434 | 434 | | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
435 | 451 | | |
436 | 452 | | |
437 | 453 | | |
| |||
Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
200 | 200 | | |
201 | 201 | | |
202 | 202 | | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
203 | 218 | | |
204 | 219 | | |
205 | 220 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
82 | 86 | | |
83 | 87 | | |
84 | 88 | | |
| |||
Lines changed: 42 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
52 | 53 | | |
53 | 54 | | |
| 55 | + | |
54 | 56 | | |
55 | 57 | | |
56 | 58 | | |
| |||
70 | 72 | | |
71 | 73 | | |
72 | 74 | | |
| 75 | + | |
73 | 76 | | |
74 | 77 | | |
| 78 | + | |
75 | 79 | | |
76 | 80 | | |
77 | 81 | | |
| |||
99 | 103 | | |
100 | 104 | | |
101 | 105 | | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
102 | 109 | | |
103 | 110 | | |
104 | 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 | + | |
105 | 142 | | |
106 | 143 | | |
107 | 144 | | |
| |||
116 | 153 | | |
117 | 154 | | |
118 | 155 | | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
119 | 161 | | |
120 | 162 | | |
121 | 163 | | |
| |||
Lines changed: 54 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
| |||
53 | 54 | | |
54 | 55 | | |
55 | 56 | | |
| 57 | + | |
56 | 58 | | |
57 | 59 | | |
58 | 60 | | |
| |||
71 | 73 | | |
72 | 74 | | |
73 | 75 | | |
| 76 | + | |
74 | 77 | | |
| 78 | + | |
75 | 79 | | |
76 | 80 | | |
77 | 81 | | |
| |||
102 | 106 | | |
103 | 107 | | |
104 | 108 | | |
| 109 | + | |
| 110 | + | |
105 | 111 | | |
106 | 112 | | |
107 | 113 | | |
| |||
112 | 118 | | |
113 | 119 | | |
114 | 120 | | |
| 121 | + | |
115 | 122 | | |
116 | 123 | | |
117 | 124 | | |
| |||
266 | 273 | | |
267 | 274 | | |
268 | 275 | | |
269 | | - | |
270 | | - | |
271 | 276 | | |
272 | 277 | | |
273 | 278 | | |
274 | 279 | | |
275 | | - | |
276 | | - | |
| 280 | + | |
277 | 281 | | |
278 | | - | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
279 | 286 | | |
280 | 287 | | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
| 288 | + | |
| 289 | + | |
286 | 290 | | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
287 | 294 | | |
288 | 295 | | |
289 | 296 | | |
| |||
302 | 309 | | |
303 | 310 | | |
304 | 311 | | |
| 312 | + | |
305 | 313 | | |
306 | | - | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
307 | 318 | | |
308 | 319 | | |
309 | 320 | | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
310 | 353 | | |
311 | 354 | | |
312 | 355 | | |
| |||
0 commit comments