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

Use hosts IP address as user group instead of a guessed wildcard. #190

Open
wants to merge 1 commit into
base: v2.0
Choose a base branch
from

Conversation

IzzySmith
Copy link

The wildcard approach has the issue, that it allows monitor connections
to the MySQL nodes from a too big IP range. Having the first pxc nodes
IP something like 10.1.2.3, proxysql-admin would create the monitor user
with the host range of 10.%. This would contain the complete 10.0.0.0/8
network which most likely contain other systems that are not supposed to
be allowed to connect to MySQL, even if we are just talking about the
monitor user.

Another issue with the current solution pops up, when the IP address of
the pxc node does not share the same first octet with the ProxySQL IP.
Example:
ProxySQL IP: 172.18.1.1
PXC IP: 10.0.0.1
Then the ProxySQL-Admin script will anyways create the monitor user as
monitor@10.%, resulting in ProxySQL not being able to connect.

In this commit, we use ifconfig to get the actual IP of the ProxySQL
node and will therefore only allow the ProxySQL node to connect as
monitor user.

Co-authored-by: Isobel [email protected]

The wildcard approach has the issue, that it allows monitor connections
to the MySQL nodes from a too big IP range. Having the first pxc nodes
IP something like 10.1.2.3, proxysql-admin would create the monitor user
with the host range of 10.%. This would contain the complete 10.0.0.0/8
network which most likely contain other systems that are not supposed to
be allowed to connect to MySQL, even if we are just talking about the
monitor user.

Another issue with the current solution pops up, when the IP address of
the pxc node does not share the same first octet with the ProxySQL IP.
Example:
  ProxySQL IP: 172.18.1.1
  PXC IP: 10.0.0.1
Then the ProxySQL-Admin script will anyways create the monitor user as
monitor@10.%, resulting in ProxySQL not being able to connect.

In this commit, we use ifconfig to get the actual IP of the ProxySQL
node and will therefore only allow the ProxySQL node to connect as
monitor user.

Co-authored-by: Isobel <[email protected]>
@it-percona
Copy link

it-percona commented Jul 30, 2020

CLA assistant check
All committers have signed the CLA.

@IzzySmith
Copy link
Author

Hi @kennt-percona any updates on this PR?

@venkatesh-prasad-v venkatesh-prasad-v self-assigned this May 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants