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

az mysql flexible-server create writes out password details in log #30944

Open
hgjura opened this issue Mar 4, 2025 · 6 comments
Open

az mysql flexible-server create writes out password details in log #30944

hgjura opened this issue Mar 4, 2025 · 6 comments
Labels
Auto-Assign Auto assign by bot Auto-Resolve Auto resolve by bot bug This issue requires a change to an existing behavior in the product in order to be resolved. customer-reported Issues that are reported by GitHub users external to the Azure organization. MySQL Possible-Solution Security-Issue Service Attention This issue is responsible by Azure service team. Similar-Issue

Comments

@hgjura
Copy link

hgjura commented Mar 4, 2025

Describe the bug

When running az mysql flexible-server create the output fomr command writes out the password and connection string in clear text in the logs !?!?

Here is the command:
az mysql flexible-server create --resource-group $resourcegroup \ --name $sername \ --location $location \ --admin-user $adminusername \ --admin-password $adminpassword \ --sku-name $sku \ --version $mysqlversion \ --yes \ --tags CreatedBy=AzDO

Sensitive info needs to be obfuscated or masked.

Related command

az mysql flexible-server create

Errors

Passowrd is written in clear text

Issue script & Debug output

`
WARNING: Checking the existence of the resource group 'qa-siteweb-rg'...
WARNING: Resource group 'qa-siteweb-rg' exists ? : True
WARNING: Detected current client IP : 4.205.192.95
WARNING: IOPS is 396 which is either your input or free(maximum) IOPS supported for your storage size and SKU.
WARNING: Creating MySQL Server 'mysqlserver-siteweb-qa' in group 'qa-siteweb-rg'...
WARNING: Your server 'mysqlserver-siteweb-qa' is using sku 'Standard_B1ms' (Paid Tier). Please refer to https://aka.ms/mysql-pricing for pricing details
WARNING: Configuring server firewall rule to accept connections from '4.205.192.95'...
WARNING: Creating MySQL database 'flexibleserverdb'...
WARNING: Make a note of your password. If you forget, you would have to reset your password with'az mysql flexible-server update -n mysqlserver-siteweb-qa -g qa-siteweb-rg -p '.
WARNING: Try using az 'mysql flexible-server connect' command to test out connection.
{

"connectionString": "mysql flexibleserverdb --host mysqlserver-siteweb-qa.mysql.database.azure.com --user sofadadmin --password=Password001$",

"databaseName": "flexibleserverdb",
"firewallName": "FirewallIPAddress_2025-3-3_20-35-46",
"host": "mysqlserver-siteweb-qa.mysql.database.azure.com",
"id": "/subscriptions/a178cc79-1caa-4263-a715-c6250800485b/resourceGroups/qa-siteweb-rg/providers/Microsoft.DBforMySQL/flexibleServers/mysqlserver-siteweb-qa",
"location": "Canada Central",

"password": "Password001$",

"resourceGroup": "qa-siteweb-rg",
"skuname": "Standard_B1ms",
"username": "sofadadmin",
"version": "8.4"
}
`

Expected behavior

Password details should be masked

Environment Summary

azure-cli 2.69.0

Additional context

No response

@hgjura hgjura added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Mar 4, 2025
Copy link

Hi @hgjura,

2.69.0 is not the latest Azure CLI(2.70.0).

If you haven't already attempted to do so, please upgrade to the latest Azure CLI version by following https://learn.microsoft.com/en-us/cli/azure/update-azure-cli.

@azure-client-tools-bot-prd azure-client-tools-bot-prd bot added the Auto-Resolve Auto resolve by bot label Mar 4, 2025
@microsoft-github-policy-service microsoft-github-policy-service bot added customer-reported Issues that are reported by GitHub users external to the Azure organization. Auto-Assign Auto assign by bot MySQL Service Attention This issue is responsible by Azure service team. labels Mar 4, 2025
Copy link

github-actions bot commented Mar 4, 2025

Here are some similar issues that might help you. Please check if they can solve your problem.


Possible solution (Extracted from existing issue, might be incorrect; please verify carefully)

The masking, which is displayed as [MASKED] should be enabled from Gitlab CI/CD variables. Despite this, the value of secured string/object should not be displayed in the logs according to the documentation here: https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/data-types#secure-strings-and-objects

Reference:

Powered by issue-sentinel

Copy link

github-actions bot commented Mar 4, 2025

This issue is related to security. Please pay attention.

Powered by issue-sentinel

Copy link
Contributor

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @ambhatna, @savjani.

1 similar comment
Copy link
Contributor

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @ambhatna, @savjani.

@yonzhan
Copy link
Collaborator

yonzhan commented Mar 4, 2025

route to service team

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Assign Auto assign by bot Auto-Resolve Auto resolve by bot bug This issue requires a change to an existing behavior in the product in order to be resolved. customer-reported Issues that are reported by GitHub users external to the Azure organization. MySQL Possible-Solution Security-Issue Service Attention This issue is responsible by Azure service team. Similar-Issue
Projects
None yet
Development

No branches or pull requests

2 participants