Commit 8a56bc1
Fix exception-contract and cache-key regressions vs #882
Blocker 1 — Exception contract:
RuntimeError from msal-key-attestation (DLL load, attestation call) now
gets caught and wrapped as MsiV2Error at both the provider call site in
msi_v2.py and the outer boundary in managed_identity.py. Only
MsiV2Error (or its subclasses) can escape to the caller.
Blocker 2 — Stable attestation cache key:
The provider callback signature is expanded from (endpoint, key_handle,
client_id) to (endpoint, key_handle, client_id, cache_key). MSAL now
passes the stable per-boot key name as cache_key, which
get_attestation_jwt() uses for its MAA token cache instead of falling
back to the less cache-friendly numeric handle.
Tests: 59 passed (44 core + 15 attestation), including new tests for
RuntimeError wrapping and cache_key forwarding.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 639917f commit 8a56bc1
File tree
5 files changed
+77
-20
lines changed- msal-key-attestation
- msal_key_attestation
- tests
- msal
- tests
5 files changed
+77
-20
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
338 | 338 | | |
339 | 339 | | |
340 | 340 | | |
341 | | - | |
| 341 | + | |
342 | 342 | | |
343 | 343 | | |
344 | | - | |
| 344 | + | |
345 | 345 | | |
346 | 346 | | |
347 | 347 | | |
348 | 348 | | |
349 | 349 | | |
350 | 350 | | |
351 | | - | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
352 | 356 | | |
353 | 357 | | |
354 | 358 | | |
| |||
372 | 376 | | |
373 | 377 | | |
374 | 378 | | |
| 379 | + | |
375 | 380 | | |
376 | 381 | | |
377 | 382 | | |
378 | 383 | | |
379 | 384 | | |
| 385 | + | |
380 | 386 | | |
381 | 387 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
112 | | - | |
| 112 | + | |
| 113 | + | |
113 | 114 | | |
114 | 115 | | |
115 | 116 | | |
116 | 117 | | |
117 | 118 | | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
118 | 132 | | |
119 | 133 | | |
120 | 134 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
343 | 343 | | |
344 | 344 | | |
345 | 345 | | |
346 | | - | |
347 | | - | |
348 | | - | |
349 | | - | |
350 | | - | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
351 | 357 | | |
352 | 358 | | |
353 | 359 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1232 | 1232 | | |
1233 | 1233 | | |
1234 | 1234 | | |
1235 | | - | |
1236 | | - | |
1237 | | - | |
| 1235 | + | |
| 1236 | + | |
| 1237 | + | |
| 1238 | + | |
1238 | 1239 | | |
1239 | 1240 | | |
1240 | 1241 | | |
| |||
1263 | 1264 | | |
1264 | 1265 | | |
1265 | 1266 | | |
1266 | | - | |
1267 | | - | |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
| 1270 | + | |
1268 | 1271 | | |
1269 | 1272 | | |
1270 | 1273 | | |
| |||
1335 | 1338 | | |
1336 | 1339 | | |
1337 | 1340 | | |
1338 | | - | |
1339 | | - | |
1340 | | - | |
1341 | | - | |
| 1341 | + | |
| 1342 | + | |
| 1343 | + | |
| 1344 | + | |
| 1345 | + | |
| 1346 | + | |
| 1347 | + | |
| 1348 | + | |
| 1349 | + | |
| 1350 | + | |
| 1351 | + | |
| 1352 | + | |
1342 | 1353 | | |
1343 | 1354 | | |
1344 | 1355 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
403 | 403 | | |
404 | 404 | | |
405 | 405 | | |
406 | | - | |
| 406 | + | |
407 | 407 | | |
408 | 408 | | |
409 | 409 | | |
| |||
425 | 425 | | |
426 | 426 | | |
427 | 427 | | |
428 | | - | |
| 428 | + | |
429 | 429 | | |
430 | 430 | | |
431 | 431 | | |
| |||
434 | 434 | | |
435 | 435 | | |
436 | 436 | | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
437 | 457 | | |
438 | 458 | | |
439 | 459 | | |
| |||
0 commit comments