Commit 66b1390
Mohit
Fix ABBA deadlock between AzureActiveDirectory and AzureActiveDirectoryAuthority
- Extract authority.getAuthorityURL() outside synchronized(sLock) in
Authority.isKnownAuthority() to avoid lock-ordering inversion
- Extract authority.getAuthorityURL() outside synchronized scope in
AzureActiveDirectory.ensureCloudDiscoveryForAuthority(Authority)
- Remove synchronized from read-only ConcurrentHashMap methods in
AzureActiveDirectory (hasCloudHost, getAzureActiveDirectoryCloud,
getAzureActiveDirectoryCloudFromHostName, isValidCloudHost)
- Remove synchronized from AzureActiveDirectoryAuthority.getAzureActiveDirectoryCloud()
- Add null check for authorityUrl in isKnownAuthority()
- Improve error handling in getKnownAuthorityResult(): propagate original
discovery exception instead of replacing with UNKNOWN_AUTHORITY
- Make KnownAuthorityResult fields final
- Add 5 concurrency regression tests in AzureActiveDirectoryTest
- Expand AuthorityKnownAuthorityTest with sovereign cloud, error propagation,
and mock-based getKnownAuthorityResult tests
AB#35782991 parent 1df7e03 commit 66b1390
5 files changed
Lines changed: 511 additions & 68 deletions
File tree
- common4j/src
- main/com/microsoft/identity/common/java
- authorities
- providers/microsoft/azureactivedirectory
- test/com/microsoft/identity/common/java
- authorities
- providers/microsoft/azureactivedirectory
Lines changed: 39 additions & 36 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
318 | 318 | | |
319 | 319 | | |
320 | 320 | | |
321 | | - | |
322 | | - | |
| 321 | + | |
| 322 | + | |
323 | 323 | | |
324 | 324 | | |
325 | 325 | | |
326 | 326 | | |
327 | 327 | | |
328 | | - | |
| 328 | + | |
329 | 329 | | |
330 | 330 | | |
331 | 331 | | |
332 | 332 | | |
333 | | - | |
334 | | - | |
335 | | - | |
336 | | - | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
337 | 344 | | |
338 | 345 | | |
339 | 346 | | |
340 | | - | |
| 347 | + | |
341 | 348 | | |
342 | 349 | | |
343 | 350 | | |
344 | | - | |
345 | 351 | | |
346 | 352 | | |
347 | 353 | | |
348 | | - | |
349 | | - | |
| 354 | + | |
350 | 355 | | |
351 | | - | |
352 | | - | |
353 | | - | |
354 | | - | |
| 356 | + | |
355 | 357 | | |
356 | 358 | | |
357 | 359 | | |
| |||
360 | 362 | | |
361 | 363 | | |
362 | 364 | | |
363 | | - | |
| 365 | + | |
364 | 366 | | |
365 | 367 | | |
366 | 368 | | |
367 | | - | |
368 | | - | |
369 | | - | |
370 | | - | |
371 | | - | |
372 | | - | |
373 | | - | |
374 | | - | |
375 | | - | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
376 | 373 | | |
377 | 374 | | |
378 | 375 | | |
| |||
383 | 380 | | |
384 | 381 | | |
385 | 382 | | |
386 | | - | |
387 | | - | |
388 | 383 | | |
| 384 | + | |
389 | 385 | | |
390 | 386 | | |
391 | 387 | | |
392 | 388 | | |
393 | 389 | | |
394 | 390 | | |
395 | 391 | | |
| 392 | + | |
396 | 393 | | |
397 | 394 | | |
398 | 395 | | |
399 | 396 | | |
400 | 397 | | |
401 | | - | |
402 | | - | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
403 | 410 | | |
404 | 411 | | |
405 | 412 | | |
406 | | - | |
407 | | - | |
408 | | - | |
| 413 | + | |
409 | 414 | | |
410 | | - | |
411 | | - | |
412 | 415 | | |
413 | 416 | | |
414 | 417 | | |
415 | | - | |
416 | | - | |
| 418 | + | |
| 419 | + | |
417 | 420 | | |
418 | 421 | | |
419 | 422 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
| 74 | + | |
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| |||
Lines changed: 13 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
167 | | - | |
| 167 | + | |
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
171 | | - | |
| 171 | + | |
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
| |||
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
194 | | - | |
| 194 | + | |
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
201 | 201 | | |
202 | | - | |
| 202 | + | |
203 | 203 | | |
204 | 204 | | |
205 | 205 | | |
| |||
368 | 368 | | |
369 | 369 | | |
370 | 370 | | |
371 | | - | |
| 371 | + | |
372 | 372 | | |
373 | | - | |
374 | | - | |
375 | | - | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
376 | 381 | | |
377 | 382 | | |
378 | 383 | | |
| |||
0 commit comments