Skip to content

Expose OAUTH config options #839

@serkef

Description

@serkef

Description

When creating a Producer/Consumer, user is expected to provide configuration based on librdkafka configuration. When we try to set OAUTH options, we get an error:

cimpl.KafkaException: KafkaError{code=_INVALID_ARG,val=-186,str="Property "oauthbearer_token_refresh_cb" must be set through dedicated .._set_..() function"}

We want kafka to contact our OAUTH server and get authenticated to de/serialize messages.

How to reproduce

from confluent_kafka import DeserializingConsumer

config = {
    "bootstrap.servers": "localhost:9094",
    "group.id": "test-01",
    "enable.auto.commit": "true",
    "auto.commit.interval.ms": "1000",
    "auto.offset.reset": "earliest",
    "sasl.mechanism": "OAUTHBEARER",
    "oauthbearer_token_refresh_cb": lambda x: logger.info(f"TEST {x}"),
    "security.protocol": "SASL_SSL",
}
consumer = DeserializingConsumer(config)

Checklist

Please provide the following information:

  • confluent-kafka-python and librdkafka version (confluent_kafka.version() and confluent_kafka.libversion()): ('1.4.0', 17039360), ('1.4.0', 17039615)
  • Apache Kafka broker version: 2.4
  • Client configuration: {...}
  • Operating system: Linux Mint 19.2
  • Provide client logs (with 'debug': '..' as necessary)
  • Provide broker log excerpts
  • Critical issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementRequesting a feature changestatus:help-wantedIssues that would especially appreciate external development or attention

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy