-
Notifications
You must be signed in to change notification settings - Fork 27
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
proxysql_mysql_users is not able to handle hashed passwords #82
Comments
Well, there is a parameter already. blame me. |
Ok, the error persists when I use in the last task from the example above - name: idempotent add user to proxysql
proxysql_mysql_users:
state: present
username: someuser
password: password
default_hostgroup: 0
login_user: admin
login_password: admin
load_to_runtime: yes
encrypt_password: yes |
maybe there's something in |
Using only What is not working is, when you're using plaintext password first (default), and want to change to something like that if requested_password != existing_password or encrypt_cleartext_password(requested_password) == existing_password:
# we can change
elif:
# we cannot handle this because we don't know if the password just changed |
SUMMARY
proxysql_mysql_users
handles passwords only in plaintext.Once
MYSQL USERS
is loaded to runtime, proxysql is hashing the passwords automatically. That means:mysql_servers
table holds passwords in plaintextruntime_mysql_servers
table holds passwords hashed.When you now load
MYSQL USERS
from runtime, and save them to disk,mysql_servers
holds the user passwords also hashed. But after that,proxysql_mysql_users
is not able to handle this anymore and is trying to create a new user. This results in errors because of table constraints.example: (here is a full playbook example)
Result
References:
select password('some-password') as password;
function is not available in proxysql.therefore the hash-creation must be implemented within python.
maybe we need a new parameter to control if a password should be hashed or not ...
ISSUE TYPE
COMPONENT NAME
proxysql_mysql_users
The text was updated successfully, but these errors were encountered: