azure-functions-kafka-extension
azure-functions-kafka-extension copied to clipboard
HttpTrigger Kafka Needs to Support Config Settings Replacement for Ssl parameters
Hello,
Ssl Config substitutions do not work on the HttpTrigger with Kafka. You need to hardcode. This is a huge config issue. They do work in the KafkaTrigger.
SslKeyLocation = "%SslKeyLocation%",
SslCaLocation = "%SslCaLocation%",
SslCertificateLocation = "%SslCertificateLocation%",
[HttpTrigger(AuthorizationLevel.Function, "post", Route = null)] HttpRequest req,
[Kafka(
"ProdBroker",
"%ProdTopicEvents%",
SslKeyLocation = "%SslKeyLocation%",
SslCaLocation = "%SslCaLocation%",
SslCertificateLocation = "%SslCertificateLocation%",
SslKeyPassword = "%SslKeyPassword%",
Protocol = BrokerProtocol.Ssl,
AuthenticationMode = BrokerAuthenticationMode.Plain
)] IAsyncCollector<KafkaEventData<byte[]>> events, ILogger log)
Thank you for the feedback. I found the spot.
https://github.com/Azure/azure-functions-kafka-extension/blob/d6ddb6c48a4ad3e6e765fe0123b76b7f677f0bb2/src/Microsoft.Azure.WebJobs.Extensions.Kafka/Output/KafkaProducerFactory.cs#L127-L130
We need to do like this. https://github.com/Azure/azure-functions-kafka-extension/pull/153/files
hi. is there an update on this one? This is a big problem that makes this output binding unusable if your cluster uses certs. @chadwillson - did you manage to find a walkaround for configuring different environments?
Hi @artursokhikyan,
We hardcoded the variables per environment and are awaiting the update outlined by @TsuyoshiUshio.
It is a big pain and not defensible in code reviews. We are using this in production.
Chad
Hi @chadwillson , @artursokhikyan
The change will be very simple, however, just need to test it. I'd happy to include this as the next release. However, I can't promise when I'll finish it. If you guys are ok, could you contribute it? the change is very simple and small that I just explained above. Or I'll do it before the next release.
@TsuyoshiUshio @shrohilla This issue is still open and affecting us as well. Do you plan a change regarding this issue?
Any update on the SslKeyPassword, right now it is still collected from the attribute itself, wich makes the output binding unusable to us