简体   繁体   English

连接到 WCF 服务的 Android 应用程序的身份验证(本地环境)

[英]Authentication for Android app connecting to a WCF service (on-prem environment)

I'm developing an Android app working with a WCF service (through HTTPS).我正在开发一个使用 WCF 服务的 Android 应用程序(通过 HTTPS)。 Everything is hosted locally and the app cannot be used for external network.一切都在本地托管,该应用程序不能用于外部网络。 For authentication, I implemented my own authentication system using internal username-password pairs, which is not highly secured.对于身份验证,我使用内部用户名-密码对实现了自己的身份验证系统,但安全性不高。

I'd like my WCF service to be able to authenticate Android client app using AD accounts, ideally based on token.我希望我的 WCF 服务能够使用 AD 帐户(理想情况下基于令牌)对 Android 客户端应用程序进行身份验证。 What do you recommend for WCF service and Android application?您对 WCF 服务和 Android 应用程序有什么建议? I'm not expecting a full code, but some directions for both server-side (WCF) and client-side (Android app).我不期待完整的代码,而是针对服务器端 (WCF) 和客户端(Android 应用程序)的一些说明。

Thank you in advance for your suggestions.预先感谢您的建议。

PS: Looks like the introductions "Hi, good morning..." are automatically removed... PS:看起来“嗨,早上好...”的介绍会自动删除...

I recomend you to use "Client Certificate" to authenticate.我建议您使用“客户端证书”进行身份验证。

Basically your android app need to have "Client Certificate" generated by Certificate Authority - should be in your company if you have AD.基本上,您的 android 应用程序需要具有由证书颁发机构生成的“客户端证书”-如果您有 AD,则应该在您的公司中。

You may like this solution because you can use IIS Client Certificate Mapping - it's map your Client Certificate to your AD Account.您可能喜欢这个解决方案,因为您可以使用 IIS 客户端证书映射 - 它将您的客户端证书映射到您的 AD 帐户。

Disadvantages?缺点? You need to provide to your phone "client certificate".您需要向您的手机提供“客户端证书”。

This can be achieved:这可以实现:

  • by the devices management system - eq "Android for Work"通过设备管理系统 - eq“Android for Work”
  • by mail :)通过邮寄 :)

It's not easy - but certainly more safe than custom user/pass.这并不容易 - 但肯定比自定义用户/通行证更安全。

Android and Client Certificates https://blogs.msdn.microsoft.com/asiatech/2016/08/22/how-to-create-an-iis-website-that-requires-client-certificate-using-self-signed-certificates/ Android 和客户端证书https://blogs.msdn.microsoft.com/asiatech/2016/08/22/how-to-create-an-iis-website-that-requires-client-certificate-using-self-signed-证书/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM