Skip to content

Remove legacy WPJ Account Authenticator IPC strategy from Common, Fixes AB#3571860#3076

Draft
Copilot wants to merge 3 commits intodevfrom
copilot/remove-legacy-wpj-authenticator
Draft

Remove legacy WPJ Account Authenticator IPC strategy from Common, Fixes AB#3571860#3076
Copilot wants to merge 3 commits intodevfrom
copilot/remove-legacy-wpj-authenticator

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 8, 2026

The legacy LEGACY_ACCOUNT_AUTHENTICATOR_FOR_WPJ_API IPC strategy type is no longer needed. This PR removes it from Common as the first step — Broker must be updated separately to remove its own references after this lands.

Changes

  • IIpcStrategy.Type — Removed LEGACY_ACCOUNT_AUTHENTICATOR_FOR_WPJ_API enum value; enum now contains only BOUND_SERVICE, ACCOUNT_MANAGER_ADD_ACCOUNT, and CONTENT_PROVIDER
  • AndroidDeviceRegistrationClientController — Removed static import and the else if telemetry branch that mapped the legacy strategy type to AttributeName.legacy_account_manager_status
  • AttributeName — Removed legacy_account_manager_status enum constant; note this removal must be mirrored in the Broker repo's AttributeName
  • DeviceRegistrationIpcStrategiesProvider — Removed KDoc references to WpjLegacyAccountAuthenticatorStrategy from both the class and getStrategies() docs
  • IpcStrategyWithBackupTests — Replaced LEGACY_ACCOUNT_AUTHENTICATOR_FOR_WPJ_API with CONTENT_PROVIDER in backup strategy lists to maintain distinct type coverage across test scenarios

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • www.puppycrawl.com
    • Triggering command: /opt/hostedtoolcache/CodeQL/2.25.1/x64/codeql/tools/linux64/java/bin/java /opt/hostedtoolcache/CodeQL/2.25.1/x64/codeql/tools/linux64/java/bin/java -jar /opt/hostedtoolcache/CodeQL/2.25.1/x64/codeql/xml/tools/xml-extractor.jar --fileList=/tmp/codeql-scratch-b2678d0398b00160/dbs/java/working/files-to-index16992169436615711600.list --sourceArchiveDir=/tmp/codeql-scratch-b2678d0398b00160/dbs/java/src --outputDir=/tmp/codeql-scratch-b2678d0398b00160/dbs/java/trap/java (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

Objective

Remove all references to the legacy WPJ Account Authenticator IPC strategy from the Common module. This includes the LEGACY_ACCOUNT_AUTHENTICATOR_FOR_WPJ_API enum value, the legacy_account_manager_status telemetry attribute, the telemetry branch in the device registration controller, test substitutions, and a documentation comment referencing the legacy strategy.

Fixes AB#3571860

Context

The device registration system currently supports three IPC strategies: ContentProvider (primary), BoundService (fallback), and a legacy WPJ Account Authenticator strategy. The legacy strategy is no longer needed. Removing it from Common is the first step — Broker consumes these types and must be updated after this change lands.

After this change, IIpcStrategy.Type should only contain strategy types that are actively used. The telemetry attribute legacy_account_manager_status tracked whether the legacy path was taken and is no longer relevant.

Technical Requirements

  1. In common/src/main/java/com/microsoft/identity/common/internal/broker/ipc/IIpcStrategy.kt:

    • Remove the LEGACY_ACCOUNT_AUTHENTICATOR_FOR_WPJ_API value from the IIpcStrategy.Type enum
  2. In common/src/main/java/com/microsoft/identity/deviceregistration/AndroidDeviceRegistrationClientController.java:

    • Remove the import for IIpcStrategy.Type.LEGACY_ACCOUNT_AUTHENTICATOR_FOR_WPJ_API
    • Remove the else if branch in the telemetry code that checks for LEGACY_ACCOUNT_AUTHENTICATOR_FOR_WPJ_API and sets AttributeName.legacy_account_manager_status
  3. In common4j/src/main/com/microsoft/identity/common/java/opentelemetry/AttributeName.java:

    • Remove the legacy_account_manager_status constant
  4. In common/src/test/.../IpcStrategyWithBackupTests.kt:

    • Replace any usage of IIpcStrategy.Type.LEGACY_ACCOUNT_AUTHENTICATOR_FOR_WPJ_API with IIpcStrategy.Type.ACCOUNT_MANAGER_ADD_ACCOUNT (or another valid enum value) so the test continues to verify multi-strategy backup behavior with a valid type
  5. In common/src/main/java/com/microsoft/identity/deviceregistration/DeviceRegistrationIpcStrategiesProvider.kt:

    • Remove any KDoc/comment that references the legacy Account Authenticator strategy

Files to Modify

  • common/src/main/java/com/microsoft/identity/common/internal/broker/ipc/IIpcStrategy.kt — Remove LEGACY_ACCOUNT_AUTHENTICATOR_FOR_WPJ_API enum value
  • common/src/main/java/com/microsoft/identity/deviceregistration/AndroidDeviceRegistrationClientController.java — Remove import and telemetry branch for the legacy strategy type
  • common4j/src/main/com/microsoft/identity/common/java/opentelemetry/AttributeName.java — Remove legacy_account_manager_status constant
  • common/src/test/.../IpcStrategyWithBackupTests.kt — Replace LEGACY_ACCOUNT_AUTHENTICATOR_FOR_WPJ_API references with ACCOUNT_MANAGER_ADD_ACCOUNT
  • common/src/main/java/com/microsoft/identity/deviceregistration/DeviceRegistrationIpcStrategiesProvider.kt — Remove doc comment referencing legacy strategy

Acceptance Criteria

  • LEGACY_ACCOUNT_AUTHENTICATOR_FOR_WPJ_API no longer exists in IIpcStrategy.Type
  • legacy_account_manager_status no longer exists in AttributeName.java
  • AndroidDeviceRegistrationClientController has no reference to the legacy strategy type
  • IpcStrategyWithBackupTests compiles and passes with substitute enum values
  • DeviceRegistrationIpcStrategiesProvider KDoc has no mention of legacy Account Authenticator
  • No new lint warnings introduced
  • Compile check passes: ./gradlew :common:compileDebugKotlin and ./gradlew :common4j:compileJava
  • Unit tests pass: ./gradlew :common:testDebugUnitTest

Follow .github/copilot-instructions.md strictly.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 8, 2026

✅ Work item link check complete. Description contains link AB#3571860 to an Azure Boards work item.

@github-actions github-actions Bot changed the title [WIP] Remove references to legacy WPJ Account Authenticator IPC strategy [WIP] Remove references to legacy WPJ Account Authenticator IPC strategy, Fixes AB#3571860 Apr 8, 2026
Copilot AI changed the title [WIP] Remove references to legacy WPJ Account Authenticator IPC strategy, Fixes AB#3571860 Remove legacy WPJ Account Authenticator IPC strategy from Common Apr 8, 2026
Copilot AI requested a review from p3dr0rv April 8, 2026 20:34
@github-actions github-actions Bot changed the title Remove legacy WPJ Account Authenticator IPC strategy from Common Remove legacy WPJ Account Authenticator IPC strategy from Common, Fixes AB#3571860 Apr 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants