-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
Hash MySQL passwords #13614
Hash MySQL passwords #13614
Conversation
Is there any interest in this pull request? |
Hi @joshuaspence! Sorry for the silence here. Thanks for working on this! The password is retained in cleartext with the idea that someone might want to interpolate it somewhere, e.g. to pass on the credentials for the created user to the application that will use it. In retrospect that is not a strong requirement in this particular case since the value is defined directly in config anyway, but to change this now would be a breaking change for anyone depending on doing that. (I have personally written configs like that at a previous company, so I know there's at least one user that would be broken!) If we were writing this resource fresh again today we'd probably hash this value, but since we've already established the cleartext password as part of the interface here I think it's better to just put this under the heading of "use-cases for sensitive values in Terraform state" and address it holistically (along with other use-cases such as If we can find an alternative way to address this without breaking backward compatibility then I think that would be acceptable, as a pragmatic short-term solution until we are able to address some of the larger concerns above. Thanks again for working on this; I hope the reasoning above makes sense. |
Thanks for the explanation. Would you accept a new parameter which hashes the password rather than storing it in plain text? |
Hi @joshuaspence, That seems fine in principle. I think in order for it to work we'd need to add a new attribute that |
Instead of storing MySQL passwords in plaintext, hash them first. This implementation is largely based on #12128.
@apparentlymart I've just updated the pull request. Let me know what you think. |
Hi @joshuaspence! Sorry for the silence here. I've had some 0.10 release work to get done so I've been unable to take a look at this yet, but it's still on my list and I hope to take a look at it soon. |
This was merged into the now-separated MySQL provider in hashicorp/terraform-provider-mysql#9. Thanks, @joshuaspence! |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Instead of storing MySQL passwords in plaintext, hash them first. This implementation is largely based on #12128.