Skip to content

Commit 52f440f

Browse files
Merge pull request #245 from Blackmist/297846-fresh
freshness updates
2 parents 3107ae2 + 2b23cce commit 52f440f

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

articles/machine-learning/v1/how-to-use-secrets-in-runs.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ description: Learn how to pass secrets to training jobs in secure fashion using
55
services: machine-learning
66
author: Blackmist
77
ms.author: larryfr
8-
ms.reviewer: roastala
98
ms.service: azure-machine-learning
109
ms.subservice: enterprise-readiness
11-
ms.date: 11/16/2022
10+
ms.date: 09/12/2024
1211
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.
1414
---
1515

1616
# 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
2222
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.
2323

2424
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.
2626
2. On local computer, set a secret in Workspace Key Vault.
2727
3. Submit a remote job.
2828
4. Within the remote job, get the secret from Key Vault and use it.
@@ -43,9 +43,9 @@ keyvault = ws.get_default_keyvault()
4343
keyvault.set_secret(name="mysecret", value = my_secret)
4444
```
4545

46-
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.
4747

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.
4949

5050
> [!IMPORTANT]
5151
> 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.
@@ -68,9 +68,9 @@ secret_value = run.get_secret(name="mysecret")
6868

6969
Be careful not to expose the secret value by writing or printing it out.
7070

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.
7272

73-
## Next steps
73+
## Related content
7474

7575
* [View example notebook](https://github.com/Azure/MachineLearningNotebooks/blob/master/how-to-use-azureml/manage-azureml-service/authentication-in-azureml/authentication-in-azureml.ipynb)
7676
* [Learn about enterprise security with Azure Machine Learning](../concept-enterprise-security.md)

0 commit comments

Comments
 (0)