-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[SQL] Add managed hsm regex match to SQL #15109
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
[SQL] Add managed hsm regex match to SQL #15109
Conversation
|
SQL |
|
@bim-msft could you help take a look at hsm part? |
|
Hi @kingsleyAzure, could you fix CI failure first? |
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
bim-msft
left a comment
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.
LGTM
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
|
Hi @kingsleyAzure, could you take a look on style error and make CI pass? |
|
Hi @Juliehzl Can you please retry the pipeline? |
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
|
please rerun the pipeline. I fixed the line too long error. |
|
Hi @kingsleyAzure, CI is triggered automatically with your commit. But there are more failures occurred. You could see more in |
|
|
||
| match = re.match(r'^https(.)+\.vault(.)+\/keys\/[^\/]+\/[0-9a-zA-Z]+$', uri) | ||
|
|
||
| match = re.match(r'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]+$', uri) |
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.
please add comment to clarify what you do for regex.
|
|
||
| match = re.match(r'^https(.)+\.vault(.)+\/keys\/[^\/]+\/[0-9a-zA-Z]+$', uri) | ||
|
|
||
| match = re.match(r'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]+$', uri) |
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.
Do you support Azure Stack cloud? It seems with your current regex, only some known could are supported. If there are new cloud supported, you will need to change the regex here, right?
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.
currently we do not support Azure stack.
|
@fengzhou-msft @houk-ms Could you help check the regex for hsm and keyvault? |
|
@kingsleyAzure May I ask where did you get the list of the KeyVault endpoints? I suggest we do some general regex here to fuzzily match |
|
This was retrieved from a list of supported endpoint which we tested and validated. There might be some other endpoints which gets matched by fuzz logic, but was not tested and validated. that might create trouble. So that is why I put those validated endpoints into regex because I do not want a match or any other type of endpoints besides the one I listed in regex, even they might exist in current azure offerings. |
|
The same regex match is done in powershell as well. |
houk-ms
left a comment
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.
LGTM, then.
Description
Extend Current Regex matching to include managed hsm URIs since Managed HSM is supported in SQL now.