puppetlabs / puppetlabs-mysql

MySQL Puppet Module / Manifests + Types & Providers
Apache License 2.0
380 stars 792 forks source link

Also set passwords for the additional root users. #1536

Closed klynton closed 8 months ago

klynton commented 1 year ago

MySQL/MariaDB also have root@127.0.0.1 and root@::1 users. If the password is not set for them then any user can log in as root without a password by specifying -h 127.0.0.1 or -h ::1.

CLAassistant commented 1 year ago

CLA assistant check
All committers have signed the CLA.

puppet-community-rangefinder[bot] commented 1 year ago

mysql::server::root_password is a class

that may have no external impact to Forge modules.

This module is declared in 140 of 580 indexed public Puppetfiles.


These results were generated with Rangefinder, a tool that helps predict the downstream impact of breaking changes to elements used in Puppet modules. You can run this on the command line to get a full report.

Exact matches are those that we can positively identify via namespace and the declaring modules' metadata. Non-namespaced items, such as Puppet 3.x functions, will always be reported as near matches only.

LukasAud commented 1 year ago

Hi @klynton, can you rebase this PR? That should kick off a run of our latest CI and test against Puppet 8. Once that is done, I will be happy to review this.

klynton commented 1 year ago

@LukasAud Done! Thank you.

LukasAud commented 1 year ago

Hey @klynton, looks like there are some failures. It looks like your code counts as a duplicate of another declaration existing in manifests/server/account_security.pp L7. Can you take a look into this?

klynton commented 1 year ago

It looks like the module tries to delete those accounts now:

https://github.com/puppetlabs/puppetlabs-mysql/blob/main/manifests/server/account_security.pp#L7-L14

I'll have a look into this a bit more. But I think that removing those users is the same as setting the password for them in terms of security...unless I'm missing something.