Skip to content

Commit 1bc4c90

Browse files
authored
Merge pull request #46443 from prashanthyv/master
Updated Tutorial and Node Reference Links
2 parents d0e7191 + 9054c15 commit 1bc4c90

File tree

3 files changed

+29
-34
lines changed

3 files changed

+29
-34
lines changed

articles/key-vault/TOC.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@
4444
## [.NET](https://docs.microsoft.com/en-us/dotnet/api/overview/azure/keyvault/client?view=azure-dotnet)
4545
## [Java](/java/api/overview/azure/keyvault?view=azure-java-stable)
4646
## Node.js
47-
### [Vault management](https://docs.microsoft.com/en-us/javascript/api/overview/azure/keyvault/client?view=azure-node-latest)
48-
### [Vault contents management](https://docs.microsoft.com/en-us/javascript/api/azure-arm-keyvault/index?view=azure-node-latest)
47+
### [Vault management](https://docs.microsoft.com/javascript/api/azure-keyvault/index?view=azure-node-latest)
48+
### [Vault contents management](https://docs.microsoft.com/javascript/api/azure-arm-keyvault/index?view=azure-node-latest)
4949
## [REST](/rest/api/keyvault)
5050
## Develop
5151
### [Developer quick start video](http://channel9.msdn.com/Blogs/Windows-Azure/Azure-Key-Vault-Developer-Quick-Start)

articles/key-vault/key-vault-whatis.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@ ms.author: barclayn
1818

1919
---
2020
# What is Azure Key Vault?
21-
Azure Key Vault is available in most regions. For more information, see the [Key Vault pricing page](https://azure.microsoft.com/pricing/details/key-vault/).
22-
23-
## Introduction
2421
Azure Key Vault helps safeguard cryptographic keys and secrets used by cloud applications and services. By using Key Vault, you can encrypt keys and secrets (such as authentication keys, storage account keys, data encryption keys, .PFX files, and passwords) using keys protected by hardware security modules (HSMs). For added assurance, you can import or generate keys in HSMs. If you choose to do this, Microsoft processes your keys in FIPS 140-2 Level 2 validated HSMs (hardware and firmware).
2522

2623
Key Vault streamlines the key management process and enables you to maintain control of keys that access and encrypt your data. Developers can create keys for development and testing in minutes, and then seamlessly migrate them to production keys. Security administrators can grant (and revoke) permission to keys, as needed.
@@ -56,3 +53,4 @@ For more information about using keys and secrets with Azure Key Vault, see [Abo
5653

5754
<!--Image references-->
5855
[1]: ./media/key-vault-whatis/AzureKeyVault_overview.png
56+
Azure Key Vault is available in most regions. For more information, see the [Key Vault pricing page](https://azure.microsoft.com/pricing/details/key-vault/).

articles/key-vault/tutorial-web-application-keyvault.md

Lines changed: 26 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,8 @@ There are two NuGet packages that your web application needs to have installed.
124124
3. Select the check box next to the search box. **Include prerelease**
125125
4. Search for the two NuGet packages listed below and accept for them to be added to your solution:
126126

127-
* [Microsoft.Azure.Services.AppAuthentication (preview)](https://www.nuget.org/packages/Microsoft.Azure.Services.AppAuthentication) - makes it easy to fetch access tokens for Service-to-Azure-Service authentication scenarios.
128-
* [Microsoft.Azure.KeyVault](https://www.nuget.org/packages/Microsoft.Azure.KeyVault/2.4.0-preview) - contains methods for interacting with Key Vault.
127+
* [Microsoft.Azure.Services.AppAuthentication](https://www.nuget.org/packages/Microsoft.Azure.Services.AppAuthentication) - makes it easy to fetch access tokens for Service-to-Azure-Service authentication scenarios.
128+
* [Microsoft.Azure.KeyVault](https://www.nuget.org/packages/Microsoft.Azure.KeyVault) - contains methods for interacting with Key Vault.
129129

130130
5. Use the Solution Explorer to open `Program.cs` and replace the contents of the Program.cs file with the following code. Substitute ```<YourKeyVaultName>``` with the name of your key vault:
131131

@@ -138,37 +138,33 @@ There are two NuGet packages that your web application needs to have installed.
138138
using Microsoft.Extensions.Configuration;
139139
using Microsoft.Extensions.Configuration.AzureKeyVault;
140140

141-
namespace WebKeyVault
142-
{
143-
public class Program
144-
{
141+
namespace WebKeyVault
142+
{
145143
public static void Main(string[] args)
146144
{
147-
BuildWebHost(args).Run();
145+
BuildWebHost(args).Run();
148146
}
149-
150-
public static IWebHost BuildWebHost(string[] args) =>
151-
WebHost.CreateDefaultBuilder(args)
152-
.ConfigureAppConfiguration((ctx, builder) =>
147+
148+
public static IWebHost BuildWebHost(string[] args) =>
149+
WebHost.CreateDefaultBuilder(args)
150+
.ConfigureAppConfiguration((ctx, builder) =>
151+
{
152+
var keyVaultEndpoint = GetKeyVaultEndpoint();
153+
if (!string.IsNullOrEmpty(keyVaultEndpoint))
153154
{
154-
var keyVaultEndpoint = GetKeyVaultEndpoint();
155-
if (!string.IsNullOrEmpty(keyVaultEndpoint))
156-
{
157-
var azureServiceTokenProvider = new AzureServiceTokenProvider();
158-
var keyVaultClient = new KeyVaultClient(
159-
new KeyVaultClient.AuthenticationCallback(
160-
azureServiceTokenProvider.KeyVaultTokenCallback));
161-
builder.AddAzureKeyVault(
162-
keyVaultEndpoint, keyVaultClient, new DefaultKeyVaultSecretManager());
163-
}
155+
var azureServiceTokenProvider = new AzureServiceTokenProvider();
156+
var keyVaultClient = new KeyVaultClient(
157+
new KeyVaultClient.AuthenticationCallback(
158+
azureServiceTokenProvider.KeyVaultTokenCallback));
159+
builder.AddAzureKeyVault(
160+
keyVaultEndpoint, keyVaultClient, new DefaultKeyVaultSecretManager());
164161
}
165-
)
166-
.UseStartup<Startup>()
167-
.Build();
168-
169-
private static string GetKeyVaultEndpoint() => "https://<YourKeyVaultName>.vault.azure.net";
170-
}
171-
}
162+
}
163+
).UseStartup<Startup>()
164+
.Build();
165+
166+
private static string GetKeyVaultEndpoint() => "https://<YourKeyVaultName>.vault.azure.net";
167+
}
172168
```
173169

174170
6. Use Solution Explorer to navigate to the **Pages** section and open `About.cshtml`. Replace the contents of **About.cshtml.cs** with the code below:
@@ -202,7 +198,8 @@ There are two NuGet packages that your web application needs to have installed.
202198
7. From the main menu, choose **Debug** > **Start without Debugging**. When the browser appears, navigate to the **About** page. The value for the AppSecret is displayed.
203199

204200
>[!IMPORTANT]
205-
> If you get a HTTP Error 502.5 - Process Failure message verify the name of the Key Vault specified in `Program.cs`
201+
> If you get a HTTP Error 502.5 - Process Failure message
202+
> > then verify the name of the Key Vault specified in `Program.cs`
206203

207204
## Publish the web application to Azure
208205

0 commit comments

Comments
 (0)