Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: fix typo in azure auth debug log mode #13593

Merged
merged 1 commit into from
Jan 7, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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