Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

(#527) Add masteruser parameter #528

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mrsteffenjo
Copy link

Pull Request (PR) description

Enable setting the masteruser parameter which was introduced in Redis 6+ to be able to connect using the new ACL rules.

This Pull Request (PR) fixes the following issues

Fixes #527

@mrsteffenjo mrsteffenjo force-pushed the feature/acl-auth-support branch 7 times, most recently from 54e061e to 250c0b4 Compare May 15, 2024 14:15
@TheMeier TheMeier added enhancement New feature or request tests-fail labels May 15, 2024
@mrsteffenjo mrsteffenjo force-pushed the feature/acl-auth-support branch 3 times, most recently from d4eb00f to 579ddbb Compare May 16, 2024 10:37
@mrsteffenjo
Copy link
Author

I don't understand why the target configuration holds the following:

        +# refuse the slave request.
        +#
        +# masterauth <master-password>
        +
        +# However this is not enough if you are using Redis ACLs (for Redis version
        +# 6 or greater), and the default user is not capable of running the PSYNC
        +# command and/or other commands needed for replication. In this case it's
        +# better to configure a special user to use with replication, and specify the
        +# username configuration as such:
        +#
        +# masteruser <master-username>
        +masteruser _VALUE_
        +# When username is specified, the replica will authenticate against its
        +# master using the new AUTH form: AUTH <username> <password>.
        +

that the following test code won't be satisfied:

      describe 'with parameter masteruser' do
        let(:params) do
          {
            masteruser: '_VALUE_'
          }
        end

        it {
          is_expected.to contain_file(config_file_orig).with(
            'content' => %r{masteruser.*'_VALUE_'}
          )
        }
      end

Oh, I see, my IDE surrounded VALUE with single quote marks.

Enable setting the masteruser parameter which was introduced in Redis 6+ to be able to connect using the new ACL rules.
@mrsteffenjo mrsteffenjo force-pushed the feature/acl-auth-support branch from 579ddbb to 5d458ed Compare May 16, 2024 10:55
@mrsteffenjo
Copy link
Author

Fixed the failed tests

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for Redis v6+ ACL auth
3 participants