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

POC for hardcoded frontend/backend user mapping [DO NOT MERGE] #4284

Draft
wants to merge 1 commit into
base: v2.x
Choose a base branch
from

Conversation

renecannao
Copy link
Contributor

@renecannao renecannao commented Jul 7, 2023

This commit is just a POC!
It hardcodes the mapping of frontend to backend usernames. Client can connect to ProxySQL with frontend credentials (username and password) and in case of successful authentication it will replace username with the mapped username. It will later retrieve the password using the backend username.

The mapping (and also the client authentication) will fail if the mapped username doesn't exist, or if the password of the mapped username is not in clear text.

Because the mapped password must be in clear text, variable admin-hash_passwords must be set to false.

Attributes like default_hostgroup, default_schema, and transaction_persistent are all retrieved from the frontend user entry.

Mapping is not supported for COM_CHANGE_USER() executed by client.

This commit is just a POC!
It hardcodes the mapping of frontend to backend usernames.
Client can connect to ProxySQL with frontend credentials (username and password)
and in case of successful authentication it will replace username with the mapped
username. It will later retrieve the password using the backend username.

The mapping (and also the client authentication) will fail if the mapped username
doesn't exist, or if the password of the mapped username is not in clear text.

Because the mapped password must be in clear text, variable `admin-hash_passwords`
must be set to `false`.

Attributes like `default_hostgroup`, `default_schema`, and `transaction_persistent`
are all retrieved from the frontend user entry.

Mapping is not supported for ``COM_CHANGE_USER()` executed by client.
@mirostauder
Copy link
Collaborator

retest this please

@renecannao renecannao marked this pull request as draft July 31, 2023 15:14
@renecannao renecannao changed the title POC for hardcoded frontend/backend user mapping POC for hardcoded frontend/backend user mapping [DO NOT MERGE] Jul 31, 2023
@mirostauder
Copy link
Collaborator

retest this please

@mirostauder
Copy link
Collaborator

Can one of the admins verify this patch?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants