Commit 0965c25
committed
Broker IPC plumbing for onboarding telemetry blob, Fixes AB#3568357 (#3111)
Adds the IPC plumbing for the onboarding telemetry blob to flow
client↔broker. Independent of PR #3088 (which adds the
recorder/store/constants); both are needed together for end-to-end
brokered onboarding telemetry.
Linked Feature:
[AB#3462876](https://identitydivision.visualstudio.com/fac9d424-53d2-45c0-91b5-ef6ba7a6bf26/_workitems/edit/3462876)
Linked PBI:
[AB#3568357](https://identitydivision.visualstudio.com/fac9d424-53d2-45c0-91b5-ef6ba7a6bf26/_workitems/edit/3568357)
| File | Change |
|---|---|
| `BrokerRequest.java` | Add `onboarding_seed_json` field (client →
broker) |
| `BrokerResult.java` | Add `onboarding_blob` field + builder + getter
(broker → client) |
| `InteractiveTokenCommandParameters.java` | Add `onboardingSeedJson`
field on the params builder |
| `AcquireTokenResult.java` | Add `onboardingBlob` field for carrying
the populated blob through the result chain |
| `MsalBrokerRequestAdapter.java` | Serialize `onboardingSeedJson` from
command parameters into `BrokerRequest` |
| `MsalBrokerResultAdapter.java` | Extract `onboardingBlob` from
`BrokerResult` into `AcquireTokenResult` |
All additions are pure data fields + adapter wiring. No behavior change
for existing callers (fields default to empty/null when not set).
- **Direction `client → broker`**: OneAuth/MSAL builds the seed JSON
(containing `sessionCorrelationId`, `onboardingMode`, `schema_version`)
and attaches it to the interactive request. The broker reads it via the
new field on `BrokerInteractiveTokenCommandParameters`, constructs its
own `OnboardingTelemetryRecorder` from the seed, and uses the same
correlation ID for its onboarding telemetry events.
- **Direction `broker → client`**: When the broker emits the populated
onboarding blob (after `finalizeBlob()`), it places it into
`BrokerResult.onboarding_blob`. The client extracts it into
`AcquireTokenResult.onboardingBlob`, where downstream OneAuth code reads
it and emits the blob through MATS.
See full design: [Mobile Onboarding Telemetry
Design](https://identitydivision.visualstudio.com/Engineering/_workitems/edit/3462876)
§6.6 (persistence and propagation) and §11.2 (broker → OneAuth blob
delivery).
- **Pairs with**: PR #3088 (`OnboardingTelemetryRecorder` +
`OnboardingTelemetryConstants` + `OnboardingSessionCorrelationStore`).
The recorder consumes the seed JSON read out of these IPC fields.
- **Consumers**:
- OneAuth:
[`shared/mobile-onboarding-android-fixes`](https://office.visualstudio.com/OneAuth/_git/OneAuth)
updates `BrokerRequestConverter` / `BrokerResultConverter` to read/write
these fields.
- Broker (`ad-accounts-for-android`):
`MsalAndroidBrokerCommandParameterAdapter` reads `onboardingSeedJson`;
broker error handler / SSO controller will write `onboarding_blob` once
the recorder lifecycle is wired (separate PBI,
[AB#3568359](https://identitydivision.visualstudio.com/fac9d424-53d2-45c0-91b5-ef6ba7a6bf26/_workitems/edit/3568359)).
- **No breaking changes**: all new optional fields, no modifications to
existing serialization order or field semantics.
- Round-trip serialization is exercised by existing `BrokerRequest` /
`BrokerResult` tests (Gson + Bundle); new fields default to empty/null
when not set, so no existing test should regress.
- E2E validated locally via OneAuth `local-only-onboarding-telemetry`
branch + a combined Common build (`mavenLocal` `0.0.0-zhipan-mot-7`):
seed JSON flows OneAuth → BrokerRequest → broker → BrokerResult →
OneAuth.1 parent 543578a commit 0965c25
11 files changed
Lines changed: 329 additions & 5 deletions
File tree
- common4j/src
- main/com/microsoft/identity/common/java
- commands/parameters
- result
- test/com/microsoft/identity/common/java
- commands/parameters
- result
- common/src
- main/java/com/microsoft/identity/common/internal
- broker
- request
- result
- test/java/com/microsoft/identity/common/internal/request
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| 90 | + | |
90 | 91 | | |
91 | 92 | | |
92 | 93 | | |
| |||
295 | 296 | | |
296 | 297 | | |
297 | 298 | | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
298 | 312 | | |
Lines changed: 20 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| 100 | + | |
100 | 101 | | |
101 | 102 | | |
102 | 103 | | |
| |||
327 | 328 | | |
328 | 329 | | |
329 | 330 | | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
330 | 338 | | |
331 | 339 | | |
332 | 340 | | |
| |||
362 | 370 | | |
363 | 371 | | |
364 | 372 | | |
| 373 | + | |
365 | 374 | | |
366 | 375 | | |
367 | 376 | | |
| |||
498 | 507 | | |
499 | 508 | | |
500 | 509 | | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
501 | 515 | | |
502 | 516 | | |
503 | 517 | | |
| |||
523 | 537 | | |
524 | 538 | | |
525 | 539 | | |
| 540 | + | |
526 | 541 | | |
527 | 542 | | |
528 | 543 | | |
| |||
535 | 550 | | |
536 | 551 | | |
537 | 552 | | |
538 | | - | |
539 | 553 | | |
540 | 554 | | |
541 | 555 | | |
| |||
712 | 726 | | |
713 | 727 | | |
714 | 728 | | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
715 | 734 | | |
716 | 735 | | |
717 | 736 | | |
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
142 | | - | |
| 142 | + | |
| 143 | + | |
143 | 144 | | |
144 | 145 | | |
145 | 146 | | |
| |||
Lines changed: 55 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
465 | 465 | | |
466 | 466 | | |
467 | 467 | | |
468 | | - | |
469 | | - | |
| 468 | + | |
| 469 | + | |
470 | 470 | | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
471 | 478 | | |
472 | 479 | | |
473 | 480 | | |
| |||
565 | 572 | | |
566 | 573 | | |
567 | 574 | | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
568 | 608 | | |
569 | 609 | | |
570 | 610 | | |
| |||
1017 | 1057 | | |
1018 | 1058 | | |
1019 | 1059 | | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
1020 | 1065 | | |
1021 | 1066 | | |
1022 | | - | |
| 1067 | + | |
1023 | 1068 | | |
1024 | 1069 | | |
1025 | 1070 | | |
| |||
1038 | 1083 | | |
1039 | 1084 | | |
1040 | 1085 | | |
| 1086 | + | |
| 1087 | + | |
| 1088 | + | |
| 1089 | + | |
| 1090 | + | |
| 1091 | + | |
| 1092 | + | |
1041 | 1093 | | |
1042 | 1094 | | |
1043 | 1095 | | |
| |||
Lines changed: 69 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
386 | 386 | | |
387 | 387 | | |
388 | 388 | | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 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 | + | |
389 | 458 | | |
Lines changed: 30 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
658 | 658 | | |
659 | 659 | | |
660 | 660 | | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
661 | 691 | | |
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
41 | 43 | | |
42 | 44 | | |
43 | 45 | | |
| |||
85 | 87 | | |
86 | 88 | | |
87 | 89 | | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
88 | 97 | | |
89 | 98 | | |
90 | 99 | | |
| |||
Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
52 | 67 | | |
53 | 68 | | |
54 | 69 | | |
| |||
0 commit comments