Azure / azure-event-hubs-c

C client library for Azure Event Hubs https://azure.microsoft.com/services/event-hubs
Other
7 stars 18 forks source link

Crash: V0.12.0:Eventhub_sample:send crashes on using sastoken connection. #61

Open ssdbest opened 3 years ago

ssdbest commented 3 years ago

Hi,

I am trying to connect azure event hub using Eventhub_sample/send using sastoken. The api used is EventHubClient_CreateFromSASToken(sastoken); In version 0.12.0, This is crashing in uamqp library in connection->do_work(). Version 0.10.0, 0.11.0, I am getting sas token expiry error. Logs attached. sastoken_error.txt

The same sastoken works fine for me in uamqp library. We want to move to azure-event-hub because it handles network glitches and supports batch processing. Please have a look at this issue asap and let me know if you have any queries.

ssdbest commented 3 years ago

v0.11.0 causing cbs authentication failure due to sastoken expiry. Excerpt : Custom Error: File:d:\projects\bridgeservice\git\azure-event-hubs-c\eventhub_client\src\eventhubclient_ll.c Func:EventHubClient_LL_DoWork Line:1753 Error Seen handle_sas_token_auth Code:445 eventhub_error_callback EVENTHUBCLIENT_SASTOKEN_AUTH_FAILURE

I have by-passed if (secondsSinceEpoch < eventHubAuth->extSASTokenExpTSInEpochSec) and got Invalid audience error. To fix this, sent decoded url to cbs_put_token() which resulted in "Invalid Signature error"