Skip to content

Commit cb45218

Browse files
authored
Merge pull request #94364 from ChrisLound/chris_lound_adf_keyvaultsecrets
New ADF Article
2 parents b626549 + 5bf57fe commit cb45218

File tree

8 files changed

+72
-0
lines changed

8 files changed

+72
-0
lines changed

articles/data-factory/TOC.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -518,6 +518,8 @@
518518
href: data-movement-security-considerations.md
519519
- name: Store credentials in Azure Key Vault
520520
href: store-credentials-in-key-vault.md
521+
- name: Use Azure Key Vault secrets in pipeline activities
522+
href: how-to-use-azure-key-vault-secrets-pipeline-activities.md
521523
- name: Encrypt credentials for self-hosted integration runtime
522524
href: encrypt-credentials-self-hosted-integration-runtime.md
523525
- name: Managed identity for Data Factory
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
---
2+
title: Use Azure Key Vault secrets in pipeline activities | Microsoft Docs
3+
description: Learn how to fetch stored credentials from Azure key vault and use them during data factory pipeline runs.
4+
services: data-factory
5+
author: ChrisLound
6+
manager: craigg
7+
editor: ''
8+
9+
ms.service: data-factory
10+
ms.workload: data-services
11+
ms.tgt_pltfrm: na
12+
13+
ms.topic: conceptual
14+
ms.date: 10/31/2019
15+
ms.author: chlound
16+
---
17+
18+
# Use Azure Key Vault secrets in pipeline activities
19+
20+
You can store credentials or secret values in an Azure Key Vault and use them during pipeline execution to pass to your activities.
21+
22+
## Prerequisites
23+
24+
This feature relies on the data factory managed identity. Learn how it works from [Managed identity for Data Factory](https://docs.microsoft.com/azure/data-factory/data-factory-service-identity) and make sure your data factory has one associated.
25+
26+
## Steps
27+
28+
1. Open the properties of your data factory and copy the Managed Identity Application ID value.
29+
30+
![Managed Identity Value](media/how-to-use-azure-key-vault-secrets-pipeline-activities/managedidentity.png)
31+
32+
2. Open the key vault access policies and add the managed identity permissions to Get and List secrets.
33+
34+
![Key Vault access policies](media/how-to-use-azure-key-vault-secrets-pipeline-activities/akvaccesspolicies.png)
35+
36+
![Key Vault access policies](media/how-to-use-azure-key-vault-secrets-pipeline-activities/akvaccesspolicies-2.png)
37+
38+
Click **Add**, then click **Save**.
39+
40+
3. Navigate to your Key Vault secret and copy the Secret Identifier.
41+
42+
![Secret Identifier](media/how-to-use-azure-key-vault-secrets-pipeline-activities/secretidentifier.png)
43+
44+
Make a note of your secret URI that you want to get during your data factory pipeline run.
45+
46+
4. In your Data Factory pipeline, add a new Web activity and configure it as follows.
47+
48+
|Property |Value |
49+
|---------|---------|
50+
|Secure Output |True |
51+
|URL |[Your secret URI value]?api-version=7.0 |
52+
|Method |GET |
53+
|Authentication |MSI |
54+
|Resource |https://vault.azure.net |
55+
56+
![Web activity](media/how-to-use-azure-key-vault-secrets-pipeline-activities/webactivity.png)
57+
58+
> [!IMPORTANT]
59+
> You must add **?api-version=7.0** to the end of your secret URI.
60+
61+
> [!CAUTION]
62+
> Set the Secure Output option to true to prevent the secret value from being logged in plain text. Any further activities that consume this value should have their Secure Input option set to true.
63+
64+
5. To use the value in another activity, use the following code expression **@activity("web").output.value)**.
65+
66+
![Code expression](media/how-to-use-azure-key-vault-secrets-pipeline-activities/usewebactivity.png)
67+
68+
## Next steps
69+
70+
To learn how to use Azure Key Vault to store credentials for data stores and computes, see [Store credentials in Azure Key Vault](https://docs.microsoft.com/azure/data-factory/store-credentials-in-key-vault)
31.9 KB
Loading
44.9 KB
Loading
65.4 KB
Loading
55.5 KB
Loading
23.9 KB
Loading
45.4 KB
Loading

0 commit comments

Comments
 (0)