[Edge Transparent Gateway scenario]Send message using x509=true in connection string
See original GitHub issueI have set up transparent gateway with downstream device being authenticated to gateway using x509 auth mechanism.
My connection string in the downstream device code is as below:-
HostName={hostname};DeviceId={downstreamDeviceId};x509=true
The error is I get while instantiating the deviceclient is as below:-
Unexpected error Invalid Connection String - Invalid Key
Shutting down IoT Hub Client...
Traceback (most recent call last):
File "./iotagent.py", line 84, in <module>
main()
File "./iotagent.py", line 73, in main
loop.run_until_complete(dowork())
File "/usr/local/lib/python3.7/asyncio/base_events.py", line 587, in run_until_complete
return future.result()
File "./iotagent.py", line 53, in dowork
device_client = DeviceClient(registration_result, x509)
File "/app/iotagent/device_client.py", line 21, in __init__
server_verification_cert=root_ca_cert
File "/usr/local/lib/python3.7/site-packages/azure/iot/device/aio/patch_documentation.py", line 85, in create_from_connection_string
connection_string, **kwargs
File "/usr/local/lib/python3.7/site-packages/azure/iot/device/iothub/abstract_clients.py", line 257, in create_from_connection_string
connection_string = cs.ConnectionString(connection_string)
File "/usr/local/lib/python3.7/site-packages/azure/iot/device/common/auth/connection_string.py", line 83, in __init__
self._dict = _parse_connection_string(connection_string)
File "/usr/local/lib/python3.7/site-packages/azure/iot/device/common/auth/connection_string.py", line 50, in _parse_connection_string
raise ValueError("Invalid Connection String - Invalid Key")
ValueError: Invalid Connection String - Invalid Key
It seems as per this code, the key x509 is not supported in python sdk. Or am I missing something?
Issue Analytics
- State:
- Created 2 years ago
- Comments:21 (9 by maintainers)
Top Results From Across the Web
Authenticate downstream devices - Azure IoT Edge
In a transparent gateway scenario, downstream devices (sometimes called child devices) need identities in IoT Hub like any other device. This ...
Read more >Connecting child devices to the Azure IoT transparent Edge ...
The edge holds all the security identities of the child devices. The transparent gateway is actually 'transparent'. By default, child devices ...
Read more >Setup an IoT Edge Gateway - GitHub Pages
Refer to Create a transparent gateway for specifics on using an IoT Edge device ... with a route that sends all messages from...
Read more >How to connect X.509 authenticated downstream device using ...
please try the following where you pass in your root_ca_cert as a string: Create instance of the device client using the connection string:....
Read more >Authenticating downstream devices with x.509 certificates
One of the most common scenarios in the industry is to provide one common interface/gateway for the devices to connect and send data...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@amit12cool
Version
2.11.0
has been released. You may now use thegateway_hostname
keyword in the.create_from_x509_certificate()
method.@cartertinney any inputs?