-
Notifications
You must be signed in to change notification settings - Fork 314
[5.1] Add new trusted AKV URLs for FR and DE #3483
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
Conversation
- Added 4 new trusted AKV URLs. - Fixed existing manual tests and added unit tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Port of #3482 from main to release/5.1, adding new Azure Key Vault endpoints for French and German sovereign clouds and updating tests.
- Extended
AzureKeyVaultPublicDomainNames
with additional public and HSM vault domains. - Refactored
InvalidAKVUrlTrustedEndpoints
to returnArgumentException
and centralized error message generation. - Updated manual test project to include a new
TrustedUrlsTest
and refactored exception assertions inExceptionTestAKVStore
.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
src/Microsoft.Data.SqlClient/add-ons/AzureKeyVaultProvider/Constants.cs | Added new trusted AKV endpoint domains for French and German sovereign clouds. |
src/Microsoft.Data.SqlClient/add-ons/AzureKeyVaultProvider/Utils.cs | Changed InvalidAKVUrlTrustedEndpoints return type from Exception to ArgumentException . |
src/Microsoft.Data.SqlClient/tests/ManualTests/AlwaysEncrypted/TrustedUrlsTest.cs | Introduced a manual test class to validate both valid and invalid trusted URLs. |
src/Microsoft.Data.SqlClient/tests/ManualTests/AlwaysEncrypted/ExceptionTestAKVStore.cs | Refactored exception assertions to use TrustedUrlsTest.MakeInvalidVaultErrorMessage . |
src/Microsoft.Data.SqlClient/tests/ManualTests/Microsoft.Data.SqlClient.ManualTesting.Tests.csproj | Updated compile includes: added TrustedUrlsTest.cs and reordered AKV setup files. |
Comments suppressed due to low confidence (3)
src/Microsoft.Data.SqlClient/add-ons/AzureKeyVaultProvider/Constants.cs:20
- The addition of new trusted AKV domain names in Constants.AzureKeyVaultPublicDomainNames warrants unit tests to verify their acceptance by the validation logic, ensuring these domains are correctly allowed in automated (non-manual) tests.
"vault.cloudapi.microsoft.scloud", // USSec
src/Microsoft.Data.SqlClient/tests/ManualTests/AlwaysEncrypted/TrustedUrlsTest.cs:35
- [nitpick] Duplicating the error message formatting logic in MakeInvalidVaultErrorMessage can lead to maintenance overhead if the production template changes; consider loading the actual template from the production resource (Strings.InvalidAkvKeyPathTrustedTemplate) or centralizing this logic.
public static string MakeInvalidVaultErrorMessage(string url)
src/Microsoft.Data.SqlClient/tests/ManualTests/AlwaysEncrypted/TrustedUrlsTest.cs:24
- Using reflection to invoke the private ValidateNonEmptyAKVPath method is brittle and may break on internal refactorings; consider exposing a test-friendly public helper or validating through the public Encrypt/DecryptColumnEncryptionKey methods instead.
_method = clazz.GetMethod(
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## release/5.1 #3483 +/- ##
===============================================
- Coverage 71.81% 69.29% -2.53%
===============================================
Files 293 293
Lines 61647 61656 +9
===============================================
- Hits 44272 42723 -1549
- Misses 17375 18933 +1558
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Port of #3482 from main to release/5.1