在组合服务中管理多个订阅密钥 [英] Managing Multiple Subscription Keys Inside a Composition Service

查看:20
本文介绍了在组合服务中管理多个订阅密钥的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个在 Azure API 管理中注册的组合 API,由外部客户端调用,此组合服务将调用也在 API 管理中注册的其他 API,也需要订阅密钥

I have a composition API that is registered inside Azure API Management that is called by external clients, this composition service will call other APIs which are also registered inside API Management and also need a subscription key

问题是否有使用 Azure API 管理在我的组合方案类型中管理订阅密钥的指南或最佳做法

Question Is there guidance or best practises for managing subscription keys in my type of composition scenario using Azure API Management

推荐答案

不确定您所说的指导是什么意思.需要注意以下几点:

Not sure what you mean by guidance. There are a few things to keep in mind:

  • 确保您的订阅密钥不会发生冲突.IE.如果 Composition APIM 将用于调用它的订阅密钥传递给后端 APIM,您可能会得到 401.因此,您需要确保在处理时间期间在组合 APIM 中删除密钥,或者用另一个旨在后端 APIM 的密钥覆盖它.
  • 您可以通过在组合和后端 APIM 中为订阅密钥使用不同的标头/查询参数名称来防止它.请参阅此处的 subscriptionKeyParameterNames:https://docs.microsoft.com/en-us/rest/api/apimanagement/api/createorupdate
  • 使用命名值来管理机密.您可以创建一个命名值,将其标记为机密并在策略中使用它,而无需透露其值.

这篇关于在组合服务中管理多个订阅密钥的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆