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

Release .Net SDK v16.6.7 #647

Merged
merged 4 commits into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
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
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
Loading