Skip to content

Commit

Permalink
Release .Net SDK v16.6.7 (#647)
Browse files Browse the repository at this point in the history
* KSM-550 Stop generating UIDs that start with "-" (#646)

* KSM-557 Added new and updated PAM field types (#652)

* KSM-557 Added new and updated PAM field types

* removed ReSharper suppressions

* Updated quick test Program.cs
  • Loading branch information
idimov-keeper authored Sep 18, 2024
1 parent 0e0896e commit c94b526
Show file tree
Hide file tree
Showing 9 changed files with 167 additions and 316 deletions.
4 changes: 2 additions & 2 deletions sdk/dotNet/QuickTest/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ private static void Main()
private static async Task GetSecrets()
{
var storage = new LocalConfigStorage("test_config_storage.json");
// ReSharper disable once StringLiteralTypo
SecretsManagerClient.InitializeStorage(storage, "US:ONE_TIME_TOKEN");
// Initialize Storage only once - generates config.json from one-time token
// SecretsManagerClient.InitializeStorage(storage, "US:ONE_TIME_TOKEN");
var options = new SecretsManagerOptions(storage);
// var options = new SecretsManagerOptions(storage, SecretsManagerClient.CachingPostFunction);
var secrets = await SecretsManagerClient.GetSecrets(options);
Expand Down
5 changes: 5 additions & 0 deletions sdk/dotNet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@

# Change Log

## 16.6.7

* KSM-550 - Stop generating UIDs that start with "-"
* KSM-557 - Added new and updated PAM field types

## 16.6.6

* KSM-360 - GHA to build and release strong named assemblies
Expand Down
2 changes: 0 additions & 2 deletions sdk/dotNet/SecretManagement.Keeper/src/SecretManagement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ public static async Task<KeeperResult> GetVaultConfigFromConfigString(string con
return KeeperResult.Ok(storage.AsHashTable());
}

[SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")]
[SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
public class KeeperResult
{
private object result;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ namespace SecretsManager.Test
{
using QueryFunction = Func<string, TransmissionKey, EncryptedPayload, Task<KeeperHttpResponse>>;

[SuppressMessage("ReSharper", "InconsistentNaming")]
[SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")]
public class TestResponse
{
public string transmissionKey { get; set; }
Expand Down
13 changes: 13 additions & 0 deletions sdk/dotNet/SecretsManager/CryptoUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,19 @@ public static byte[] GetRandomBytes(int length)
return bytes;
}

public static byte[] GetUidBytes()
{
byte dash = 0b1111_1000;
var bytes = new byte[] { };
for (int i = 0; i < 8; i++) {
bytes = GetRandomBytes(16);
if ((dash & bytes[0]) != dash) break;
}
if ((dash & bytes[0]) == dash)
bytes[0] = (byte)(bytes[0] & (byte)0b0111_1111);
return bytes;
}

public static byte[] GenerateKeyPair()
{
var keyGenerator = new ECKeyPairGenerator();
Expand Down
1 change: 0 additions & 1 deletion sdk/dotNet/SecretsManager/JsonUtils.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System.Text.Encodings.Web;
using System.Text.Json;
using System.Text.Json.Serialization;

Expand Down
Loading

0 comments on commit c94b526

Please sign in to comment.