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

Sdk update #44

Merged
merged 20 commits into from
Jun 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
19 changes: 0 additions & 19 deletions .github/workflows/keyfactor-starter-workflow.yml

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -346,3 +346,4 @@ healthchecksdb
/key.pem
/cert.pem
/cert.csr
.config/dotnet-tools.json
5 changes: 1 addition & 4 deletions AzureKeyVault/AzureClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
using Azure.ResourceManager.KeyVault.Models;
using Azure.ResourceManager.Resources;
using Azure.Security.KeyVault.Certificates;
using Azure.Security.KeyVault.Secrets;
using Keyfactor.Logging;
using Keyfactor.Orchestrators.Common.Enums;
using Keyfactor.Orchestrators.Extensions;
Expand All @@ -29,7 +28,6 @@
public class AzureClient
{
internal protected virtual AkvProperties VaultProperties { get; set; }
private SecretClient _secretClient;
private Uri AzureCloudEndpoint
{
get
Expand Down Expand Up @@ -82,8 +80,7 @@
logger.LogTrace("Using a service principal to authenticate, generating the credentials");
cred = new ClientSecretCredential(VaultProperties.TenantId, VaultProperties.ClientId, VaultProperties.ClientSecret, new ClientSecretCredentialOptions() { AuthorityHost = AzureCloudEndpoint, AdditionallyAllowedTenants = { "*" } });
logger.LogTrace("generated credentials", cred);
}
_secretClient = new SecretClient(new Uri(VaultProperties.VaultURL), credential: cred);
}
_certClient = new CertificateClient(new Uri(VaultProperties.VaultURL), credential: cred);

return _certClient;
Expand Down Expand Up @@ -287,7 +284,7 @@
return inventoryItems;
}

public virtual async Task<(List<string>, List<string>)> GetVaults()

Check warning on line 287 in AzureKeyVault/AzureClient.cs

View workflow job for this annotation

GitHub Actions / call-starter-workflow / call-dotnet-build-and-release-workflow / dotnet-build-and-release

This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.

Check warning on line 287 in AzureKeyVault/AzureClient.cs

View workflow job for this annotation

GitHub Actions / call-starter-workflow / call-dotnet-build-and-release-workflow / dotnet-build-and-release

This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.

Check warning on line 287 in AzureKeyVault/AzureClient.cs

View workflow job for this annotation

GitHub Actions / call-starter-workflow / call-dotnet-build-and-release-workflow / dotnet-build-and-release

This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.
{
var vaultNames = new List<string>();
var warnings = new List<string>();
Expand Down
20 changes: 9 additions & 11 deletions AzureKeyVault/AzureKeyVault.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,22 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Azure.Identity" Version="1.8.2" />
<PackageReference Include="Azure.ResourceManager" Version="1.5.0" />
<PackageReference Include="Azure.ResourceManager.KeyVault" Version="1.1.0" />
<PackageReference Include="Azure.ResourceManager.Resources" Version="1.4.0" />
<PackageReference Include="Azure.Security.KeyVault.Administration" Version="4.3.0" />
<PackageReference Include="Azure.Security.KeyVault.Certificates" Version="4.5.1" />
<PackageReference Include="Azure.Security.KeyVault.Secrets" Version="4.5.0" />
<PackageReference Include="Azure.Storage.Blobs" Version="12.16.0" />
<PackageReference Include="Azure.Identity" Version="1.11.3" />
<PackageReference Include="Azure.ResourceManager" Version="1.12.0" />
<PackageReference Include="Azure.ResourceManager.KeyVault" Version="1.2.3" />
<PackageReference Include="Azure.ResourceManager.Resources" Version="1.7.3" />
<PackageReference Include="Azure.Security.KeyVault.Administration" Version="4.4.0" />
<PackageReference Include="Azure.Security.KeyVault.Certificates" Version="4.6.0" />
<PackageReference Include="Azure.Security.KeyVault.Secrets" Version="4.6.0" />
<PackageReference Include="Azure.Storage.Blobs" Version="12.20.0" />
<PackageReference Include="CSS.Common" Version="1.7.0" />
<PackageReference Include="Keyfactor.Common" Version="2.3.7" />
<PackageReference Include="Keyfactor.Extensions.Pam.Utilities" Version="1.0.2" />
<PackageReference Include="Keyfactor.Logging" Version="1.1.1" />
<PackageReference Include="Keyfactor.Orchestrators.Common" Version="3.2.0" />
<PackageReference Include="Keyfactor.Orchestrators.IOrchestratorJobExtensions" Version="0.7.0" />
<PackageReference Include="Keyfactor.Platform.IPAMProvider" Version="1.0.0" />
<PackageReference Include="Microsoft.AspNet.WebApi.Client" Version="5.2.9" />
<PackageReference Include="Microsoft.Azure.Management.ResourceManager.Fluent" Version="1.38.1" />
<PackageReference Include="Microsoft.WindowsAzure.Common" Version="1.4.1" />
<PackageReference Include="Microsoft.AspNet.WebApi.Client" Version="6.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 0 additions & 2 deletions AzureKeyVault/Jobs/Discovery.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ public JobResult ProcessJob(DiscoveryJobConfiguration config, SubmitDiscoveryUpd
InitializeStore(config);

var complete = new JobResult() { JobHistoryId = config.JobHistoryId, Result = OrchestratorJobStatusJobResult.Failure };
var failureMessage = string.Empty;
List<string> keyVaults, warnings;

try
Expand All @@ -45,7 +44,6 @@ public JobResult ProcessJob(DiscoveryJobConfiguration config, SubmitDiscoveryUpd
{
complete.FailureMessage = ex.Message;
return complete;
throw;
}

// if there are no warnings return vaults and status of success
Expand Down
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
- 3.1.3
- - 3.1.4
- Update nuget dependencies (Azure Identity Packages)

- - 3.1.3
- Discovery now continues the search if an error is encountered during the process.
- Fixed issue with overwrite box check being ignored when replacing cert in Keyvault
- Now getting properties of certs as pageable during inventory to fix a timeout issue when querying for thousands of certs.
Expand Down
Loading
Loading