Skip to content

Commit 80bc134

Browse files
committed
DAC-passwordless
1 parent 0e46a1e commit 80bc134

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

articles/key-vault/certificates/quick-create-node.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ This quickstart assumes you're running [Azure CLI](/cli/azure/install-azure-cli)
3939

4040
1. Run the `login` command.
4141

42-
```azurecli-interactive
42+
```azurecli
4343
az login
4444
```
4545
@@ -76,7 +76,7 @@ Create a Node.js application that uses your key vault.
7676
npm install @azure/keyvault-certificates
7777
```
7878
79-
1. Install the Azure Identity library, [@azure/identity](https://www.npmjs.com/package/@azure/identity) package to authenticate to a Key Vault.
79+
1. Install the Azure Identity client library, [@azure/identity](https://www.npmjs.com/package/@azure/identity), to authenticate to a Key Vault.
8080
8181
```terminal
8282
npm install @azure/identity
@@ -114,10 +114,19 @@ export KEY_VAULT_NAME=<your-key-vault-name>
114114
```
115115
---
116116

117+
### Authenticate and create a client
118+
119+
Application requests to most Azure services must be authorized. Using the [DefaultAzureCredential](/javascript/api/@azure/identity/#@azure-identity-getdefaultazurecredential) method provided by the [Azure Identity client library](/javascript/api/@azure/identity) is the recommended approach for implementing passwordless connections to Azure services in your code. `DefaultAzureCredential` supports multiple authentication methods and determines which method should be used at runtime. This approach enables your app to use different authentication methods in different environments (local vs. production) without implementing environment-specific code.
120+
121+
In this quickstart, `DefaultAzureCredential` authenticates to key vault using the credentials of the local development user logged into the Azure CLI. When the application is deployed to Azure, the same `DefaultAzureCredential` code can automatically discover and use a managed identity that is assigned to an App Service, Virtual Machine, or other services. For more information, see [Managed Identity Overview](/azure/active-directory/managed-identities-azure-resources/overview).
122+
123+
In this code, the name of your key vault is used to create the key vault URI, in the format `https://<your-key-vault-name>.vault.azure.net`. For more information about authenticating to key vault, see [Developer's Guide](/azure/key-vault/general/developers-guide#authenticate-to-key-vault-in-code).
124+
117125
## Code example
118126

119127
These code samples demonstrate how to create a client, set a certificate, retrieve a certificate, and delete a certificate.
120128

129+
121130
### Set up the app framework
122131

123132
1. Create new text file and paste the following code into the **index.js** file.

0 commit comments

Comments
 (0)