Skip to content

Commit

Permalink
docs: fix typo in azure auth debug log mode (#13593)
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonodonnell authored Jan 7, 2022
1 parent 3c58827 commit ade75b6
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions website/content/docs/auth/azure.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -194,14 +194,14 @@ for your server at `path/to/plugins`:

## Azure Debug Logs

The Azure auth plugin supports debug logging which includes additional information
The Azure auth plugin supports debug logging which includes additional information
about requests and responses from the Azure API.

To enable the Azure debug logs, set the following environment variable on the Vault
server:

```shell
AZURE_SDK_GO_LOGGING=debug
AZURE_GO_SDK_LOG_LEVEL=DEBUG
```

## API
Expand Down Expand Up @@ -295,7 +295,7 @@ using VaultSharp.V1.Commons;

namespace Examples
{
public class AzureAuthExample
public class AzureAuthExample
{
public class InstanceMetadata
{
Expand All @@ -307,7 +307,7 @@ namespace Examples
const string MetadataEndPoint = "http://169.254.169.254/metadata/instance?api-version=2017-08-01";
const string AccessTokenEndPoint = "http://169.254.169.254/metadata/identity/oauth2/token?api-version=2018-02-01&resource=https://management.azure.com/";

/// <summary>
/// <summary>
/// Fetches a key-value secret (kv-v2) after authenticating to Vault via Azure authentication.
/// This example assumes you have a configured Azure AD Application.
/// </summary>
Expand All @@ -323,7 +323,7 @@ namespace Examples
if(String.IsNullOrEmpty(roleName))
{
throw new System.ArgumentNullException("Vault Role Name");
}
}

string jwt = GetJWT();
InstanceMetadata metadata = GetMetadata();
Expand All @@ -332,16 +332,16 @@ namespace Examples
var vaultClientSettings = new VaultClientSettings(vaultAddr, authMethod);

IVaultClient vaultClient = new VaultClient(vaultClientSettings);

// We can retrieve the secret from the VaultClient object
Secret<SecretData> kv2Secret = null;
kv2Secret = vaultClient.V1.Secrets.KeyValue.V2.ReadSecretAsync(path: "/creds").Result;

var password = kv2Secret.Data.Data["password"];

return password.ToString();
}

/// <summary>
/// Query Azure Resource Manage for metadata about the Azure instance
/// </summary>
Expand All @@ -356,7 +356,7 @@ namespace Examples
StreamReader streamResponse = new StreamReader(metadataResponse.GetResponseStream());
string stringResponse = streamResponse.ReadToEnd();
var resultsDict = JsonConvert.DeserializeObject<Dictionary<string, InstanceMetadata>>(stringResponse);

return resultsDict["compute"];
}

Expand All @@ -372,7 +372,7 @@ namespace Examples
HttpWebResponse response = (HttpWebResponse)request.GetResponse();

// Pipe response Stream to a StreamReader and extract access token
StreamReader streamResponse = new StreamReader(response.GetResponseStream());
StreamReader streamResponse = new StreamReader(response.GetResponseStream());
string stringResponse = streamResponse.ReadToEnd();
var resultsDict = JsonConvert.DeserializeObject<Dictionary<string, string>>(stringResponse);

Expand Down

0 comments on commit ade75b6

Please sign in to comment.