【发布时间】:2021-02-02 07:47:12
【问题描述】:
希望我能说得够清楚。
目标:
- 客户端证书认证的 Azure 函数
场景:
-
Azure 函数 App 与:
-
HTTPS Only:设置为Yes -
Client certificate mode:设置为Require
-
-
HTTP 触发的 Azure 函数 (Python):
- 加载客户端证书from
X-ARR-ClientCertheader - 从数据库中提取预共享客户端证书并比较:
- 发行人
- 通用名
- 之前/之后无效
- 点击列出的 OCSP 端点以查看证书是否被吊销
- 加载客户端证书from
-
如果每个证书的属性匹配且证书未被撤销,则函数将为请求者生成一个 SAS 令牌并在响应中发送。
问题:
- 在这种情况下如何处理客户端证书身份验证的加密部分?
- 根据this (great) blog post,有一个
CertificateVerify步骤...
"The client is authenticated by using its private key to sign a
hash of all the messages up to this point. The recipient verifies
the signature using the public key of the signer, thus ensuring it
was signed with the client’s private key."
我看不到使用函数 (Python) 代码访问 ...all the messages up to this point. 以验证是否发生这种情况的方法。
这是 Microsoft 自动处理的事情吗(类似于他们通过 X-ARR-ClientCert 标头转发客户端证书的方式)?或者这不可能?
【问题讨论】:
标签: ssl azure-functions client-certificates azure-function-app mutual-authentication