Skip to content

Commit

Permalink
Add Managed HSM support for SQL (#13073)
Browse files Browse the repository at this point in the history
* add managed hsm uri

* update changelog

* add managed hsm uri

* update changelog

* remove dup

Co-authored-by: Yueren Wang <[email protected]>
  • Loading branch information
Yueren-Wang and yuerenwa authored Sep 25, 2020
1 parent d13d33f commit fd7c52e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/Sql/Sql/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
* Updated Databases cmdlets to support backup storage type specification
* Added Force parameter to `New-AzSqlDatabase`
* Updated ActiveDirectoryOnlyAuthentication cmdlets for server and instance to include ResourceId and InputObject
* Added support for Managed HSM Uris for SQL DB and Managed Instance

## Version 2.9.1
* Fixed potential server name case insensitive error in `New-AzSqlServer` and `Set-AzSqlServer`
Expand Down
2 changes: 1 addition & 1 deletion src/Sql/Sql/Common/TdeKeyHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public static string CreateServerKeyNameFromKeyId(string keyId)
}

// Validate that the url is a keyvault url and has a key and version
Regex r = new Regex(@"https(.)+\.vault(.)+\/keys\/[^\/]+\/[0-9a-zA-Z]+$", RegexOptions.IgnoreCase);
Regex r = new Regex(@"https://(.)+\.(managedhsm.azure.net|managedhsm-preview.azure.net|vault.azure.net|vault-int.azure-int.net|vault.azure.cn|managedhsm.azure.cn|vault.usgovcloudapi.net|managedhsm.usgovcloudapi.net|vault.microsoftazure.de|managedhsm.microsoftazure.de|vault.cloudapi.eaglex.ic.gov|vault.cloudapi.microsoft.scloud)(:443)?\/keys/[^\/]+\/[0-9a-zA-Z]+$", RegexOptions.IgnoreCase);
if (!r.IsMatch(keyId))
{
// Throw an error here, since we don't want to use a non keyvault url
Expand Down

0 comments on commit fd7c52e

Please sign in to comment.