Skip to content
This repository was archived by the owner on Nov 1, 2023. It is now read-only.

Commit 7364c05

Browse files
committed
address comments
1 parent 0585786 commit 7364c05

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

src/ApiService/ApiService/onefuzzlib/Extension.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,10 @@ public static VMExtensionWrapper GenevaExtension(AzureLocation region) {
240240

241241
if (pool.Os == Os.Windows && scaleSet.Auth is not null) {
242242
var auth = await _context.SecretsOperations.GetSecretValue<Authentication>(scaleSet.Auth);
243-
var sshKey = auth?.PublicKey.Trim();
243+
if (auth is null) {
244+
throw new Exception($"unable to retrieve auth: {scaleSet.Auth}");
245+
}
246+
var sshKey = auth.PublicKey.Trim();
244247
var sshPath = "$env:ProgramData/ssh/administrators_authorized_keys";
245248
commands.Add($"Set-Content -Path {sshPath} -Value \"{sshKey}\"");
246249
}

src/ApiService/ApiService/onefuzzlib/Secrets.cs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,6 @@ public static (Uri, string) ParseSecretUrl(Uri secretsUrl) {
3737
return (new Uri(vaultUrl), secretName);
3838
}
3939

40-
public virtual async Task<SecretData<T>> StoreSecretData<T>(SecretData<T> secretData) {
41-
if (secretData.Secret.IsHIddden) {
42-
return secretData;
43-
}
44-
var kv = await StoreSecret(secretData.Secret);
45-
return new SecretData<T>(new SecretAddress<T>(kv));
46-
}
47-
4840
public async Task<Uri> StoreSecret(ISecret secret) {
4941
var secretValue = secret.GetValue();
5042
var secretName = Guid.NewGuid();

0 commit comments

Comments
 (0)