Skip to content

Commit

Permalink
fixes #194
Browse files Browse the repository at this point in the history
  • Loading branch information
rajanadar committed Jun 11, 2021
1 parent 9c91f27 commit f99d56c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
## 1.6.2.4 (tbd)

**IMPROVEMENTS:**

* VaultSharp now sets the ```X-Vault-Request: true``` header for all API calls.

**BUG FIXES:**

* [GH-194] Fix deserialization error on ```ReadEncryptionKeyAsync``` for non ```aes256-gcm96``` based key rings.

## 1.6.2.3 (June 5, 2021)

**FEATURES:**
Expand Down
3 changes: 3 additions & 0 deletions src/VaultSharp/Core/Polymath.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ namespace VaultSharp.Core
{
internal class Polymath
{
private const string VaultRequestHeaderKey = "X-Vault-Request";
private const string NamespaceHeaderKey = "X-Vault-Namespace";
private const string AuthorizationHeaderKey = "Authorization";
private const string VaultTokenHeaderKey = "X-Vault-Token";
Expand Down Expand Up @@ -215,6 +216,8 @@ public async Task MakeVaultApiRequest(string resourcePath, HttpMethod httpMethod
throw new NotSupportedException("The Http Method is not supported: " + httpMethod);
}

httpRequestMessage.Headers.Add(VaultRequestHeaderKey, "true");

if (headers != null)
{
foreach (var kv in headers)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public class EncryptionKeyInfo
/// The list of key-version pairs in the key ring.
/// </summary>
[JsonProperty("keys")]
public Dictionary<string, long> Keys { get; set; }
public Dictionary<string, object> Keys { get; set; }

/// <summary>
/// Specifies the minimum version of ciphertext allowed to be decrypted. Adjusting this as part
Expand Down

0 comments on commit f99d56c

Please sign in to comment.