Comments (3)
@ahmedawad1 Sorry for the delay in the reply.
I'd like to look at this, so to go directly to the issue, can you share the format of your connection string that you pass to EventHubClient_CreateFromSASToken?
Please change/mangle any credentials in it (do not post the real event hub name, mangle the SHA of your token, etc.) I am only interested in the format, not the actual contents of it.
Thanks!
/Dan
from azure-event-hubs-c.
Hi Dan,
the SAS token that I use looks like the following:
the XXX corresopnds to my service bus name and AAAA to my eventhub name,
const char* SAS_TOKEN = "SharedAccessSignature sr=sb%3a%2f%2fXXX.servicebus.windows.net%2fAAAA&sig=lXyOG%2bVWSO2PnoppT01Zx206%2bu00SWQuE4dvg1OZFL8%3d&se=1520405013&skn=RootManage";
please note also that I do not have publishers which was ok because I use the same SAS token to communicate with my eventhub in another UAMQP-SDK. For this reasons I found that some sources in the implemented library must accept publishers, I tried to trace the error I got previously and debugging till I modified the following sources (eventhubclient_ll.c , eventhubauth.c) and rebuilt the library with the modified versions. Please find them attached. After the modifications I did, it is somehow connected with the eventhub but then the connection was lost, which left me in buzzle.
For easy reaching, I modified the function "EventHubAuthCBS_SASTokenParse" in eventhubauth.c and some other functions and added log messages to understand what is happening.
Please use the compare plugin in notpad++ to see easily the differences between the modified files and the original hosted on the github.
maybe there could be a bug @ if (secondsSinceEpoch < eventHubAuth->extSASTokenExpTSInEpochSec), I think it should be greater and not less.
Please see the differences and tell me your opinion.
Thanks very much again!
from azure-event-hubs-c.
Similar issue is logged here : #61
I have by-passed if (secondsSinceEpoch < eventHubAuth->extSASTokenExpTSInEpochSec) and got Invalid audience error.
To fix this, sent decode url to cbs_put_token() which resulted in "Invalid Signature error"
from azure-event-hubs-c.
Related Issues (20)
- All events are sent to the same partition HOT 3
- The instruction link in README.md file is invalid HOT 2
- Building with MinGW on windows HOT 5
- Question on the compatibility with ubuntu 12.04 and RT Linux HOT 1
- receiver not working HOT 1
- client crashes during internal server errors on event hub
- EVENTHUBCLIENT_DATA_SIZE_EXCEEDED is not used in the SDK
- The connection was inactive for more than the allowed 300000 milliseconds and is closed by container 'LinkTracker' HOT 4
- Accessing system properties HOT 5
- AzureEventHubs proxy support with amqp websockets HOT 5
- Send request failing when trying to sending Avro serialized string
- Update azure-c-shared-utility of tag v0.11 HOT 1
- SAS Token 401 unauthorized error HOT 1
- network availability check HOT 3
- Missing build dependency file /configs/azure_iot_build_rules.cmake
- Azure uamqp library: Eventhub crashes on sending data over 1MB HOT 5
- Crash: V0.12.0:Eventhub_sample:send crashes on using sastoken connection. HOT 1
- How to Pass the message received to the user
- This repo is missing important files
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from azure-event-hubs-c.