-
Notifications
You must be signed in to change notification settings - Fork 363
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
produce managed file with mysql root acces from salt module related to pillar root_password #120
Comments
Wouldn't leak the mysql root passwords? Not more than in the pillar, nor in other place you may need to store it:
A person who has root on that box does not necessarily know the MySQL root password: A boolean in the pillar will be required to enable this feature. (pillar suggestion) mysql:
server:
enable_root_my_cnf: True Any security suggestion are welcome. |
Other way to fetch mysql's root password with shell root access: for admin knowing the pillar structure can be fetched on the minion: salt-call config.get mysql:server:root_password Also, the following confirms that from: replace_query=`/bin/echo -e \
"USE mysql;\n" \
"SET sql_mode='';\n" \
"REPLACE INTO user SET " \
" host='localhost', user='debian-sys-maint', password=password('$pass'), " \
" Select_priv='Y', Insert_priv='Y', Update_priv='Y', Delete_priv='Y', " \
" Create_priv='Y', Drop_priv='Y', Reload_priv='Y', Shutdown_priv='Y', " \
" Process_priv='Y', File_priv='Y', Grant_priv='Y', References_priv='Y', " \
" Index_priv='Y', Alter_priv='Y', Super_priv='Y', Show_db_priv='Y', "\
" Create_tmp_table_priv='Y', Lock_tables_priv='Y', Execute_priv='Y', "\
" Repl_slave_priv='Y', Repl_client_priv='Y', Create_view_priv='Y', "\
" Show_view_priv='Y', Create_routine_priv='Y', Alter_routine_priv='Y', "\
" Create_user_priv='Y', Event_priv='Y', Trigger_priv='Y',"\
" ssl_cipher='', x509_issuer='', x509_subject='';"`; Which can be reseted, simply by:
|
Another case where the password is visible, and could be hidden:
can output
|
probably also apply to saltstack-formulas#104, saltstack-formulas#106
When you install this formula you may expect that the defined password for mysql's
root
on the managed server will be available on the salt master for mysql.module call:It requires to have setup in
/etc/salt/minion
as said in the doc above:or
I propose to use the second form in the file
/root/.my.cnf
I accomplished a prototype here: server.sls
I will post more in this ticket about security. And sum up discussion in #salt IRC channel.
The text was updated successfully, but these errors were encountered: