question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Questions about kafka bridge scram-sha-512 authentication

See original GitHub issue

Dear Strimzi, I have some doubts reguarding kafka bridge. I have an external kafka listener with this configuration:

...
    authorization:
      type: simple
      superUsers:
        - bridgeuser
...
      external:
        type: loadbalancer
        configuration:
          brokerCertChainAndKey:
            secretName: kafka-external-n
            certificate: n.pem
            key: n.pem
        tls: true
        authentication:
          type: scram-sha-512
          #type: tls
        overrides:
          brokers:
          - broker: 0
            loadBalancerIP: apimichele-kafka.n.io
            advertisedHost: IP

and it’s working fine. I can produce and consume with kafka java class passing username e password into the jaas.conf (let’s encrypt certificate is working as expected, tnx to strimzi 17.0 👍 ).

Now they ask me an http bridge…

So I deployed kafka bridge and if it’s deployed trough the internal/plain listener no problem.

But when I try to connect through the external ip, this is the log I receive:

2020-05-08 14:28:06,148 WARN [Producer clientId=producer-1] Connection to node -1 (xxxx:9094) terminated during authentication. This may happen due to any of the following reasons: (1) Authentication failed due to invalid credentials with brokers older than 1.0.0, (2) Firewall blocking Kafka TLS traffic (eg it may only allow HTTPS traffic), (3) Transient network issue. (org.apache.kafka.clients.NetworkClient) [kafka-producer-network-thread | producer-1]

I think the secret is fine… this is the bridge configuration:

---
apiVersion: kafka.strimzi.io/v1alpha1
kind: KafkaBridge
metadata:
  name: kafka-external
namespace: openwhisk
spec:
  replicas: 1
  bootstrapServers: apimichele-kafka..io:9094
  http:
    port: 8080
  authentication:
    type: scram-sha-512
    username: bridgeuser
    passwordSecret:
      secretName: bridgeuser
      password: password

I include also this:

$ ko get secret bridgeuser -o yaml
apiVersion: v1
data:
  password: xxxxXXXXXXxxxx
kind: Secret
metadata:
  creationTimestamp: "2020-05-08T14:10:46Z"
  labels:
    app.kubernetes.io/instance: bridgeuser
    app.kubernetes.io/managed-by: strimzi-user-operator
    app.kubernetes.io/name: strimzi
    strimzi.io/cluster: kafka-external
    strimzi.io/kind: KafkaUser
  name: bridgeuser
  namespace: openwhisk

I tried other configuration with no luck, can you help me, or point me to the right documenation, please? p.s: I am using strimzi 17.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
ppatiernocommented, May 12, 2020

@dilox in that regard I did a little bit of “exploration” time ago using Nginx. There are simple configuration examples here: https://github.com/ppatierno/nginx-strimzi-kafka-bridge

0reactions
diloxcommented, May 12, 2020

thanks a lot @ppatierno ! the authentication example in your configurations is what I need

Read more comments on GitHub >

github_iconTop Results From Across the Web

Deploying kafka bridge with authentication - Stack Overflow
I'm trying to deploy kafka bridge with authentication type scram-sha-512, i have used below code . but in this case pods are not...
Read more >
Chapter 7. Kafka Bridge Red Hat AMQ 7.7
4.1, “Authentication support in Kafka Bridge”. You can use ACLs in Kafka brokers to restrict the topics that can be consumed and produced...
Read more >
Connecting over HTTP with Kafka Bridge - IBM Event Streams
You can configure TLS ( tls ) or SASL-based ( scram-sha-512 ) user authentication between Kafka Bridge and your Event Streams Kafka cluster....
Read more >
Configuring SCRAM | Confluent Documentation
Salted Challenge Response Authentication Mechanism (SCRAM), or SASL/SCRAM, is a family of SASL ... Apache Kafka® supports SCRAM-SHA-256 and SCRAM-SHA-512 .
Read more >
Configuring Strimzi (0.32.0)
Listener authentication mechanism specified as mutual TLS, SCRAM-SHA-512 or ... Configure a Kafka Bridge deployment using the KafkaBridge resource.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found