-
Notifications
You must be signed in to change notification settings - Fork 23
Supporting passing Kafka basic auth creds in environment variables #2693
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
base: development/9.1
Are you sure you want to change the base?
Supporting passing Kafka basic auth creds in environment variables #2693
Conversation
Hello delthas,My role is to assist you with the merge of this Available options
Available commands
Status report is not available. |
Waiting for approvalThe following approvals are needed before I can proceed with the merge:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds support for passing Kafka basic authentication credentials via environment variables (BASIC_USERNAME and BASIC_PASSWORD) as an alternative to using a credentials file. This enables Zenko to configure Kafka authentication using environment variables instead of configuration files.
Key Changes:
- Updated validation schema to accept either
credentialsFileorusername/passwordfor basic auth - Modified authentication logic to use direct credentials when
credentialsFileis not provided - Added
BASIC_USERNAMEandBASIC_PASSWORDenvironment variables to task configuration
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| extensions/notification/NotificationConfigValidator.js | Updated joi schema to make credentialsFile optional and added username/password fields with validation rules |
| extensions/notification/utils/auth.js | Modified basic auth handling to support credentials from either file or direct username/password parameters |
| extensions/notification/queueProcessor/task.js | Added BASIC_USERNAME and BASIC_PASSWORD environment variables to destinationAuth object |
| tests/unit/notification/NotificationConfigValidator.js | Updated test descriptions and added test case for basic auth with username/password |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
/status |
StatusStatus report is not available. |
Waiting for approvalThe following approvals are needed before I can proceed with the merge:
|
84402bd to
6360420
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files
... and 3 files with indirect coverage changes
@@ Coverage Diff @@
## development/9.1 #2693 +/- ##
===================================================
- Coverage 74.89% 74.66% -0.23%
===================================================
Files 200 200
Lines 13486 13490 +4
===================================================
- Hits 10100 10072 -28
- Misses 3376 3408 +32
Partials 10 10
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
6360420 to
80f5d94
Compare
Used by Zenko, that uses environement variables rather than a configuration file currently. Issue: BB-732 Signed-off-by: Thomas Flament <thomas.flament@scality.com>
cdea8d6 to
ae6050b
Compare
Used by Zenko, that uses environement variables rather than a configuration file currently.
Issue: BB-732