strimzi-kafka-operator: [Bug]: Mirror Maker OAuth Authentication with Client Assertion expiration

Bug Description

I am using OAuth authentication with Client Assertion from within Mirror Maker. I have configured Mirror Maker to pickup the client assertion from Kubernetes secret. Since the client assertion JWT has its expiration, I do have an mechanism which generates new client assertions and updates Kubernetes Secret. Mirror Maker however seems not to have a mechanism to pickup the updated version of the secret and it locks to the value of secret set during the pod/container start and naturaly fails to authenticate to target Kafka cluster after some time (in my case it is Azure Event Hubs Kafka interface)

Given the limited time validity of client assertions I would need the Mirror Maker to be able to force refresh the client assertion value. Please what is the suggeste approach here?

Steps to reproduce

See above and provided configuration.

Expected behavior

I would expect Mirror Maker to pickup the new value of the client assertion secret

Strimzi version

0.44

Kubernetes version

1.30.6

Installation method

Helm Chart

Infrastructure

Azure Kubernetes Service

Configuration files and logs

Mirror Maker configuration:

apiVersion: kafka.strimzi.io/v1beta2
kind: KafkaMirrorMaker2
metadata:
  name: mymirrormaker
  namespace: kafka
spec:
  version: 3.8.0
  replicas: 1
  connectCluster: "eventhub"
  clusters:
  - alias: "my-cluster"
    bootstrapServers: x.x.x.x:9092
  - alias: "eventhub"
    bootstrapServers: myeh.servicebus.windows.net:9093
    config:
      config.storage.replication.factor: 1
      offset.storage.replication.factor: 1
      status.storage.replication.factor: 1
      producer.connections.max.idle.ms: 180000
      producer.metadata.max.age.ms: 180000
    authentication:
      type: oauth
      tokenEndpointUri: https://login.microsoftonline.com/<tenantid>/oauth2/v2.0/token
      clientId: <clientid>
      scope: https://myeh.servicebus.windows.net/.default
      clientAssertion:
        secretName: client-assertion-secret
        key: client-assertion
    tls:
      trustedCertificates: []
  mirrors:
  - sourceCluster: "my-cluster"
    targetCluster: "eventhub"
    sourceConnector:
      config:
        replication.factor: 1
        offset-syncs.topic.replication.factor: 1
        sync.topic.acls.enabled: "false"
    heartbeatConnector:
      config:
        heartbeats.topic.replication.factor: 1
    checkpointConnector:
      config:
        checkpoints.topic.replication.factor: 1
    topicsPattern: ".*"
    groupsPattern: ".*"

Additional context

No response

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 25 (15 by maintainers)

Most upvoted comments

The next minor version depends on Kafka 4.0. I think we will do the patch release sooner or later. The question is more when exactly. That will likely depend on if more bugs in 0.45 are found, how does it look with Kafka 4.0 etc.