问题描述
我想只允许对包含知名客户端证书的 HTTP 触发的 Azure 函数的请求。
我不希望将未“批准”的请求转发到 Azure Function。
Azure 中的 Trust Store 在哪里可以存储这些众所周知的客户端公共证书?
- 如何让 AppService 查看此 Trust Store?
解决方法
在 APIM 后面托管您的 azure 函数,然后您可以使用 APIM 来管理您的客户端证书。然后,您可以使用 azure 门户中的“客户端证书”页面将您的客户端证书上传到 APIM 资源,并将 APIM 策略配置为仅允许受信任的客户端。
要在 azure 函数上设置 APIM,请参阅:https://docs.microsoft.com/en-us/learn/modules/build-serverless-api-with-functions-api-management/
使用客户端证书来保护对 API 的访问:https://docs.microsoft.com/en-us/learn/modules/control-authentication-with-apim/4-secure-access-client-certs