-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Response of keyvault set secret includes secret value by default #27406
Copy link
Copy link
Open
Labels
Auto-AssignAuto assign by botAuto assign by botAuto-ResolveAuto resolve by botAuto resolve by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamThe command of the issue is owned by Azure CLI teamKeyVaultaz keyvaultaz keyvaultact-identity-squadquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
Milestone
Metadata
Metadata
Assignees
Labels
Auto-AssignAuto assign by botAuto assign by botAuto-ResolveAuto resolve by botAuto resolve by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamThe command of the issue is owned by Azure CLI teamKeyVaultaz keyvaultaz keyvaultact-identity-squadquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
Describe the bug
The default behavior of
az keyvault secret setwill return the secret value in plain text. It is dangerous. In our scenario, we have a script to generate secret then save into kv. We think the secret only exists in memroy and kv, but actually is printed and logged.Related command
az keyvault secret set --subscription xxxx --vault-name xxx--name test-secret --value '123'
Errors
{
"attributes": {
"created": "2023-09-15T18:41:41+00:00",
"enabled": true,
"expires": null,
"notBefore": null,
"recoveryLevel": "Recoverable+Purgeable",
"updated": "2023-09-15T18:41:41+00:00"
},
"contentType": null,
"id": "xxxxx",
"kid": null,
"managed": null,
"name": "test-secret",
"tags": {
"file-encoding": "utf-8"
},
"value": "123"
}
Issue script & Debug output
No error in script/cmd
Expected behavior
can we make
--output noneas defaultEnvironment Summary
azure-cli: 2.41.0
Additional context
No response