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

csync2 requires keys for groups, which host does not belongs to #43

Open
Grundik opened this issue Mar 14, 2024 · 0 comments
Open

csync2 requires keys for groups, which host does not belongs to #43

Grundik opened this issue Mar 14, 2024 · 0 comments

Comments

@Grundik
Copy link

Grundik commented Mar 14, 2024

Documentation says: "Csync2 automatically ignores all groups which do not contain the local hostname in the host list. This way you can use one big Csync2 configuration file for the entire cluster.", but in fact csync2 reads all the groups, and requires all the keys on all hosts.

This makes stated use case insecure: if all the hosts knows all the keys, then whats the point of having different keys for different groups?

Its even impossible to make zero-sized stubs for missing keys: they are not accepted either.

Detailed setup:

Shared config file for all hosts:

group somegroup01
{
    host srv01 (srv02);
    key /etc/csync2/somegroup01.key;
   ...
}

group somegroup02
{
    host srv01 (srv03);
    key /etc/csync2/somegroup02.key;
   ...
}

Syncing from srv01 to srv03:

$ csync2 -xv -G somegroup02
Connecting to host srv03 (SSL) ...
Connect to 10.0.0.3:30865 (srv03).
Config command failed.
ERROR: Connection to remote host `srv03' failed.
Host stays in dirty state. Try again later...

Logs on srv03 are following:

Mar 14 19:59:42 srv03 csync2[2225785]: Config error: Can't read keyfile /etc/csync2/somegroup01.key.

So host srv03 requires key for somegroup01 group, despite not being listed there.

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

No branches or pull requests

1 participant