Commit 46a4432
committed
bug #62495 [Security][Http] Fix OIDC discovery when multiple HttpClient instances are used (Ali-HENDA)
This PR was merged into the 7.4 branch.
Discussion
----------
[Security][Http] Fix OIDC discovery when multiple HttpClient instances are used
| Q | A
| ------------- | ---
| Branch? | 7.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Issues | Fix
| License | MIT
This PR fixes an issue in the OIDC JWKS discovery logic revealed in the discussion of #62369.
$client->stream() was used incorrectly:
$client could be undefined, and responses must be streamed using the same client instance that created them, which breaks when multiple HttpClientInterface instances are configured.
The logic now performs sequential discovery per client, avoiding cross-client streaming and ensuring correctness.
This PR also hardens the "use" check ($key['use'] ?? null).
Commits
-------
7a885d29993 [Security] Fix OIDC discovery when using multiple HttpClient instancesFile tree
2 files changed
+100
-13
lines changed- AccessToken/Oidc
- Tests/AccessToken/Oidc
2 files changed
+100
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
152 | 155 | | |
153 | | - | |
154 | 156 | | |
| 157 | + | |
| 158 | + | |
155 | 159 | | |
| 160 | + | |
| 161 | + | |
156 | 162 | | |
157 | | - | |
158 | | - | |
159 | | - | |
| 163 | + | |
160 | 164 | | |
161 | 165 | | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
166 | 172 | | |
| 173 | + | |
| 174 | + | |
167 | 175 | | |
168 | | - | |
169 | | - | |
| 176 | + | |
170 | 177 | | |
171 | 178 | | |
172 | 179 | | |
| |||
181 | 188 | | |
182 | 189 | | |
183 | 190 | | |
184 | | - | |
| 191 | + | |
185 | 192 | | |
186 | 193 | | |
187 | 194 | | |
| |||
198 | 205 | | |
199 | 206 | | |
200 | 207 | | |
| 208 | + | |
201 | 209 | | |
202 | 210 | | |
203 | 211 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| |||
316 | 317 | | |
317 | 318 | | |
318 | 319 | | |
319 | | - | |
| 320 | + | |
| 321 | + | |
320 | 322 | | |
321 | 323 | | |
322 | 324 | | |
| |||
355 | 357 | | |
356 | 358 | | |
357 | 359 | | |
358 | | - | |
| 360 | + | |
| 361 | + | |
359 | 362 | | |
360 | 363 | | |
361 | 364 | | |
| |||
390 | 393 | | |
391 | 394 | | |
392 | 395 | | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
393 | 472 | | |
0 commit comments