You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/machine-learning/v1/how-to-use-secrets-in-runs.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,12 +5,12 @@ description: Learn how to pass secrets to training jobs in secure fashion using
5
5
services: machine-learning
6
6
author: Blackmist
7
7
ms.author: larryfr
8
-
ms.reviewer: roastala
9
8
ms.service: azure-machine-learning
10
9
ms.subservice: enterprise-readiness
11
-
ms.date: 11/16/2022
10
+
ms.date: 09/12/2024
12
11
ms.topic: how-to
13
-
ms.custom: UpdateFrequency5, sdkv1
12
+
ms.custom: UpdateFrequency5, sdkv1, FY25Q1-Linter
13
+
# Customer Intent: As a data scientist, I want to use secrets in my training jobs so that I can securely pass authentication information to my training scripts.
14
14
---
15
15
16
16
# Use authentication credential secrets in Azure Machine Learning training jobs
@@ -22,7 +22,7 @@ In this article, you learn how to use secrets in training jobs securely. Authent
22
22
Instead, your Azure Machine Learning workspace has an associated resource called a [Azure Key Vault](/azure/key-vault/general/overview). Use this Key Vault to pass secrets to remote jobs securely through a set of APIs in the Azure Machine Learning Python SDK.
23
23
24
24
The standard flow for using secrets is:
25
-
1. On local computer, log in to Azure and connect to your workspace.
25
+
1. On local computer, sign in to Azure and connect to your workspace.
26
26
2. On local computer, set a secret in Workspace Key Vault.
27
27
3. Submit a remote job.
28
28
4. Within the remote job, get the secret from Key Vault and use it.
Do not put the secret value in your Python code as it is insecure to store it in file as cleartext. Instead, obtain the secret value from an environment variable, for example Azure DevOps build secret, or from interactive user input.
46
+
Don't put the secret value in your Python code as it is insecure to store it in file as cleartext. Instead, obtain the secret value from an environment variable, for example Azure DevOps build secret, or from interactive user input.
47
47
48
-
You can list secret names using the [`list_secrets()`](/python/api/azureml-core/azureml.core.keyvault.keyvault#list-secrets--) method and there is also a batch version,[set_secrets()](/python/api/azureml-core/azureml.core.keyvault.keyvault#set-secrets-secrets-batch-) that allows you to set multiple secrets at a time.
48
+
You can list secret names using the [`list_secrets()`](/python/api/azureml-core/azureml.core.keyvault.keyvault#list-secrets--) method and there's also a batch version,[set_secrets()](/python/api/azureml-core/azureml.core.keyvault.keyvault#set-secrets-secrets-batch-) that allows you to set multiple secrets at a time.
49
49
50
50
> [!IMPORTANT]
51
51
> Using `list_secrets()` will only list secrets created through `set_secret()` or `set_secrets()` using the Azure Machine Learning SDK. It will not list secrets created by something other than the SDK. For example, a secret created using the Azure portal or Azure PowerShell will not be listed.
Be careful not to expose the secret value by writing or printing it out.
70
70
71
-
There is also a batch version, [get_secrets()](/python/api/azureml-core/azureml.core.run.run#get-secrets-secrets-) for accessing multiple secrets at once.
71
+
There's also a batch version, [get_secrets()](/python/api/azureml-core/azureml.core.run.run#get-secrets-secrets-) for accessing multiple secrets at once.
72
72
73
-
## Next steps
73
+
## Related content
74
74
75
75
*[View example notebook](https://github.com/Azure/MachineLearningNotebooks/blob/master/how-to-use-azureml/manage-azureml-service/authentication-in-azureml/authentication-in-azureml.ipynb)
76
76
*[Learn about enterprise security with Azure Machine Learning](../concept-enterprise-security.md)
0 commit comments