Hi, thanks for the explanation, I recently created a Jira ticket on this topic: https://jira.iotivity.org/browse/IOT-2186.
From: iotivity-dev-bounces at lists.iotivity.org [mailto:[email protected]] On Behalf Of ??? Sent: Tuesday, May 9, 2017 5:14 PM To: Heldt-Sheller, Nathan <nathan.heldt-sheller at intel.com>; Harish Kumara Marappa <h.marappa at samsung.com>; iotivity-dev at lists.iotivity.org Subject: Re: [dev] Is OCResource::host() returns valid host for secured resource ? Hi, All. See my coment in below thanks. what I want to point out here is Host address of secured resource is showing different address which is not even in the endpoints list. I think Host address supposed to be one of endpoints, right ? Because of this application layer has to set secure resource's host with one of secure endpoints before using it. => Normal host address isn`t one of endpoints, normal host address is parsed from coap packet header. And endpoins infomation is just additional address except current host address. In more detail, endpoints is additional address infomation which is accessible from current client network(which discovery reqeust sent), so endpoints list doesn`t include current host address, Because of this application layer has to set secure resource's host with one of secure endpoints before using it. => It seems to right, but as i mentioned above basically host address showing address where it from. And you can change current host of found resource using setHost() which is member function of OCResource class. Perhaps one of the ?eps? (Endpoint list) code authors can give a definitive answer, but in my estimation, this isn?t a problem. The Host address may be just the CoAP address from which the /res response was sent, but if the Resource doesn?t expose an Unsecured Endpoint it would only have Secure ?ep? entries in its ?eps?. Again just my take; I?m not the Endpoint feature expert by any means. The Host address may be just the CoAP address from which the /res response was sent, => Definitely right. but if the Resource doesn?t expose an Unsecured Endpoint it would only have Secure ?ep? entries in its ?eps?. => Right, in simpleserver.cpp createResource() create resource with OC_SECURE flag, so when client found that resource, response payload has only secured endpoins like below. List of resource endpoints: coaps://107.108.81.118:48100 coaps+tcp://107.108.81.118:37259 Thanks you. --------- Original Message --------- Sender : Heldt-Sheller, Nathan <nathan.heldt-sheller at intel.com<mailto:nathan.heldt-sheller at intel.com>> Date : 2017-05-10 00:52 (GMT+9) Title : Re: [dev] Is OCResource::host() returns valid host for secured resource ? Perhaps one of the ?eps? (Endpoint list) code authors can give a definitive answer, but in my estimation, this isn?t a problem. The Host address may be just the CoAP address from which the /res response was sent, but if the Resource doesn?t expose an Unsecured Endpoint it would only have Secure ?ep? entries in its ?eps?. Again just my take; I?m not the Endpoint feature expert by any means. Thanks, Nathan From: iotivity-dev-bounces at lists.iotivity.org<mailto:iotivity-dev-bounces at lists.iotivity.org> [mailto:[email protected]] On Behalf Of Harish Kumara Marappa Sent: Tuesday, May 9, 2017 6:49 AM To: iotivity-dev at lists.iotivity.org<mailto:iotivity-dev at lists.iotivity.org> Subject: [dev] Is OCResource::host() returns valid host for secured resource ? Hi All, I have query on host information of a resource discovered through C++ API OCPlatform::findResource. Below are the logs I got at simpleclient application while simpleserver ran with option 2 (./simpleserver 2). [Note IoTivity is built with security enabled (SECURED=1)] ============================================== Found resource 85a4724e-452e-ca53-1b39-0565cfcaa097/a/light for the first time on server with ID: 85a4724e-452e-ca53-1b39-0565cfcaa097 DISCOVERED Resource: URI of the resource: /a/light Host address of the resource: coap://107.108.81.118:58991 List of resource types: core.light core.brightlight List of resource interfaces: oic.if.baseline oic.if.ll Host of resource: coap://107.108.81.118:58991 List of resource endpoints: coaps://107.108.81.118:48100 coaps+tcp://107.108.81.118:37259 Change host of resource endpoints Current host is coaps://107.108.81.118:48100 Address of selected resource: coaps://107.108.81.118:48100 ============================================= what I want to point out here is Host address of secured resource is showing different address which is not even in the endpoints list. I think Host address supposed to be one of endpoints, right ? Because of this application layer has to set secure resource's host with one of secure endpoints before using it. Regards, Harish Kumara M _______________________________________________ iotivity-dev mailing list iotivity-dev at lists.iotivity.org<mailto:iotivity-dev at lists.iotivity.org> https://lists.iotivity.org/mailman/listinfo/iotivity-dev [cid:image001.gif at 01D2C8F3.63604F70] [http://ext.samsung.net/mail/ext/v1/external/status/update?userid=bg.chun&do=bWFpbElEPTIwMTcwNTEwMDAxNDIzZXBjbXMxcDQwMjEwNzRlZmI4ODVjOThiNzQyOWI1ODhjMGI4YjcwMyZyZWNpcGllbnRBZGRyZXNzPWlvdGl2aXR5LWRldkBsaXN0cy5pb3Rpdml0eS5vcmc_] -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20170510/f9a3dc47/attachment.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 13402 bytes Desc: image001.gif URL: <http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20170510/f9a3dc47/attachment.gif>
