David Beavon (Software) asked a question.

Kafka authentication examples for ABL?

I was able to find a few kafka examples, but not much in the way of authentication.

 

The auth flow I need to use is fairly complex, because it starts with the need to generate a bearer token for Databricks, (and for certain topics/tables within Databricks).

 

I can get the bearer token myself. But there is apparently no way to provide this to the kafka message producer in ABL. For many other languages/clients there should be a callback method that would be invoked, and that is the place where I would provide the bearer token that is acceptable by Databricks.

 

We need a lot more kafka examples. The examples I found seem to imply that the broker doesn't authenticate a client at all. I think there should be an example to show how to provide an ad-hoc bearer token (oauth access token) as well.

 

I'm pretty much stuck at this point. To make matters worse, the LLMs like gemini are hallucinating very badly when it comes to using kafka in ABL. They keep assuming that ABL will have the right classes/enums/callbacks, but that is not the case. So we are made to chase a lot of wild geese, before giving up.

 

Here is a bunch of hallucination from Gemini showing how one might provide an oauth access token to this API in ABL

 

image 

 

 

 

 

 

 

 

 

 

 


  • Matt Baker (Progress Software)

    You can pass any string based configuration item (and all kafka configuration is via strings) through to the construction the kafka producer from the ABL. call <ProducerBuilder>:SetProducerOption("...kafka config name...", "<bearertokenstring>"). . You'll need to now the configuration value name. There's no callback implemented in ABL for refresh tokens. This needs a feature request.

     

    The list of kafka configuration properties are here. https://docs.confluent.io/platform/current/clients/librdkafka/html/md_CONFIGURATION.html Pick out the ones that apply to the producer. The ABL just passes them through.

    Selected as Best
  • Matt Baker (Progress Software)

    You can pass any string based configuration item (and all kafka configuration is via strings) through to the construction the kafka producer from the ABL. call <ProducerBuilder>:SetProducerOption("...kafka config name...", "<bearertokenstring>"). . You'll need to now the configuration value name. There's no callback implemented in ABL for refresh tokens. This needs a feature request.

     

    The list of kafka configuration properties are here. https://docs.confluent.io/platform/current/clients/librdkafka/html/md_CONFIGURATION.html Pick out the ones that apply to the producer. The ABL just passes them through.

    Selected as Best
  • David Beavon (Software)

    Hi Matt, thank for the reply.

     

    I think the callback is the only mechanism that works when using Databricks as a kafka-compliant broker. It requires us to prepare a very elaborate oauth token, in preparation for using the API.

     

    For some reason, the providing of bearer tokens doesn't seem to be something that can be configured in the normal properties.... The kafka clients in ALL the other languages will always place a dependency on a callback method. Whereas callbacks in ABL are fairly unusual, and I can see why this was left out of the current implementation.

     

    As a side, are you able to find any prior ABL examples of authentication for this Kafka client? I find a few examples, but none of them have authn. Obviously I can also look at the "librdkafka" examples from C++ and cross-port them into ABL. But it would be VERY comforting to see a few authn examples from the OE community as well. It would let me know what trails have been blazed in the past, and what trails may be a lot harder to pass.

     

    I suspect this kafka client API was created for one or two very specific OE customers , with very specific scenarios (and possibly no authn of any kind?). Else I can't explain why they wouldn't have included the authn handshakes in the examples as well. That is a strange thing to leave out, since it is the place where any new programmer will probably waste more than ~50% of their time. You gotta love security.

     

     

    • Matt Baker (Progress Software)

      When the Kafka support was written, it was against an older version of Kafka (newest available at that time). and the authentication support for bearer tokens even in librdkafka was very minimal at the time. No further work in this area has been done.

      • David Beavon (Software)

        Hi Matt. Thanks for the clarity.

         

        I appreciate the help. But it scares me that you are one of the few folks at Progress responding to this community (whether .Net openclient related or ABL/kafka or otherwise). Either you are a manager or you are being stretched very thin as a software engineer.

         

        FYI, Using Databricks as a kafka-compatible target for "streaming" messages is something that others may pursue in the near future. I suppose I should add something to the IDEA portal? It is discouraging doing that, since it can take a year to gain ten votes. (and probably longer where kafka-related stuff is concerned).

         

        I'm not really deep in security stuff, but it seems like the callback for generating an ad-hoc bearer token is sort of a "catch-all" that can open a few more doors for a kafka client. Even if we needed to generate an oauth externally (eg in c#), prior to a PASOE call, it would allow a PASOE producer to send the messages directly from ABL. Else we have to transmit the streaming data out in batch to c#, prior to sending it on the way to databricks, which is a bit unfortunate.