azure-iot-sdk-java | Java SDK for connecting devices | Azure library
kandi X-RAY | azure-iot-sdk-java Summary
kandi X-RAY | azure-iot-sdk-java Summary
A Java SDK for connecting devices to Microsoft Azure IoT services
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Creates an identity key from a byte array
- create a registration operation status parser
- Parse the SRSMethod from the provided JSON string .
- Command - line tool .
- Sets an option .
- Verify the HTTP response .
- Runs a sample of a service client .
- Print configuration .
- This method is used to execute a state machine .
- Unwraps a buffer from a ByteBuffer .
azure-iot-sdk-java Key Features
azure-iot-sdk-java Examples and Code Snippets
Community Discussions
Trending Discussions on azure-iot-sdk-java
QUESTION
I am trying to securely connect multiple devices(200+) to Microsoft Azure IoT Central. I have an android app running api 19 that connects a single device via https to IoT Central.
I am following the tutorial for SaS group enrollment.
I understand that I need a connection string to connect to IoT central which is composed of the underlying IoT Hub name, device primary key and device id(which can be the device imei or something so that can be auto generated).
However inserting the primary key for each device would require modifying the app for 200+ devices.
In order to auto generate the device primary key it can be derived from the the SAS-IoT-Devices group master key by running: az iot central device compute-device-key --primary-key --device-id
or in my case using android studio with the code:
ANSWER
Answered 2021-Mar-11 at 20:09In absence of unique hardware root of trust, your security posture will always be relatively weak.
One option is to generate device specific key in a Azure service, e.g. Azure Function which can use the master Key stored in a Azure Key vault. The android app will still need to attest its unique identity with the function and request device specific identities. This will avoid having a common master key in the app.
If you have an option to take advantage of unique ID on Android, e.g. FID (https://developer.android.com/training/articles/user-data-ids), it can be used to attest the app identity with the function.
Other option is to generate key pair per device and use that to create CSR, get device specific X509. It will add more complexity and still need bootstrap attestation mechanism.
QUESTION
ANSWER
Answered 2020-Sep-08 at 15:45According to the REST API there is the deviceScope
property:
The scope of the device. Auto generated and immutable for edge devices and modifiable in leaf devices to create child/parent relationship.
So try providing this property in the device object as e.g. here that is used for registry.create()
UPDATE: so this code works:
QUESTION
I am trying Transparent gateway use case with Downstream devices. I am following documentation how-to-create-transparent-gateway provided by microsoft. I have installed azure IoT Edge Runtime on Ubuntu 18.04 virtual machine. IoT edge runtime is running perfectly with one custom java module.
I have created an IoT Device on Azure portal with Symmetric key. I have added my IoT Edge Device as parent to this IoT Device. I am using java sample send-event to send message to IoT Edge device.
I have copied IoT Device connection string from azure portal and modified it as per the documentation Retrieve and modify connection string. My connection string for IoT Device looks like HostName=myGatewayDevice;DeviceId=myDownstreamDevice;SharedAccessKey=xxxyyyzzz
in above connection string myGatewayDevice
is the hostname
of ubuntu virtual machine hosting IoT Edge runtime. When I run this example I got the below exception
ANSWER
Answered 2020-Feb-12 at 12:52Your IoT Edge uses (by default) a self-signed certificate for its incoming connections. You need to make your downstream device to trust that certificate. See here for details on how to the this up:
https://docs.microsoft.com/en-us/azure/iot-edge/how-to-connect-downstream-device
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install azure-iot-sdk-java
Azure IoT Hub device SDK for Java: connect client devices to Azure IoT Hub
Azure IoT Hub service SDK for Java: enables developing back-end applications for Azure IoT
Azure IoT Device Provisioning device SDK for Java: provision devices to Azure IoT Hub using Azure IoT Device Provisioning
Azure IoT Device Provisioning service SDK for Java: manage your Provisioning service instance from a back-end Java application
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page