Bug 46399 - HttpClient on Android is not compatible with MobileIron
Summary: HttpClient on Android is not compatible with MobileIron
Status: RESOLVED NORESPONSE
Alias: None
Product: Android
Classification: Xamarin
Component: BCL Class Libraries ()
Version: unspecified
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: Marek Habersack
URL:
Depends on:
Blocks:
 
Reported: 2016-11-03 17:51 UTC by Dan Waters
Modified: 2017-10-13 18:33 UTC (History)
4 users (show)

Tags: xamextfollowed
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED NORESPONSE

Description Dan Waters 2016-11-03 17:51:15 UTC
Customer reported:

“We are using ModernHttpClient instead on Xamarin HttpClient stack just for one reason:
- OkHttp is supported by MobileIron tunneling but AndroidClientHandler is not.

Modernhttpclient/OkHttp is giving us lot of headaches in Android.

This is what MobileIron supports:

HTTP Tunneling support of Java HTTP Networking APIs is only supported when using the following Vanilla Android libraries:
java.net.HttpURLConnection 
java.net.ssl.HttpsURLConnection 
AndroidHttpClient 
DefaultHttpClient 
The standard Apache HttpClient library with the org.apache.http package name
Comment 1 Jonathan Pryor 2016-11-09 20:40:50 UTC
What is "MobileIron tunneling"? Why isn't Xamarin.Android.net.AndroidClientHandler?

I don't understand what's being asked for here.

> This is what MobileIron supports:
> java.net.HttpURLConnection
> java.net.ssl.HttpsURLConnection 

AndroidClientHandler uses both of the above:

https://github.com/xamarin/xamarin-android/blob/d198cfd/src/Mono.Android/Xamarin.Android.Net/AndroidClientHandler.cs#L212
https://github.com/xamarin/xamarin-android/blob/d198cfd/src/Mono.Android/Xamarin.Android.Net/AndroidClientHandler.cs#L608

What would be useful is some methods that illustrate what they're trying to do, or a description of how/why AndroidClientHandler can't be supported.
Comment 2 Steve Hall 2016-11-10 17:43:16 UTC
MobileIron's tunneling is an encrypted network tunnel to the on-premise gateway (think VPN). MobileIron's wrapping process (I'm assuming wrapping here) will intercept only OkHttp classes and hook in their tunneling logic. 

Using ModernHttpClient has appeared to work in most cases. This is the first time I've heard of issues. Not sure if that means MI product has changed, Xamarin product has changed, Android classes have changed, or no one has truly gotten this far previously.

They could use platform-specific networking, or possibly modify ModernHttpClient to their needs?? I don't see this as a platform bug, it's interoperability between 3rd party software.
Comment 4 Marek Habersack 2016-11-14 10:21:14 UTC
@Dan, as Jon mentioned in comment 1, AndroidHttpClientHandler is just a wrapper around the Java APIs that MobileIron reportedly already supports. We offload all the networking work to those APIs in our handler. How does MobileIron work? Do they provide code that wraps the APIs they support and which the client code is supposed to use instead of the "real" APIs?
Comment 5 Jon Douglas [MSFT] 2017-10-13 18:33:59 UTC
Because we have not received a reply to our request for more information we are closing this issue. If you are still encountering this issue, please reopen the ticket with the requested information. Thanks!