Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Azure EventHub Publisher with HMAC Authentication over HTTPS #432

Open
wants to merge 18 commits into
base: develop
Choose a base branch
from

Conversation

aufdenkampe
Copy link
Member

This PR tracks cumulative differences with the develop branch, in order to open a dialogue with @SRGDamia1 and others about design decisions for adding security features to Data Publisher POST Requests.

Although the immediate goal of this PR is to develop secure connections to Azure, the design decisions made here will become a template for secure connections to other IoT platforms, including on AWS. For example, see this EnviroDIY Forum thread: https://www.envirodiy.org/topic/secure-connection-ssl-help/.

This pull request should be merged only after the following two issues are closed:

@SRGDamia1, general HMAC functions could benefit all dataPublishers, so I am adding it to the dataPublisherBase. Does that make sense?
Once I get general HMAC SHA256 tokens to work, I'll then be creating a new publisher for Azure EventHubs. AWS IoT has a similar endpoint, so this could be widely used.
but still getting 504.
Also, using SAS generated in Python for now.
Set Port to 443 for HTTPS, and now connecting!
Still getting 504. After using postman, I had thought that the issue was related to Content-Length being wrong, but then I would have gotten a 411 response code.
Tried Transfer-Encoding: chunked, but still 504
Tried adding [] around json, but still 504.
I still can not get this to POST to Event Hub, even with a properly formatted POST Request (that works in Postman). It connects to the server, but gets no response even after 60 seconds.
@SRGDamia1, can you help me figure out #441?
@GArrigotti-cws, @GArrigotti, I also added `platformio.ini` files that you can use for testing on your side.

Connected to #411
Commiting work from 4/20/22.

The key was to use `TinyGsmClientSecure` rather than `TinyGsmClient` in src/modems/SIMComSIM7080.h
Merge `RainVUE` into `develop`
Update `hmac_auth` from `develop`
@SRGDamia1
Copy link
Contributor

Please add your changes to the change log!

@aufdenkampe
Copy link
Member Author

@SRGDamia1, in the next month, I'll be picking up this work again on:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants