Skip to content

Conversation

@clairernovotny
Copy link
Contributor

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

@clairernovotny clairernovotny force-pushed the tss-fix branch 2 times, most recently from 8463ad2 to 67fb84e Compare December 11, 2024 22:33
@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
Copy link
Collaborator

@dtivel dtivel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor feedback. Looks good!

- 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
dtivel
dtivel previously approved these changes Feb 11, 2025
@dtivel
Copy link
Collaborator

dtivel commented Feb 11, 2025

@dotnet/sign-maintainers, can I get a re-review? I applied my feedback on Claire's PR. Since I'm now a contributor, I need an outside reviewer.

dtivel
dtivel previously approved these changes Feb 11, 2025
erdembayar
erdembayar previously approved these changes Feb 13, 2025
Copy link

@erdembayar erdembayar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just 1 question for test.

@dtivel dtivel dismissed stale reviews from erdembayar and themself via 9836878 February 13, 2025 21:20
@dtivel dtivel requested a review from erdembayar February 13, 2025 21:44
@dtivel dtivel merged commit 1cd3678 into main Feb 13, 2025
3 checks passed
@dtivel dtivel deleted the tss-fix branch February 13, 2025 22:53
dtivel added a commit that referenced this pull request Feb 13, 2025
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.

4 participants