OpenMobileAlliance / OMA_LwM2M_for_Developers

OMA LightweightM2M public resources.
http://openmobilealliance.github.io/OMA_LwM2M_for_Developers/
Other
239 stars 52 forks source link

Is it mandatory to have bootstrap server information in 0/0 always? #245

Closed nivasvarma closed 5 years ago

nivasvarma commented 7 years ago

I have gone through the spec "OMA-TS-LightweightM2M-V1_0_1-20170704-A" and did not find any where on whether the bootstrap server details to be stored on the 0/0.

Could you let me know if I am missing this any where in the spec. I will come to actual issue. During client initiated bootstrap, server sends a put on 0/0 with LWM2M server details. In this case, if already bootstrap server details are available at 0/0, how should the LWM2M client behave? Does the client needs to over write? Does the client creates next available instance of security object?

It would be great help if some one shares thoughts and point me the relevant section of the spec.

Regards, Srini

hannestschofenig commented 6 years ago

You cannot use object 0/0 for a bootstrap server. The reason is that the LwM2M server object cannot point to a security object with the Short Server ID of value of 0

fdur commented 6 years ago

Hi Hannes are you sure that /0/0 is linked to short server ID = 0 ? :) From my point of view, /0/0 object instance can concern a bootstrap server.

hannestschofenig commented 6 years ago

Sorry. I wrote nonsense.

Here is the corrected version: You cannot use object 0/0 for a LwM2M server; you can only use it for the bootstrap server. The reason is that the LwM2M server object cannot point to a security object with the Short Server ID of value of 0.

ThGarnier commented 6 years ago

@nivasvarma Just to clarify :

For adressing your issue : when you say : "During client initiated bootstrap, server sends a put on 0/0 with LWM2M server details"; you want to say "...Bootstrap-Server send a PUT on /0/0 with the LwM2M Server details" right ? So YES, on principle nothing prevents the BOOSTRAP-SERVER to do bad things; it can decide to overwrite its own credentials or to provide a very bad configuration to the Client (wrong ACL configuration ...) ; that's why DISCOVER allows it to be aware of many things regarding the Client Configuration; this feature will be even enhanced in LwM2M 1.1 . BOOTSTRAP-SERVER has full priviledges so it must be handled with care. HOWEVER : (see section 5.2.6) when the BOOTSTRAP-FINISH is issued, the Client must perform consistency checks before leaving the Bootstrap sequence ; nothing prevents the Client to accept to go to death without fighting :-)
Clear enough ? Th

nivasvarma commented 6 years ago

Hi All, Appreciate your replies!!! Hi Garnier,

I understand that discover during the bootstrap provides me the data by which I can identify the security object instance where the bootstrap details are stored and avoid that to PUT the LWM2M server details. But the catch here is, discover is NOT a mandatory feature, hence it is difficult for us. Another point is, the stage of issuing discover during bootstrap. Can I issue discover at any stage of the bootstrap process? Just like below combinations

1) Discover --> Write 2) Write --> Discover 3) Delete --> Discover --> Write 4)Delete --> Write --> Discover

This is not clear in the spec.

ThGarnier commented 6 years ago

Hum !! what do you mean by not mandatory features; there is no optional command, whatever the interface is concerned; without DISCOVER command, incremental bootstrap is really problematic, I guess impossible !! right ? Why DISCOVER could be not used at any moment during the BOOTSTRAP process ? for sure it should be used at pertinent moment :-)

nivasvarma commented 6 years ago

Hi Garnier,

Sorry I could not respond to this as I got struck with some other priority tasks. for the query you asked " what do you mean by not mandatory features" is that "Discover during the bootstrap" is not a mandatory feature from client perspective. Hence client may not implemented this. Hence bootstrap server can not find out the already used instance of security object.

hannestschofenig commented 5 years ago

We believe this issue is addressed in the additional bootstrap server capabilities in v1.1.