Hi folks,

To clarify, the ?runtime option? (#2 and #3) is not equivalent to the compile 
switch Greg was describing.

The runtime option simply allows for ?unsecure? vertical resources (aka 
application resources) to be created in such a way that they can be accessed 
anonymously (e.g. via CoAP).  This is as opposed to requiring authenticated 
access (e.g. via CoAPS) for ?secure? vertical resources.

In contrast, the SECURED=0 build flag removes portions of the security 
functionality from the stack, in an attempt to make legacy applications and 
unit tests (those written before the security layer was added) function without 
having to adapt to the security model.

Whether or not such a build is still required, I do not know, but I think that 
at the very least the SECURED=1 mode should be the default ? and the only 
certifiable ? build option.

And if I had to throw my two cents in, I?d also vote for removing the SECURED=0 
build option entirely, unless we have a clear requirement to keep it, as it has 
been (and continues to be) a source of confusion and complexity.  All the apps 
and units tests that have not yet been adapted to the security model will have 
to be updated (e.g. ACL entries added for vertical resources, etc.) but this 
seems like a better option than perpetuating a confusing and superfluous build 
flag.

Thanks,
Nathan

From: iotivity-dev-bounces at lists.iotivity.org 
[mailto:iotivity-dev-boun...@lists.iotivity.org] On Behalf Of Gregg Reynolds
Sent: Wednesday, September 21, 2016 4:46 PM
To: Dave Thaler <dthaler at microsoft.com>
Cc: iotivity-dev at lists.iotivity.org
Subject: Re: [dev] SECURE build flag setting as default configuration


On Sep 21, 2016 6:34 PM, "Dave Thaler" <dthaler at microsoft.com<mailto:dthaler 
at microsoft.com>> wrote:
>
> Two responses?
>
>
>
> Gregg wrote:
>
> ?  fwiw imho SECURED should be removed from the build system altogether.  
> Non-encryption security features should just always be enabled.
>
>
>
> Agree.
>
>
>
> ?  But for debugging, something like --DISABLE_DTLS should be supported by 
> the build logic
>
>
> Disagree.    Debugging does not require a build-time option, just a run-time 
> option as Uze and I mentioned.
>
ok, but what kind of debugging?  if you need to debug packets over the wire you 
need to disable dtls.  But if you need to debug ACLs etc. maybe not?

by "runtime option" do you refer to setting security for resources?  it seems 
to me that a runtime option to turn off dtls is problematic. it would introduce 
a whole 'nother security issue to guard this, which AFAIK is not adressed by 
the OIC protocol dpec.  (Bear with me, I'm still learning this stuff).

gregg
> Uze subsequently wrote:
>
> > By investigating several option for secure resource setting by real 
> > execution, I can list up the three possible ways.
>
> 1)     SECURE=0 build
>
> 2)     SECURE=1 build, Create Resource with non-secure flag. 
> OCCreateResource(?. uint8_t 0)
>
> 3)     SECURE=1 build, Create Resource with secure flag. OCCreateResource(?. 
> uint8_t OC_SECURE)
>
>
>
> We should delete way #1 and leave ways 2 and 3.  The ?SECURED? flag can then 
> be deleted since it?s always 1.
>
>
>
> Dave
>
>
>
> From: Gregg Reynolds [mailto:dev at mobileink.com<mailto:dev at 
> mobileink.com>]
> Sent: Wednesday, September 21, 2016 7:05 AM
> To: Dave Thaler <dthaler at microsoft.com<mailto:dthaler at microsoft.com>>
> Cc: iotivity-dev at lists.iotivity.org<mailto:iotivity-dev at 
> lists.iotivity.org>; Thiago Macieira <thiago.macieira at 
> intel.com<mailto:thiago.macieira at intel.com>>
> Subject: RE: [dev] SECURE build flag setting as default configuration
>
>
>
> On Sep 20, 2016 4:27 PM, "Dave Thaler" <dthaler at 
> microsoft.com<mailto:dthaler at microsoft.com>> wrote:
> >
> > I've now thought about this some more and I am now convinced that we should 
> > remove
> > support for SECURE=0 builds (in master).
> >
> > As Uze mentioned, the choice to disable security should be a 
> > config/run-time decision, not
> > a compile-time decision.  There is no reason to consume build resources to 
> > build a version
> > that cannot even be configured to enable security.
> >
> agreed in general but I think there is still a "problem", namely that 
> "security" conflates multiple distinct functionalities.  encryption is one 
> thing; creds are another, and ACLs  yet another.
>
> fwiw imho SECURED should be removed from the build system altogether.  
> Non-encryption security features should just always be enabled.  But for 
> debugging, something like --DISABLE_DTLS should be supported by the build 
> logic.
>
> this suggests also that that API should be changed.  OCInit should be 
> parameterized by persistent storage, and client code should not have to 
> separately call an init function for persistent storage.  in other words 
> there should not be two ways to get going, one for SECURED=0 and one for 
> SECURED=1.  client app code should never need to make a secured/unsecured 
> distinction.  of course apps can still designate resources as secure or not 
> but that is a completely separate topic.
>
> my 2 cents.
>
> gregg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20160922/469f96a2/attachment.html>

Reply via email to