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

SSL configuration settings support for database settings in /etc/rmt.conf #1016

Open
somethingbitme opened this issue Jul 8, 2023 · 1 comment
Labels
On hold Issue being evaluated

Comments

@somethingbitme
Copy link

There does not currently seem to be a way to connect to a (MariaDB) database over SSL when using rmt-cli to perform repository syncing, mirroring, etc.

For example, the following command produces an error that only occurs when the database user provided in /etc/rmt.conf requires SSL:

$ bin/rmt-cli repos list
Cannot connect to database server. Ensure its credentials are correctly configured in '/etc/rmt.conf' or configure RMT with YaST ('yast2 rmt').

Checking the database logs confirms that the connection is not being attempted over SSL:
[ERROR] Authentication requires SSL encryption.

The version of the mysql2 adapter used does support SSL configuration options that would allow for connections over SSL.

However, these are not able to be set under the database settings in /etc/rmt.conf, or at least they don't seem to be used:

rmt/lib/rmt/config.rb

Lines 17 to 28 in fe2c583

def db_config(key = 'database')
{
'username' => Settings[key].username,
'password' => Settings[key].password,
'database' => Settings[key].database,
'host' => Settings[key].host || 'localhost',
'adapter' => Settings[key].adapter || 'mysql2',
'encoding' => Settings[key].encoding || 'utf8',
'timeout' => Settings[key].timeout || 5000,
'pool' => Settings[key].pool || 5
}
end

Is this understanding correct, or is something being done wrong?

Side note from testing: The mysql_clear_password.so plugin library may be required when connecting over SSL.

@ngetahun
Copy link
Contributor

@somethingbitme It should be possible to configure according to rails. Can you create a PR?

@ngetahun ngetahun added the On hold Issue being evaluated label Jan 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
On hold Issue being evaluated
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants