You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If using Azure Pipelines, provide the account name, team project name, build definition name/build number:
account name - VarianCloud
project name - CorePlatform
build definition name - Sasa Test
buildid - 10033
Required Information
Question, Bug, or Feature?
Type: Bug
Enter Task Name: AzureKeyVault
Environment
Server - Azure Pipelines
account name - VarianCloud
project name - CorePlatform
build definition name - Sasa Test
buildid - 10033
Agent - Hosted
Issue Description
I believe issue I'm running into is related to percent encoding (https://github.com/microsoft/azure-pipelines-agent/blob/master/docs/design/percentEncoding.md). If a Key Vault secret value contains a reserved value (%3B, %0D, %0A, %5D), AzureKeyVault task does not properly set the secret value in variable. Attempting to use the value subsequently results in an incorrect value, and task failure.
Here is a sample value from a local development build (secret value below is not used for anything):
Secret Value in Azure Key Vault (manually retrieved):
%0AMc2EnC!%l!5mcff2thP9gxB9Fz%0vYYM%
Using Azure Key Vault task to retrieve the secret:
PowerShell task to print secret as Base64 encoded value, so it does not get masked:
[System.Convert]::ToBase64String([System.Text.Encoding]::Unicode.GetBytes("$(permissionApiClientSecret)"))
And output of task
:
Which decodes to below - notice the missing %0A at beginning and an empty line:
Task logs
(see logs above)
Troubleshooting
n/a
Error logs
n/a
The text was updated successfully, but these errors were encountered: