Azure API管理中的订阅密钥与誓言2.0之间的主要区别是什么?

发布于 2025-01-28 09:57:09 字数 89 浏览 3 评论 0原文

我正在寻找在APIM中保护我的API的A外,我真的不明白订阅密钥和OAuth 2.0使用访问令牌之间的区别。我们可以使用OAuth2.0而不是订阅密钥还是同时使用?

I'm looking for a away to protect my APIs in APIM, I really don't understand the difference between Subscription Key and OAuth 2.0 using Access Token. Can we use OAuth2.0 instead of Subscription Key or use both ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

江湖正好 2025-02-04 09:57:09

根据我的理解
简单:

订阅键是访问APIM实例中Azure API的常见方法。

如果API需要订阅密钥以由用户访问它,则我们称其为有安全的API 。否则,它是无抵押的API,主要由公众使用。

但是,对于对某些API的无抵押访问,建议对配置 安全客户端访问

确保APIM访问API的其他机制为 OAuth 2.0 客户端证书 <强>限制呼叫者IP

如deepdave所推荐的那样,所以线程指出,

不可能使用OAuth代币来识别客户端,但是您可以将其用于限制和记录(类型)。

您可以使用 subbription键轻松地识别用户及其访问级别(对多少产品/API,它们具有访问权限),因为它们在3个范围内相关个人级别。

Oauth 2.0 在身份验证和授权方面提供了额外的安全层。

要实施其他机制,例如OAuth2.0或其他机制,这些参考很有用

  • 使用oauth2.0 保护apim
  • -management-howto-protect-backend-with-aad“ rel /api-Management/api-Management-subscriptions#What-are-subscriptions“ rel =“ nofollow noreferrer”> azure中的API保护
  • 机制FastTrack-for-azure/Protecting-Apis-in-Api-api-Api-using-Oauth-2-0-Lient/ba-p/3054130“ rel =“ nofollow noreferrer”>一个在Azure API管理中保护API的解决方法使用OAuth 2.0客户端凭据流&amp;使用Postman的测试
  • 额外的安全层,以避免使用OAuth 2.0 未经授权访问API

As per my understanding,
In Simple:

Subscription keys are the common way to access the Azure APIs in APIM instance.

If the API requires subscription key to access it by the user, then we call it as secured API. Otherwise, it is unsecured API and mostly used by the public.

But for unsecured access to that certain APIs, configuring another mechanism to secure client access is recommended.

Those other mechanisms to secure access to APIs in APIM were OAuth 2.0, Client Certificates, and Restring caller IPs.

As DeepDave recommended this SO Thread states that,

It is not possible to use OAuth token to identify client, but you can use it for rate-limiting and logging (of sorts).

You can identify the users and their level of access (To how many products/APIs, they have access) easily by using subscription keys because they are associated on 3 scopes like Product level, All APIs level, or an individual level.

OAuth 2.0 provides extra layer of security both in Authentication and Authorization.

To Implement the other mechanisms like OAuth2.0 or other, these references are useful:

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文