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

AzureKeyVault task - Fix keyvault name format #16523

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,6 @@
"loc.messages.CouldNotFetchAccessTokenforMSIDueToMSINotConfiguredProperlyStatusCode": "Could not fetch access token for Managed Service Principal. Please configure Managed Service Identity (MSI) for virtual machine 'https://aka.ms/azure-msi-docs'. Status code: %s, status message: %s",
"loc.messages.CouldNotFetchAccessTokenforMSIStatusCode": "Could not fetch access token for Managed Service Principal. Status code: %s, status message: %s",
"loc.messages.RetryingWithVaultResourceIdFromResponse": "Retrying with vault resource Id reterieved from response : %s",
"loc.messages.ExpiredServicePrincipal": "Could not fetch access token for Azure. Verify if the Service Principal used is valid and not expired."
"loc.messages.ExpiredServicePrincipal": "Could not fetch access token for Azure. Verify if the Service Principal used is valid and not expired.",
"loc.messages.InvalidKeyVaultName": "%s is an invalid KeyVault name."
}
3 changes: 3 additions & 0 deletions Tasks/AzureKeyVaultV2/models/KeyVaultTaskParameters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ export class KeyVaultTaskParameters {
var connectedService = tl.getInput("ConnectedServiceName", true);
this.subscriptionId = tl.getEndpointDataParameter(connectedService, "SubscriptionId", true);
this.keyVaultName = tl.getInput("KeyVaultName", true);
if (this.keyVaultName != encodeURIComponent(this.keyVaultName)){
throw new Error(tl.loc("InvalidKeyVaultName", this.keyVaultName));
}
this.secretsFilter = tl.getDelimitedInput("SecretsFilter", ",", true);
var azureKeyVaultDnsSuffix = tl.getEndpointDataParameter(connectedService, "AzureKeyVaultDnsSuffix", true);
if (!azureKeyVaultDnsSuffix) {
Expand Down
345 changes: 1 addition & 344 deletions Tasks/AzureKeyVaultV2/npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions Tasks/AzureKeyVaultV2/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"author": "Microsoft Corporation",
"version": {
"Major": 2,
"Minor": 200,
"Minor": 207,
"Patch": 0
},
"demands": [],
Expand Down Expand Up @@ -118,6 +118,7 @@
"CouldNotFetchAccessTokenforMSIDueToMSINotConfiguredProperlyStatusCode": "Could not fetch access token for Managed Service Principal. Please configure Managed Service Identity (MSI) for virtual machine 'https://aka.ms/azure-msi-docs'. Status code: %s, status message: %s",
"CouldNotFetchAccessTokenforMSIStatusCode": "Could not fetch access token for Managed Service Principal. Status code: %s, status message: %s",
"RetryingWithVaultResourceIdFromResponse": "Retrying with vault resource Id reterieved from response : %s",
"ExpiredServicePrincipal": "Could not fetch access token for Azure. Verify if the Service Principal used is valid and not expired."
"ExpiredServicePrincipal": "Could not fetch access token for Azure. Verify if the Service Principal used is valid and not expired.",
"InvalidKeyVaultName": "%s is an invalid KeyVault name."
}
}
Loading