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

Save MariaDB password in config file #689

Closed
Zarquan opened this issue May 9, 2022 · 1 comment
Closed

Save MariaDB password in config file #689

Zarquan opened this issue May 9, 2022 · 1 comment
Assignees
Labels
DR3 milestone 1 quickfix A short task that should take about a couple of hours

Comments

@Zarquan
Copy link
Collaborator

Zarquan commented May 9, 2022

To enable the create-user script to access the database after the initial deployment, we should save the generated username/password in a text file in the admin user's home directory on the Zeppelin node.

/home/fedora/mariadb.cnf

We can set the username and password used by all the MariaDB and MySQL clients, e.g. mysql and mysqldump.

[client]
user = albert
password = eiwu1Aip-Ahbae3Ah
host = 127.0.0.1

We can add a symlink to map this to the hidden config file that the MariaDb client looks for by default.

ln -s /home/fedora/mariadb.cnf   /home/fedora/.my.cnf

With this in place, we should be able invoke a mysql or mysqldump command via ssh without needing to know the local password.

Putting the passwords directly into the hidden file just makes it harder for us. The bad guys all know where the hidden file is, so it doesn't gain anything in security. It just create yet another hidden file that we need to keep track of which can get forgotten if we can't see it.

We should avoid using the obfuscated .mylogin.cnf password file that the MySQL mysql_config_editor creates, because it isn't compatible with MariaDB

Putting the password file in fedora's home directory means it is visible from a notebook running in Zeppelin, but that should be fixed once we move Zeppelin to a separate Unix account.

@Zarquan Zarquan added quickfix A short task that should take about a couple of hours DR3 milestone 1 labels May 9, 2022
@Zarquan Zarquan self-assigned this May 14, 2022
@Zarquan
Copy link
Collaborator Author

Zarquan commented May 27, 2022

Fixed in #712

@Zarquan Zarquan closed this as completed May 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DR3 milestone 1 quickfix A short task that should take about a couple of hours
Projects
None yet
Development

No branches or pull requests

1 participant