mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
⚡ Add SASL mechanism option in Kafka (#1525)
* ⚡ add SASL mechasnim option in Kafka * add toggle for authentication in kafka credentials * ⚡ Revery default value Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
This commit is contained in:
@@ -123,10 +123,14 @@ export class KafkaTrigger implements INodeType {
|
||||
logLevel: logLevel.ERROR,
|
||||
};
|
||||
|
||||
if (credentials.username || credentials.password) {
|
||||
if (credentials.authentication === true) {
|
||||
if(!(credentials.username && credentials.password)) {
|
||||
throw new Error('Username and password are required for authentication');
|
||||
}
|
||||
config.sasl = {
|
||||
username: credentials.username as string,
|
||||
password: credentials.password as string,
|
||||
mechanism: credentials.saslMechanism as string,
|
||||
} as SASLOptions;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user