简体   繁体   English

仅通过受信任的 Android、iOS 和 Web 应用程序访问 Azure APIM

[英]Access Azure APIM only via Trusted Android, iOS & Web Apps

We have Android, iOS and Azure Web app for our system which will be calling Azure APIM which is created for Azure API APP.我们的系统有 Android、iOS 和 Azure Web 应用程序,它们将调用为 Azure API APP 创建的 Azure APIM。

Problem statement is : APIM should only be accessible via Android, iOS and Azure Web app, for other clients like postman or any different mobile app or web app, APIM should give access denied error.问题陈述是: APIM 应该只能通过 Android、iOS 和 Azure Web 应用程序访问,对于邮递员或任何不同的移动应用程序或 Web 应用程序等其他客户端,APIM 应该给出access denied错误。 We need a solution where header should not be passed from any of our trusted clients as this can be exploited and APIs can be called via third party clients like postman etc.我们需要一个解决方案,其中不应从任何受信任的客户端传递标头,因为这可以被利用,并且可以通过邮递员等第三方客户端调用 API。

There is not much you can do from web and end user devices.您可以通过 Web 和最终用户设备做很多事情。 In web apps you can't safely authenticate client app, since traffic and all secrets you may want to use are visible to a user.在 Web 应用程序中,您无法安全地对客户端应用程序进行身份验证,因为用户可以看到您可能想要使用的流量和所有机密。 It's a bit more safe in Android and iOS, but event there phone may be rooted or jailbroken.它在 Android 和 iOS 中更安全一些,但在那里手机可能已植根或越狱。

So I'd advise against relying on app secret, rather think about authentication user itself.因此,我建议不要依赖应用程序机密,而应考虑身份验证用户本身。 Much like any other web app works where user obtains a token and uses that token to access API.就像任何其他网络应用程序一样,用户获取令牌并使用该令牌访问 API。 Since it's a user level token it's safe to expose it to a user.由于它是用户级别的令牌,因此将其公开给用户是安全的。 Look into OAuth.查看 OAuth。 If you want to use JWT tokens APIM has validate-jwt policy to check them.如果你想使用 JWT 令牌 APIM 有 validate-jwt 策略来检查它们。

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

相关问题 只允许通过本机iOS和Android应用访问Weblink - Allow access to weblink only via native iOS and Android apps IOS和Android应用程序是否只考虑Webview混合或Web应用程序? - Are IOS & Android Apps with Webview Only Considered Hybrid, or Web Apps? 保护适用于Android和iOS应用程序的Azure .asmx Web服务 - Securing an Azure .asmx web service for Android and iOS apps 如何在 Android 应用程序中检测受信任的 Web 活动 (TWA) - How to detect a Trusted Web Activity (TWA) in Android Apps 受信任 web 应用程序中本机 android 和渐进式 web 应用程序之间的双向桥接 - Two way bridge between native android and progressive web apps in trusted web application 通过 iOS 或 Android 上的“添加到主屏幕”添加的 Web 应用程序的命名约定? - Naming convention for Web Apps added via the Add to Home Screen on iOS or Android? 有没有办法在iOS / Android上访问其他应用程序数据 - Is there a way to access other apps data on iOS/Android 如何找到适用于Android和iOS的受信任证书? - How to find trusted certificate for both Android and iOS? iOS 和 Android 上的可信执行环境 (TEE) - Trusted Execution Environment (TEE) on iOS and Android Android上的可信Web活动不会隐藏URL栏 - Trusted Web Activity on Android not hiding URL bar
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM