From f244f1326258bc64f8140f77e3893b94eceec1d0 Mon Sep 17 00:00:00 2001 From: v-snalawade <98255332+v-snalawade@users.noreply.github.com> Date: Mon, 23 Sep 2024 13:18:22 +0530 Subject: [PATCH] Remove SAS reference from readme (#20450) --- .../PreJobExecutionAzureFileCopy.ts | 4 +- Tasks/AzureFileCopyV6/README.md | 2 - Tasks/AzureFileCopyV6/package-lock.json | 54 +++++++++---------- Tasks/AzureFileCopyV6/task.json | 4 +- Tasks/AzureFileCopyV6/task.loc.json | 4 +- _generated/AzureFileCopyV6.versionmap.txt | 4 +- .../PreJobExecutionAzureFileCopy.ts | 4 +- _generated/AzureFileCopyV6/README.md | 2 - _generated/AzureFileCopyV6/package-lock.json | 54 +++++++++---------- _generated/AzureFileCopyV6/task.json | 8 +-- _generated/AzureFileCopyV6/task.loc.json | 8 +-- .../PreJobExecutionAzureFileCopy.ts | 4 +- _generated/AzureFileCopyV6_Node20/README.md | 2 - _generated/AzureFileCopyV6_Node20/task.json | 8 +-- .../AzureFileCopyV6_Node20/task.loc.json | 8 +-- 15 files changed, 79 insertions(+), 91 deletions(-) diff --git a/Tasks/AzureFileCopyV6/PreJobExecutionAzureFileCopy.ts b/Tasks/AzureFileCopyV6/PreJobExecutionAzureFileCopy.ts index f0bacc48a816..0ab473b77d29 100644 --- a/Tasks/AzureFileCopyV6/PreJobExecutionAzureFileCopy.ts +++ b/Tasks/AzureFileCopyV6/PreJobExecutionAzureFileCopy.ts @@ -35,9 +35,7 @@ async function run(): Promise { const storageArmClient = new armStorage.StorageManagementClient(azureEndpoint.applicationTokenCredentials, azureEndpoint.subscriptionID); let storageAccount: StorageAccount = await storageArmClient.storageAccounts.get(storageAccountName); let storageAccountResourceGroupName = getResourceGroupNameFromUri(storageAccount.id); - let accessKeys = await storageArmClient.storageAccounts.listKeys(storageAccountResourceGroupName, storageAccountName, null); - let accessKey: string = accessKeys[0]; - let data: string = `/DestKey:\"${accessKey}\"`; + let data: string = `/DestKey:\"\"`; let options = { encoding : "utf8" } fs.writeFileSync(file, data, options); tl.setTaskVariable('AFC_V2_ARM_STORAGE_KEY_FILE', file); diff --git a/Tasks/AzureFileCopyV6/README.md b/Tasks/AzureFileCopyV6/README.md index d563b42b68d9..e7d41c0d53d6 100644 --- a/Tasks/AzureFileCopyV6/README.md +++ b/Tasks/AzureFileCopyV6/README.md @@ -87,7 +87,6 @@ The parameters of the task are described in details, including examples, to show The task creates the following as output variables: * **StorageContainerUri**: When copying files to an Azure container, this parameter returns the Uri of the container were the files were copied to. -* **StorageContainerSasToken**: When copying files to an Azure container, a SasToken is created and returned. By default, this token expires after 4 hours. Following the [output variables](https://docs.microsoft.com/en-us/azure/devops/pipelines/process/variables?view=azure-devops&tabs=yaml%2Cbatch#use-output-variables-from-tasks) documentation and naming the step, we can then reference the variables like so: @@ -104,7 +103,6 @@ Following the [output variables](https://docs.microsoft.com/en-us/azure/devops/p - script: | echo $(AzureFileCopy.StorageContainerUri) - echo $(AzureFileCopy.StorageContainerSasToken) ``` ### Known Limitations : diff --git a/Tasks/AzureFileCopyV6/package-lock.json b/Tasks/AzureFileCopyV6/package-lock.json index 8def96446f68..ba15c4bb5f2e 100644 --- a/Tasks/AzureFileCopyV6/package-lock.json +++ b/Tasks/AzureFileCopyV6/package-lock.json @@ -109,33 +109,6 @@ "version": "1.5.4", "resolved": "https://registry.npmjs.org/@types/q/-/q-1.5.4.tgz", "integrity": "sha512-1HcDas8SEj4z1Wc696tH56G8OlRaH/sqZOynNNB+HF0WOeXPaxTtbYzJY2oEfiUxjSKjhCKr+MvR7dCHcEelug==" - }, - "msalv1": { - "version": "npm:@azure/msal-node@1.18.4", - "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-1.18.4.tgz", - "integrity": "sha512-Kc/dRvhZ9Q4+1FSfsTFDME/v6+R2Y1fuMty/TfwqE5p9GTPw08BPbKgeWinE8JRHRp+LemjQbUZsn4Q4l6Lszg==", - "requires": { - "@azure/msal-common": "13.3.1", - "jsonwebtoken": "^9.0.0", - "uuid": "^8.3.0" - } - }, - "msalv2": { - "version": "npm:@azure/msal-node@2.13.1", - "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-2.13.1.tgz", - "integrity": "sha512-sijfzPNorKt6+9g1/miHwhj6Iapff4mPQx1azmmZExgzUROqWTM1o3ACyxDja0g47VpowFy/sxTM/WsuCyXTiw==", - "requires": { - "@azure/msal-common": "14.14.2", - "jsonwebtoken": "^9.0.0", - "uuid": "^8.3.0" - }, - "dependencies": { - "@azure/msal-common": { - "version": "14.14.2", - "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-14.14.2.tgz", - "integrity": "sha512-XV0P5kSNwDwCA/SjIxTe9mEAsKB0NqGNSuaVrkCCE2lAyBr/D6YtD80Vkdp4tjWnPFwjzkwldjr1xU/facOJog==" - } - } } } }, @@ -527,6 +500,33 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" }, + "msalv1": { + "version": "npm:@azure/msal-node@1.18.4", + "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-1.18.4.tgz", + "integrity": "sha512-Kc/dRvhZ9Q4+1FSfsTFDME/v6+R2Y1fuMty/TfwqE5p9GTPw08BPbKgeWinE8JRHRp+LemjQbUZsn4Q4l6Lszg==", + "requires": { + "@azure/msal-common": "13.3.1", + "jsonwebtoken": "^9.0.0", + "uuid": "^8.3.0" + } + }, + "msalv2": { + "version": "npm:@azure/msal-node@2.14.0", + "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-2.14.0.tgz", + "integrity": "sha512-rrfzIpG3Q1rHjVYZmHAEDidWAZZ2cgkxlIcMQ8dHebRISaZ2KCV33Q8Vs+uaV6lxweROabNxKFlR2lIKagZqYg==", + "requires": { + "@azure/msal-common": "14.15.0", + "jsonwebtoken": "^9.0.0", + "uuid": "^8.3.0" + }, + "dependencies": { + "@azure/msal-common": { + "version": "14.15.0", + "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-14.15.0.tgz", + "integrity": "sha512-ImAQHxmpMneJ/4S8BRFhjt1MZ3bppmpRPYYNyzeQPeFN288YKbb8TmmISQEbtfkQ1BPASvYZU5doIZOPBAqENQ==" + } + } + }, "node-addon-api": { "version": "1.7.2", "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-1.7.2.tgz", diff --git a/Tasks/AzureFileCopyV6/task.json b/Tasks/AzureFileCopyV6/task.json index d2d37f8a0b0e..42334a10f3a1 100644 --- a/Tasks/AzureFileCopyV6/task.json +++ b/Tasks/AzureFileCopyV6/task.json @@ -13,8 +13,8 @@ "author": "Microsoft Corporation", "version": { "Major": 6, - "Minor": 245, - "Patch": 2 + "Minor": 246, + "Patch": 0 }, "demands": [ "azureps" diff --git a/Tasks/AzureFileCopyV6/task.loc.json b/Tasks/AzureFileCopyV6/task.loc.json index 9d9bac88def0..e097bb6d7ffd 100644 --- a/Tasks/AzureFileCopyV6/task.loc.json +++ b/Tasks/AzureFileCopyV6/task.loc.json @@ -13,8 +13,8 @@ "author": "Microsoft Corporation", "version": { "Major": 6, - "Minor": 245, - "Patch": 2 + "Minor": 246, + "Patch": 0 }, "demands": [ "azureps" diff --git a/_generated/AzureFileCopyV6.versionmap.txt b/_generated/AzureFileCopyV6.versionmap.txt index dbc8256207ff..7c1841e91c3a 100644 --- a/_generated/AzureFileCopyV6.versionmap.txt +++ b/_generated/AzureFileCopyV6.versionmap.txt @@ -1,2 +1,2 @@ -Default|6.245.2 -Node20_229_2|6.245.3 +Default|6.246.0 +Node20_229_2|6.246.1 diff --git a/_generated/AzureFileCopyV6/PreJobExecutionAzureFileCopy.ts b/_generated/AzureFileCopyV6/PreJobExecutionAzureFileCopy.ts index f0bacc48a816..0ab473b77d29 100644 --- a/_generated/AzureFileCopyV6/PreJobExecutionAzureFileCopy.ts +++ b/_generated/AzureFileCopyV6/PreJobExecutionAzureFileCopy.ts @@ -35,9 +35,7 @@ async function run(): Promise { const storageArmClient = new armStorage.StorageManagementClient(azureEndpoint.applicationTokenCredentials, azureEndpoint.subscriptionID); let storageAccount: StorageAccount = await storageArmClient.storageAccounts.get(storageAccountName); let storageAccountResourceGroupName = getResourceGroupNameFromUri(storageAccount.id); - let accessKeys = await storageArmClient.storageAccounts.listKeys(storageAccountResourceGroupName, storageAccountName, null); - let accessKey: string = accessKeys[0]; - let data: string = `/DestKey:\"${accessKey}\"`; + let data: string = `/DestKey:\"\"`; let options = { encoding : "utf8" } fs.writeFileSync(file, data, options); tl.setTaskVariable('AFC_V2_ARM_STORAGE_KEY_FILE', file); diff --git a/_generated/AzureFileCopyV6/README.md b/_generated/AzureFileCopyV6/README.md index d563b42b68d9..e7d41c0d53d6 100644 --- a/_generated/AzureFileCopyV6/README.md +++ b/_generated/AzureFileCopyV6/README.md @@ -87,7 +87,6 @@ The parameters of the task are described in details, including examples, to show The task creates the following as output variables: * **StorageContainerUri**: When copying files to an Azure container, this parameter returns the Uri of the container were the files were copied to. -* **StorageContainerSasToken**: When copying files to an Azure container, a SasToken is created and returned. By default, this token expires after 4 hours. Following the [output variables](https://docs.microsoft.com/en-us/azure/devops/pipelines/process/variables?view=azure-devops&tabs=yaml%2Cbatch#use-output-variables-from-tasks) documentation and naming the step, we can then reference the variables like so: @@ -104,7 +103,6 @@ Following the [output variables](https://docs.microsoft.com/en-us/azure/devops/p - script: | echo $(AzureFileCopy.StorageContainerUri) - echo $(AzureFileCopy.StorageContainerSasToken) ``` ### Known Limitations : diff --git a/_generated/AzureFileCopyV6/package-lock.json b/_generated/AzureFileCopyV6/package-lock.json index 8def96446f68..ba15c4bb5f2e 100644 --- a/_generated/AzureFileCopyV6/package-lock.json +++ b/_generated/AzureFileCopyV6/package-lock.json @@ -109,33 +109,6 @@ "version": "1.5.4", "resolved": "https://registry.npmjs.org/@types/q/-/q-1.5.4.tgz", "integrity": "sha512-1HcDas8SEj4z1Wc696tH56G8OlRaH/sqZOynNNB+HF0WOeXPaxTtbYzJY2oEfiUxjSKjhCKr+MvR7dCHcEelug==" - }, - "msalv1": { - "version": "npm:@azure/msal-node@1.18.4", - "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-1.18.4.tgz", - "integrity": "sha512-Kc/dRvhZ9Q4+1FSfsTFDME/v6+R2Y1fuMty/TfwqE5p9GTPw08BPbKgeWinE8JRHRp+LemjQbUZsn4Q4l6Lszg==", - "requires": { - "@azure/msal-common": "13.3.1", - "jsonwebtoken": "^9.0.0", - "uuid": "^8.3.0" - } - }, - "msalv2": { - "version": "npm:@azure/msal-node@2.13.1", - "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-2.13.1.tgz", - "integrity": "sha512-sijfzPNorKt6+9g1/miHwhj6Iapff4mPQx1azmmZExgzUROqWTM1o3ACyxDja0g47VpowFy/sxTM/WsuCyXTiw==", - "requires": { - "@azure/msal-common": "14.14.2", - "jsonwebtoken": "^9.0.0", - "uuid": "^8.3.0" - }, - "dependencies": { - "@azure/msal-common": { - "version": "14.14.2", - "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-14.14.2.tgz", - "integrity": "sha512-XV0P5kSNwDwCA/SjIxTe9mEAsKB0NqGNSuaVrkCCE2lAyBr/D6YtD80Vkdp4tjWnPFwjzkwldjr1xU/facOJog==" - } - } } } }, @@ -527,6 +500,33 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" }, + "msalv1": { + "version": "npm:@azure/msal-node@1.18.4", + "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-1.18.4.tgz", + "integrity": "sha512-Kc/dRvhZ9Q4+1FSfsTFDME/v6+R2Y1fuMty/TfwqE5p9GTPw08BPbKgeWinE8JRHRp+LemjQbUZsn4Q4l6Lszg==", + "requires": { + "@azure/msal-common": "13.3.1", + "jsonwebtoken": "^9.0.0", + "uuid": "^8.3.0" + } + }, + "msalv2": { + "version": "npm:@azure/msal-node@2.14.0", + "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-2.14.0.tgz", + "integrity": "sha512-rrfzIpG3Q1rHjVYZmHAEDidWAZZ2cgkxlIcMQ8dHebRISaZ2KCV33Q8Vs+uaV6lxweROabNxKFlR2lIKagZqYg==", + "requires": { + "@azure/msal-common": "14.15.0", + "jsonwebtoken": "^9.0.0", + "uuid": "^8.3.0" + }, + "dependencies": { + "@azure/msal-common": { + "version": "14.15.0", + "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-14.15.0.tgz", + "integrity": "sha512-ImAQHxmpMneJ/4S8BRFhjt1MZ3bppmpRPYYNyzeQPeFN288YKbb8TmmISQEbtfkQ1BPASvYZU5doIZOPBAqENQ==" + } + } + }, "node-addon-api": { "version": "1.7.2", "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-1.7.2.tgz", diff --git a/_generated/AzureFileCopyV6/task.json b/_generated/AzureFileCopyV6/task.json index 24fa63a345bb..c16b71b812c4 100644 --- a/_generated/AzureFileCopyV6/task.json +++ b/_generated/AzureFileCopyV6/task.json @@ -13,8 +13,8 @@ "author": "Microsoft Corporation", "version": { "Major": 6, - "Minor": 245, - "Patch": 2 + "Minor": 246, + "Patch": 0 }, "demands": [ "azureps" @@ -288,7 +288,7 @@ "AzModuleNotFound": "Could not find the modules: 'Az.Accounts'. If the module was recently installed, retry after restarting the Azure Pipelines task agent." }, "_buildConfigMapping": { - "Default": "6.245.2", - "Node20_229_2": "6.245.3" + "Default": "6.246.0", + "Node20_229_2": "6.246.1" } } \ No newline at end of file diff --git a/_generated/AzureFileCopyV6/task.loc.json b/_generated/AzureFileCopyV6/task.loc.json index 2c33863be2f1..7d66282373b3 100644 --- a/_generated/AzureFileCopyV6/task.loc.json +++ b/_generated/AzureFileCopyV6/task.loc.json @@ -13,8 +13,8 @@ "author": "Microsoft Corporation", "version": { "Major": 6, - "Minor": 245, - "Patch": 2 + "Minor": 246, + "Patch": 0 }, "demands": [ "azureps" @@ -288,7 +288,7 @@ "AzModuleNotFound": "ms-resource:loc.messages.AzModuleNotFound" }, "_buildConfigMapping": { - "Default": "6.245.2", - "Node20_229_2": "6.245.3" + "Default": "6.246.0", + "Node20_229_2": "6.246.1" } } \ No newline at end of file diff --git a/_generated/AzureFileCopyV6_Node20/PreJobExecutionAzureFileCopy.ts b/_generated/AzureFileCopyV6_Node20/PreJobExecutionAzureFileCopy.ts index f0bacc48a816..0ab473b77d29 100644 --- a/_generated/AzureFileCopyV6_Node20/PreJobExecutionAzureFileCopy.ts +++ b/_generated/AzureFileCopyV6_Node20/PreJobExecutionAzureFileCopy.ts @@ -35,9 +35,7 @@ async function run(): Promise { const storageArmClient = new armStorage.StorageManagementClient(azureEndpoint.applicationTokenCredentials, azureEndpoint.subscriptionID); let storageAccount: StorageAccount = await storageArmClient.storageAccounts.get(storageAccountName); let storageAccountResourceGroupName = getResourceGroupNameFromUri(storageAccount.id); - let accessKeys = await storageArmClient.storageAccounts.listKeys(storageAccountResourceGroupName, storageAccountName, null); - let accessKey: string = accessKeys[0]; - let data: string = `/DestKey:\"${accessKey}\"`; + let data: string = `/DestKey:\"\"`; let options = { encoding : "utf8" } fs.writeFileSync(file, data, options); tl.setTaskVariable('AFC_V2_ARM_STORAGE_KEY_FILE', file); diff --git a/_generated/AzureFileCopyV6_Node20/README.md b/_generated/AzureFileCopyV6_Node20/README.md index d563b42b68d9..e7d41c0d53d6 100644 --- a/_generated/AzureFileCopyV6_Node20/README.md +++ b/_generated/AzureFileCopyV6_Node20/README.md @@ -87,7 +87,6 @@ The parameters of the task are described in details, including examples, to show The task creates the following as output variables: * **StorageContainerUri**: When copying files to an Azure container, this parameter returns the Uri of the container were the files were copied to. -* **StorageContainerSasToken**: When copying files to an Azure container, a SasToken is created and returned. By default, this token expires after 4 hours. Following the [output variables](https://docs.microsoft.com/en-us/azure/devops/pipelines/process/variables?view=azure-devops&tabs=yaml%2Cbatch#use-output-variables-from-tasks) documentation and naming the step, we can then reference the variables like so: @@ -104,7 +103,6 @@ Following the [output variables](https://docs.microsoft.com/en-us/azure/devops/p - script: | echo $(AzureFileCopy.StorageContainerUri) - echo $(AzureFileCopy.StorageContainerSasToken) ``` ### Known Limitations : diff --git a/_generated/AzureFileCopyV6_Node20/task.json b/_generated/AzureFileCopyV6_Node20/task.json index a258225f7f5b..8fd79955c260 100644 --- a/_generated/AzureFileCopyV6_Node20/task.json +++ b/_generated/AzureFileCopyV6_Node20/task.json @@ -13,8 +13,8 @@ "author": "Microsoft Corporation", "version": { "Major": 6, - "Minor": 245, - "Patch": 3 + "Minor": 246, + "Patch": 1 }, "demands": [ "azureps" @@ -292,7 +292,7 @@ "AzModuleNotFound": "Could not find the modules: 'Az.Accounts'. If the module was recently installed, retry after restarting the Azure Pipelines task agent." }, "_buildConfigMapping": { - "Default": "6.245.2", - "Node20_229_2": "6.245.3" + "Default": "6.246.0", + "Node20_229_2": "6.246.1" } } \ No newline at end of file diff --git a/_generated/AzureFileCopyV6_Node20/task.loc.json b/_generated/AzureFileCopyV6_Node20/task.loc.json index 92e90f55f6dc..75c6c1cd6880 100644 --- a/_generated/AzureFileCopyV6_Node20/task.loc.json +++ b/_generated/AzureFileCopyV6_Node20/task.loc.json @@ -13,8 +13,8 @@ "author": "Microsoft Corporation", "version": { "Major": 6, - "Minor": 245, - "Patch": 3 + "Minor": 246, + "Patch": 1 }, "demands": [ "azureps" @@ -292,7 +292,7 @@ "AzModuleNotFound": "ms-resource:loc.messages.AzModuleNotFound" }, "_buildConfigMapping": { - "Default": "6.245.2", - "Node20_229_2": "6.245.3" + "Default": "6.246.0", + "Node20_229_2": "6.246.1" } } \ No newline at end of file