|
@@ -123,11 +123,6 @@ func (b *Broker) Open(conf *Config) error {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if conf.Net.SASL.Enable {
|
|
if conf.Net.SASL.Enable {
|
|
|
- b.connErr = b.sendAndReceiveSASLPlainHandshake()
|
|
|
|
|
- if b.connErr != nil {
|
|
|
|
|
- Logger.Printf("Error while performing SASL handshake %s\n", b.addr)
|
|
|
|
|
- return
|
|
|
|
|
- }
|
|
|
|
|
b.connErr = b.sendAndReceiveSASLPlainAuth()
|
|
b.connErr = b.sendAndReceiveSASLPlainAuth()
|
|
|
if b.connErr != nil {
|
|
if b.connErr != nil {
|
|
|
err = b.conn.Close()
|
|
err = b.conn.Close()
|
|
@@ -572,7 +567,6 @@ func (b *Broker) sendAndReceiveSASLPlainHandshake() error {
|
|
|
}
|
|
}
|
|
|
Logger.Print("Successful SASL handshake")
|
|
Logger.Print("Successful SASL handshake")
|
|
|
return nil
|
|
return nil
|
|
|
-
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// Kafka 0.10.0 plans to support SASL Plain and Kerberos as per PR #812 (KIP-43)/(JIRA KAFKA-3149)
|
|
// Kafka 0.10.0 plans to support SASL Plain and Kerberos as per PR #812 (KIP-43)/(JIRA KAFKA-3149)
|
|
@@ -594,7 +588,6 @@ func (b *Broker) sendAndReceiveSASLPlainHandshake() error {
|
|
|
// When credentials are invalid, Kafka closes the connection. This does not seem to be the ideal way
|
|
// When credentials are invalid, Kafka closes the connection. This does not seem to be the ideal way
|
|
|
// of responding to bad credentials but thats how its being done today.
|
|
// of responding to bad credentials but thats how its being done today.
|
|
|
func (b *Broker) sendAndReceiveSASLPlainAuth() error {
|
|
func (b *Broker) sendAndReceiveSASLPlainAuth() error {
|
|
|
-
|
|
|
|
|
handshakeErr := b.sendAndReceiveSASLPlainHandshake()
|
|
handshakeErr := b.sendAndReceiveSASLPlainHandshake()
|
|
|
if handshakeErr != nil {
|
|
if handshakeErr != nil {
|
|
|
Logger.Printf("Error while performing SASL handshake %s\n", b.addr)
|
|
Logger.Printf("Error while performing SASL handshake %s\n", b.addr)
|