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

Add logging through to Azure services #808

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open

Add logging through to Azure services #808

wants to merge 17 commits into from

Conversation

clairernovotny
Copy link
Member

Refactored to use Azure services via DI as that also configures it to work with ILogger.

- Introduced a private field `servicesToAdd` in `ServiceProviderFactory` to store additional services.
- Added `AddServices` method to `ServiceProviderFactory` to add services via an `Action<IServiceCollection>` parameter.
- Updated `Create` method to include `servicesToAdd` if not null.
- Added `ServiceProviderFactoryTests` to verify new functionality.
  - Tests include null check, service addition, and service provider creation.
- Defined `ITestService`, `TestService`, `ITestService2`, and `TestService2` for testing purposes.
Introduce Microsoft.Extensions.Azure package and refactor TrustedSigningService to use dependency injection for CertificateProfileClient. Update TrustedSigningServiceProvider to rely on service provider for instances. Add localized string resources for "Certificate Details" in multiple languages. Update tests to reflect changes and remove obsolete tests. Log detailed certificate information in TrustedSigningService.
- Updated `AzureKeyVaultCommand.cs` to construct and validate URIs for certificates and keys using Azure SDK, and configured Azure clients and services with dependency injection so logging forwards through.
- Added `InvalidKeyVaultUrl` localized string in `AzureKeyVaultResources.Designer.cs` and updated `AzureKeyVaultResources.resx`.
- Refactored `KeyVaultService.cs` to use `CertificateClient` and `CryptographyClient` for simplified service operations.
- Simplified `KeyVaultServiceProvider.cs` by using dependency injection for `KeyVaultService` retrieval.
- Removed `PrivateAssets` attribute from `Azure.Security.KeyVault.Certificates` and `Azure.Security.KeyVault.Keys` in `Sign.SignatureProviders.KeyVault.csproj` for runtime availability.
Also avoids unused parameter error
@clairernovotny clairernovotny marked this pull request as ready for review December 13, 2024 17:06
@clairernovotny clairernovotny requested a review from a team as a code owner December 13, 2024 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants