Azure 逻辑应用程序 - 调用安全端点 (TLS)
Azure Logic Apps - Calling a secured end point (TLS)
我有一个调用安全端点 (TLS 1.2) 的 C# 组件。当我探索将此组件移动到 Azure(逻辑应用程序)的选项时,我如何将安全协议 header 信息添加到 HTTP 请求。我可以添加 header 信息,如 'Content_Type' 等,但不确定是否要将安全协议信息添加到 header,并且找不到太多有用的文章。预先感谢有用的提示。
我的传出 HTTP 请求:
{
"uri": "https://xxxx/v3/oauth2/token",
"method": "POST",
"headers": {
"Content_Type": "application/x-www-form-urlencoded",
"client_id": "xxxxxxxxxxx",
"client_secret": "5xxxxxxxxxx9",
"grant_type": "password",
"password": "MyPassword2018",
"username": "email@company.com"
}
}
C#代码:
ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 |
SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 |
SecurityProtocolType.Tls;
对于需要与受 oauth 保护的端点通信的逻辑应用程序,我们通常调用 Azure 函数。除了拥有可让您利用工作代码的 C# 解决方案之外,您还可以在 Key Vault 中保护您的凭据,而不是在您的逻辑应用程序操作中以纯文本形式保存它们。
我有一个调用安全端点 (TLS 1.2) 的 C# 组件。当我探索将此组件移动到 Azure(逻辑应用程序)的选项时,我如何将安全协议 header 信息添加到 HTTP 请求。我可以添加 header 信息,如 'Content_Type' 等,但不确定是否要将安全协议信息添加到 header,并且找不到太多有用的文章。预先感谢有用的提示。
我的传出 HTTP 请求:
{
"uri": "https://xxxx/v3/oauth2/token",
"method": "POST",
"headers": {
"Content_Type": "application/x-www-form-urlencoded",
"client_id": "xxxxxxxxxxx",
"client_secret": "5xxxxxxxxxx9",
"grant_type": "password",
"password": "MyPassword2018",
"username": "email@company.com"
}
}
C#代码:
ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 |
SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 |
SecurityProtocolType.Tls;
对于需要与受 oauth 保护的端点通信的逻辑应用程序,我们通常调用 Azure 函数。除了拥有可让您利用工作代码的 C# 解决方案之外,您还可以在 Key Vault 中保护您的凭据,而不是在您的逻辑应用程序操作中以纯文本形式保存它们。