Microsoft-authentication-library-for-dotnet: [Feature Request] [L] Implement content provider for communication with the Android broker.

Created on 29 Oct 2020  路  4Comments  路  Source: AzureAD/microsoft-authentication-library-for-dotnet

Is your feature request related to a problem? Please describe.
The current communication method that MSAL uses (Account Manager) with the broker is one of the broker's fallback mechanisms that uses IBinder for IPC communication. One limitation here is that the Android OS allocates a maximum of 1MB buffer on RAM per process for IBinder transactions. This buffer size includes all the transactions within the app process like intents between activities, fragments and broadcast receivers etc. Given this, Android recommends to limit the transaction size to absolute minimum while using bound service. If the buffer size goes beyond 1MB either on the app process or on the Broker's background process, the OS throws a TransactionTooLargeException or a DeadObjectException by killing the remote process (broker's :auth process).

The content provider implementation is a very recent update in broker applications so MSAL will need a way to fall back to the old implementation incase the user is on an older version of the broker.

Describe the solution you'd like
Implement the content provider in MSAL.NET so that MSAL can communicate with the broker without running into IBinder errors.

Deliverables:

  • Implement Content provider in MSAL for broker communication.

  • Enable MSAL to fallback on the account manager communication strategy if the content provider fails.

Additional context
Xamarin Content Provider Documentation
Broker Content Provider Spec

Feature Request P1 android-broker enhancement Mobile-Android

Most helpful comment

All 4 comments

Another support incident related to AddAccount API being banned in enterprises via Android 4 Work.

@trwalke - are we implementing this ? Should we schedule it for 4.26?

Outstanding work:

  • [ ] address PR review
  • [ ] re-test in the test app
  • [ ] update the manual test
  • [ ] test with the Xamarin sample (with and without broker)
Was this page helpful?
0 / 5 - 0 ratings