Commit 4e91526
authored
Debug errors in Keystore layer , Fixes AB#3092835 (#2544)
Issue : We got a couple of IcMs
(https://portal.microsofticm.com/imp/v5/incidents/details/561690347/summary)
in which we found that the keystore operation "unwrap" is throwing
InvalidKey Exception.
This is only happening on Pixel 5 devices so far and we have not noticed
any recent OS update or security patch released. One of the IcMs says
that this has been happening for 6 months now. Although the impacted
devices are very low, Auth app team has been receiving at-least one
similar IcM every other week.
Fix :
- Synchronizing the unwrap method. I am not sure if this would work as I
have not been able to reproduce the same error on the test devices i
have. Hence based on some online resources where other type of keystore
errors were observed due to multiple threads accessing the keystore at
the same time, I have added synchronized keyword on "unwrap" and 2 other
methods.
- Also added a telemetry metric to get the exceptions (if it is still
happening even after my fix)
Fixes
[AB#3092835](https://identitydivision.visualstudio.com/fac9d424-53d2-45c0-91b5-ef6ba7a6bf26/_workitems/edit/3092835)1 parent e827f2f commit 4e91526
File tree
4 files changed
+38
-5
lines changed- common4j/src/main/com/microsoft/identity/common/java/opentelemetry
- common/src/main/java/com/microsoft/identity/common
- crypto
- internal/util
4 files changed
+38
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
4 | 9 | | |
5 | 10 | | |
6 | 11 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
189 | | - | |
| 189 | + | |
190 | 190 | | |
191 | 191 | | |
192 | 192 | | |
| |||
Lines changed: 21 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
29 | 32 | | |
30 | 33 | | |
31 | 34 | | |
| |||
51 | 54 | | |
52 | 55 | | |
53 | 56 | | |
| 57 | + | |
| 58 | + | |
54 | 59 | | |
55 | 60 | | |
56 | 61 | | |
| |||
84 | 89 | | |
85 | 90 | | |
86 | 91 | | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
87 | 97 | | |
88 | 98 | | |
89 | 99 | | |
| |||
342 | 352 | | |
343 | 353 | | |
344 | 354 | | |
345 | | - | |
| 355 | + | |
346 | 356 | | |
347 | 357 | | |
348 | 358 | | |
| |||
397 | 407 | | |
398 | 408 | | |
399 | 409 | | |
400 | | - | |
| 410 | + | |
401 | 411 | | |
402 | 412 | | |
403 | 413 | | |
| |||
440 | 450 | | |
441 | 451 | | |
442 | 452 | | |
443 | | - | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
444 | 462 | | |
445 | 463 | | |
446 | 464 | | |
| |||
Lines changed: 11 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
292 | 292 | | |
293 | 293 | | |
294 | 294 | | |
295 | | - | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
296 | 306 | | |
0 commit comments