<p>i'm trying to add username and password to my kafka bridge on strimzi ..i don't know if i configured it right or not and if i configured it right why i can't access using my username and password
here's the steps i did:</p>
<p>secret.yaml</p>
<pre><code>apiVersion: v1
kind: Secret
metadata:
  name: bridgeuser
type: Opaque
data:
  my-password: cmdoR0ZETColMTY3Cg==
</code></pre>
<p>bridge.yaml</p>
<pre><code>apiVersion: kafka.strimzi.io/v1alpha1
kind: KafkaBridge
metadata:
  name: my-bridge
spec:
  replicas: 1
  bootstrapServers: my-cluster-kafka-bootstrap:9092
  http:
    port: 8080
  authentication:
      type: plain
      username: user
      passwordSecret:
        secretName: bridgeuser
        password: my-password
</code></pre>
<p>here's the curl to produce message :</p>
<pre><code>curl -X POST  -u user:rghGFDL*%167 https://localhost:8080/topics/topic   -H 'content-type: application/vnd.kafka.json.v2+json'   -d '{&quot;records&quot;: [{&quot;key&quot;: &quot;key-1&quot;,&quot;value&quot;: &quot;welcome !!&quot;},{&quot;key&quot;: &quot;key-2&quot;,&quot;value&quot;: &quot;welcome !!&quot;}]}'
</code></pre>
<p>when i trying it like this i got :</p>
<pre><code>{
    &quot;offsets&quot;: [
        {
            &quot;error_code&quot;: 500,
            &quot;message&quot;: &quot;Unexpected handshake request with client mechanism PLAIN, enabled mechanisms are []&quot;
        },
        {
            &quot;error_code&quot;: 500,
            &quot;message&quot;: &quot;Unexpected handshake request with client mechanism PLAIN, enabled mechanisms are []&quot;
        }
    ]
}
</code></pre>
<p>if anyone can help and thanks in advance</p>

Ahmed Nageh
<p>The HTTP Bridge currently does not support any authentication on the HTTP interface. You can for example combine it with proxy or API Gateway to get that. The authentication which you configured there, is the authentication between the Bridge and the Kafka cluster.</p>
<p>So as a result, the <code>-u user:rghGFDL*%167</code> in your <code>curl</code> request is ignored. And your connection to Kafka fails because it looks like your broker is not configured for SASL PLAIN authentication (in fact it does nto seem to have any SASL authentication enabled as suggests the <code>Unexpected handshake request with client mechanism PLAIN, enabled mechanisms are []</code> message).</p>
