简体   繁体   English

在 Azure 数据工厂中检索 web 活动中的密钥保管库

[英]Retrieve key vault in web activity in Azure Data Factory

I am new to Azure Data Factory and I am now stuck at last step to finish my current task.我是 Azure 数据工厂的新手,现在我被困在完成当前任务的最后一步。

There are few REST API's that I need to call from ADF using Web Activity but before I make to REST API POST call, in this POST call I need to pass user credentials to be fetched from key vault and passing into BODY section. There are few REST API's that I need to call from ADF using Web Activity but before I make to REST API POST call, in this POST call I need to pass user credentials to be fetched from key vault and passing into BODY section. Once this POST request is issued I need to get authentication token from that server, hence as it is working in hard coded fashion.发出此 POST 请求后,我需要从该服务器获取身份验证令牌,因此它以硬编码方式工作。 But now I want to fetch userId and password from Azure Key Vault and I then need to pass it to Web Activity.但现在我想从 Azure Key Vault 获取用户 ID 和密码,然后我需要将其传递给 Web 活动。

NOTE: I do not want to use MSI option.注意:我不想使用 MSI 选项。

Could you please help on retrieving userId and password from Azure Key Vault for Web Activity to pass this as part of authentication?您能否帮助从 Azure Key Vault for Web Activity 检索用户 ID 和密码,以通过此作为身份验证的一部分?

You can follow these steps to achieve what you want:您可以按照以下步骤来实现您想要的:

  1. Save the userid and password in the azure keyvault.将用户 ID 和密码保存在 azure 密钥库中。 And then give your azure datafactory authority to access the keyvault:然后授予您的 azure 数据工厂访问密钥库的权限:

I think you know how to add keyvault value, so I just show how to give the access authority.我想你知道如何添加 keyvault 值,所以我只是展示如何授予访问权限。 在此处输入图像描述

在此处输入图像描述

在此处输入图像描述

And choose 'Add'.并选择“添加”。 And dont foeget to save the edit.并且不要忘记保存编辑。

  1. The second step is about the web activity in ADF.第二步是关于 ADF 中的 web 活动。 You should create a web activity first.您应该首先创建一个 web 活动。

在此处输入图像描述

在此处输入图像描述

在此处输入图像描述

Then, you can use a Set variable activity to get the value.然后,您可以使用 Set 变量活动来获取值。

在此处输入图像描述

The value of the activity is @activity('yourwebactivityname').output.value活动的值为@activity('yourwebactivityname').output.value

This is my pipeline:这是我的管道:

在此处输入图像描述

And I can get the value:我可以得到价值:

在此处输入图像描述

For more information, please have a look of the below document:有关更多信息,请查看以下文档:

https://docs.microsoft.com/en-us/azure/data-factory/how-to-use-azure-key-vault-secrets-pipeline-activities https://docs.microsoft.com/en-us/azure/data-factory/how-to-use-azure-key-vault-secrets-pipeline-activities

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在数据工厂 web 活动 url 中传递 Azure 密钥库机密 - How can I pass Azure key vault secret in data factory web activity url Azure 数据工厂 V2 + 密钥保管库 - Azure Data Factory V2 + Key Vault 使用 Key Vault 检索令牌时,Azure 数据工厂与 Databricks 的连接不起作用 - Azure Data Factory connection to Databricks doesn't work when using Key Vault to retrieve token Azure 数据工厂 - 当 JSON 键中有空间时,无法检索 JSON 查找活动输出 - Azure Data factory - Not able to retrieve JSON lookup activity out put, when JSON key is having space in it Azure数据工厂中的Web活动问题 - Web Activity Issue In Azure Data Factory Azure 数据工厂 Web API 活动 - Azure Data Factory Web API activity 天蓝色数据工厂 Web 活动属性 - azure data factory web activity properties 在 Azure 数据工厂 Web 活动中参数化 URL - Parametrize URL in Azure Data Factory Web activity Azure 数据工厂 Web 活动保存 output - Azure Data Factory Web Activity save output Azure 数据工厂:使用 Azure 密钥库参考在链接服务中获取用户名,这可能吗? - Azure Data Factory: Get UserName in Linked Service using Azure Key Vault Reference, is it possible?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM