Skip to content

filebeat: fix Redis auth method to support username/password#44137

Merged
rdner merged 2 commits intoelastic:mainfrom
ma2sql:filebeat-input-redis-auth
May 6, 2025
Merged

filebeat: fix Redis auth method to support username/password#44137
rdner merged 2 commits intoelastic:mainfrom
ma2sql:filebeat-input-redis-auth

Conversation

@ma2sql
Copy link
Contributor

@ma2sql ma2sql commented Apr 30, 2025

Proposed commit message

filebeat: fix Redis auth method to support username/password

  • WHAT: Updated the Redis authentication logic within the Filebeat input module to correctly handle username/password combinations. The AUTH command has been improved to use both username and password.
  • WHY: The previous implementation attempted to authenticate using only the password, causing failures. Redis authentication requires two arguments: a username and a password. This update resolves the issue.
    Reference: Redis AUTH Documentation

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Disruptive User Impact

Author's Checklist

  • Verify correct authentication with username/password.
  • Validate no impact on existing configurations.

How to test this PR locally

Run redis_integration_test.go to verify changes.

Related issues

Use cases

Screenshots

Logs

@ma2sql ma2sql requested a review from a team as a code owner April 30, 2025 15:02
@ma2sql ma2sql requested review from belimawr and faec April 30, 2025 15:02
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Apr 30, 2025
@cla-checker-service
Copy link

cla-checker-service bot commented Apr 30, 2025

💚 CLA has been signed

@mergify mergify bot assigned ma2sql Apr 30, 2025
@mergify
Copy link
Contributor

mergify bot commented Apr 30, 2025

This pull request does not have a backport label.
If this is a bug or security fix, could you label this PR @ma2sql? 🙏.
For such, you'll need to label your PR with:

  • The upcoming major version of the Elastic Stack
  • The upcoming minor version of the Elastic Stack (if you're not pushing a breaking change)

To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-8./d is the label to automatically backport to the 8./d branch. /d is the digit
  • backport-active-all is the label that automatically backports to all active branches.
  • backport-active-8 is the label that automatically backports to all active minor branches for the 8 major.
  • backport-active-9 is the label that automatically backports to all active minor branches for the 9 major.
@pierrehilbert pierrehilbert added the Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team label Apr 30, 2025
@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Apr 30, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane)

@pierrehilbert pierrehilbert requested review from rdner and removed request for belimawr April 30, 2025 15:33
@pierrehilbert
Copy link
Contributor

@lalit-satapathy it could be interesting to have someone from your team also reviewing this PR.

Copy link
Member

@rdner rdner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ma2sql ma2sql force-pushed the filebeat-input-redis-auth branch from 0a2ab61 to 1d9fc29 Compare May 6, 2025 10:13
@ma2sql
Copy link
Contributor Author

ma2sql commented May 6, 2025

@rdner CHANGELOG.next.asciidoc added, thanks!

Copy link
Member

@rdner rdner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me in the current state.

As was pointed out, we use the same approach in the Metricbeat module here

rd.DialPassword(password),

@rdner
Copy link
Member

rdner commented May 6, 2025

/test

@rdner rdner merged commit 2379586 into elastic:main May 6, 2025
44 checks passed
@ma2sql ma2sql deleted the filebeat-input-redis-auth branch May 10, 2025 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team

4 participants