I am sending some data from a field gateway to an eventhub. I am concerned about security of the data sent. Righ now I am using the following code and data is going to eventhub. I wanted to know if data is being encryped behind the sceens by the sendSync method, or I need to add some code to encrypt the data before sending
EventData sendEvent = new EventData(payloadBytes);
EventHubClient ehClient = EventHubClient.createFromConnectionStringSync(connStr.toString());
ehClient.sendSync(sendEvent);
I am new to data security so any input would be a great help...Thankyou!!
All data is send using TLS by default. It is mandatory for using the event hub. See https://azure.microsoft.com/en-us/documentation/articles/event-hubs-authentication-and-security-model-overview/ (Devices sending data)
So, you do not need any additional code.
See also Sending AMQP Telemetry to Azure Event Hub not using TLS encryption