-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Closed
Description
Describe the bug
When created a new SP (or resetting credentials) n Azure CLI, special characters appear such as !, $, and ' which cause issues with variables/commands in Linux:
Example (obfuscated):
> az ad sp create-for-rbac
Creating a role assignment under the scope of "/subscriptions/**[redacted]**"
Retrying role assignment creation: 1/36
{
"appId": "dummy-app-id",
"displayName": "**[redacted]**",
"name": "**[redacted]**",
"password": "**[redacted]**$9=:p;**[redacted]**(<5\\**[redacted]**@<a3r/N!**[redacted]**",
"tenant": "**[redacted]**"
}
> pass="[redacted]" --> value from above
zsh: event not found: >I
To Reproduce
az ad sp create-for-rbac --skip-assignment(oraz ad sp credential reset)- set variable as password value
- Try to use variable
Expected behavior
Secret value should contain only character which are permitted and usable in scripts/variables
Environment summary
> az version
{
"azure-cli": "2.6.0",
"azure-cli-command-modules-nspkg": "2.0.3",
"azure-cli-core": "2.6.0",
"azure-cli-nspkg": "3.0.4",
"azure-cli-telemetry": "1.0.4",
"extensions": {
"aks-preview": "0.4.44",
"azure-firewall": "0.3.1"
}
}
WSL & Bash/Zsh, Ubuntu VM with Bash
Additional context
Testing a previous version of CLI such as 2.4, we see that secrets are generated as GUID format with only - for special characters. Same case for Azure PowerShell module.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Graphaz adaz ad