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

Support MFA for :password in :sentinel option #257

Merged
merged 2 commits into from
Oct 18, 2023

Conversation

ahovgaard
Copy link
Contributor

This PR makes it possible to specify a common :password option for sentinels as an MFA. For example:

Redix.start_link(
  sentinel: [
    group: "mymaster",
    sentinels: [
      [host: "localhost", port: 26379]
    ],
    password: {System, :fetch_env!, ["PASSWORD"]}
  ]
)

Currently, the schema in Redix.StartOptions only allows this option to be a string, even though it allows to use an MFA for the :password option in each individual sentinel in the :sentinels list. It already works in the implementation, however, so this PR simply expands the NimbleOptions :type for the option and adds additional test cases.

@ahovgaard ahovgaard marked this pull request as ready for review October 18, 2023 15:26
@coveralls
Copy link

Pull Request Test Coverage Report for Build 493f62b931f23edc45564e7c9196902e6d5d6889-PR-257

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.1%) to 86.003%

Totals Coverage Status
Change from base Build 3a913079b5be8736e50cf83e7a0172fcfb44ee46: 0.1%
Covered Lines: 596
Relevant Lines: 693

💛 - Coveralls

@whatyouhide whatyouhide merged commit e97ef94 into whatyouhide:main Oct 18, 2023
4 checks passed
@ahovgaard ahovgaard deleted the fix-sentinel-password-option branch November 8, 2023 11:01
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.

3 participants