【Azure API 管理】APIM关闭开发者门户的办法

本文涉及的产品
.cn 域名,1个 12个月
简介: 【Azure API 管理】APIM关闭开发者门户的办法

问题描述

APIM默认提供了开发者门户,可以让用户体验如何来调用接口。但如果不想开发这个功能的情况下,是否有办法关闭呢?

 

问题解答

答案是:开发人员门户是没有办法关闭的。但是作为另一种的代替方案,如自定义域名时,不为开发者门户配置DNS,删除开发者门户的登录权限(Identities)。从而实现让用户访问开发者门户,但是无法登录的效果。

解决方法

第一种:对于新创建的 APIM服务,默认情况下是不会不发布开发人员门户的。如果不主动发布它,则实际上等于禁用。但是,如果有意或无意,发布了它,则没有支持取消发布它的方法,就可以参考下面第二种,第三种方式。

第二种:当要自定义APIM的访问域名时,不配置 APIM开发门户的DNS 映射。虽然还是可以通过默认的域名进行访问,但是一般人很难弄清楚默认名称和默认域名,可以实现阻止绝大多数人的访问。

第三种:可以使用以下两个配置,使得开发门户达到不可使用的效果:

  • 通过删除所有标识类型来禁用注册(这可以在 Azure 门户中完成 - 选择 API 管理实例,然后单击"标识"并删除每个标识类型)。
  • 强制将匿名用户定向到注册页(这是在 Azure 门户的同一部分中完成的)。

 

方案参考

Support disabling developer portal :https://github.com/Azure/api-management-developer-portal/issues/833

Please consider adding an option to completely disable the developer portal. For example, customers who have their own custom portal will not want to have a platform-provided portal accessible.

Currently there are some workarounds (see below), but it would be even better to have the option to not have the developer portal made available by the platform.

Workarounds

  1. For new API Management instances, the developer portal is not published by default. If a customer does not publish it themselves then it is effectively disabled. However, if a customer publishes it (intentionally or accidentally) there is no supported way to unpublish it.
  2. Customers can avoid mapping a DNS name to the developer portal hostname provided by the platform. This does not prevent someone from figuring it out, but it makes it much less likely they will do so.
  3. Customers can configure the developer portal with the following two settings, which together have the effect of making the developer portal unusable:
  • Disable sign-up by removing all identity types (this can be done in the Azure portal - choose the API Management instance, then click Identities and remove each identity type).
  • Force anonymous users to be directed to the sign-up page (this is done in the same part of the Azure portal).

 

相关文章
|
18天前
|
安全 Java API
告别繁琐编码,拥抱Java 8新特性:Stream API与Optional类助你高效编程,成就卓越开发者!
【8月更文挑战第29天】Java 8为开发者引入了多项新特性,其中Stream API和Optional类尤其值得关注。Stream API对集合操作进行了高级抽象,支持声明式的数据处理,避免了显式循环代码的编写;而Optional类则作为非空值的容器,有效减少了空指针异常的风险。通过几个实战示例,我们展示了如何利用Stream API进行过滤与转换操作,以及如何借助Optional类安全地处理可能为null的数据,从而使代码更加简洁和健壮。
51 0
|
17天前
|
存储 JSON API
淘系API接口(解析返回的json数据)商品详情数据解析助力开发者
——在成长的路上,我们都是同行者。这篇关于商品详情API接口的文章,希望能帮助到您。期待与您继续分享更多API接口的知识,请记得关注Anzexi58哦! 淘宝API接口(如淘宝开放平台提供的API)允许开发者获取淘宝商品的各种信息,包括商品详情。然而,需要注意的是,直接访问淘宝的商品数据API通常需要商家身份或开发者权限,并且需要遵循淘宝的API使用协议。
淘系API接口(解析返回的json数据)商品详情数据解析助力开发者
|
8天前
|
Java API 开发者
【Java字节码的掌控者】JDK 22类文件API:解锁Java深层次的奥秘,赋能开发者无限可能!
【9月更文挑战第8天】JDK 22类文件API的引入,为Java开发者们打开了一扇通往Java字节码操控新世界的大门。通过这个API,我们可以更加深入地理解Java程序的底层行为,实现更加高效、可靠和创新的Java应用。虽然目前它还处于预览版阶段,但我们已经可以预见其在未来Java开发中的重要地位。让我们共同期待Java字节码操控新篇章的到来,并积极探索类文件API带来的无限可能!
|
22天前
|
安全 API 网络安全
【Azure API 管理】APIM不能连接到 App Service (APIM cannot connect to APP service)
【Azure API 管理】APIM不能连接到 App Service (APIM cannot connect to APP service)
|
22天前
|
API 开发工具 网络架构
【Azure Developer】如何通过Azure Portal快速获取到对应操作的API并转换为Python代码
【Azure Developer】如何通过Azure Portal快速获取到对应操作的API并转换为Python代码
|
22天前
|
存储 机器学习/深度学习 API
【Azure 存储服务】记一次调用Storage Blob API使用 SharedKey Authorization出现的403错误
【Azure 存储服务】记一次调用Storage Blob API使用 SharedKey Authorization出现的403错误
|
22天前
|
API
【API Management】使用 APIM Inbound Policy 来修改Content‐Type Header的值
【API Management】使用 APIM Inbound Policy 来修改Content‐Type Header的值
【API Management】使用 APIM Inbound Policy 来修改Content‐Type Header的值
|
22天前
|
存储 Kubernetes API
【APIM】Azure API Management Self-Host Gateway是否可以把请求的日志发送到Application Insights呢?让它和使用Azure上托管的 Gateway一样呢?
【APIM】Azure API Management Self-Host Gateway是否可以把请求的日志发送到Application Insights呢?让它和使用Azure上托管的 Gateway一样呢?
|
22天前
|
API 网络架构 C++
【Azure Key Vault】使用REST API调用Azure Key Vault Secret的示例步骤
【Azure Key Vault】使用REST API调用Azure Key Vault Secret的示例步骤
|
22天前
|
API 网络架构
【Azure Developer】使用 Microsoft Graph API查看用户状态和登录记录
【Azure Developer】使用 Microsoft Graph API查看用户状态和登录记录