Modify to update default ACL of security resource
authorleechul <chuls.lee@samsung.com>
Wed, 9 Mar 2016 09:57:28 +0000 (18:57 +0900)
committerRandeep Singh <randeep.s@samsung.com>
Fri, 11 Mar 2016 04:11:05 +0000 (04:11 +0000)
commitc35094220f8fcfeaa40c4befc9e9c1883756fe3a
tree5194c8af2ee08972160355deddbd117751364131
parent47c277017baf1e4bed04f2b84132b2cc87bdfcfa
Modify to update default ACL of security resource
after ownership transfer is successfully completed.

Current default ACL of security resource can make a access permission issues.
If we do not update defualt ACL, anonymous user can access security resource.

For this reason, If ownership trnasfer is successfully completed,
the securiy resource ACL should be updated as follows:
{
  "sub":"Kg==",
  "rsrc":[
    "/oic/sec/doxm",
    "/oic/sec/pstat"
  ],
  "perms":2,
  "ownrs":[
    "cmFuZG9tUGluRGV2VVVJRA=="
  ]
},

In order to resolve this issues,
I've modified SRM to update security resource ACL
when 'owned' property of doxm is changed as 'true'.

[Patch #1] Intial upload
[Patch #2] Remove compile errors
[Patch #3] Update comments in source code.
[Patch #4] Update comment in source code.
[Patch #5] Retrigger
[Patch #6] Fix the bug which is occurred due to operator precedence.
[Patch #7] Remove default ACL provisioning step in ownership transfer.

Change-Id: Ia5eb62693168788cf1a607bb95ce97a44ce5b15d
Signed-off-by: leechul <chuls.lee@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/5625
Reviewed-by: Kyungsun Cho <goodsun.cho@samsung.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
Tested-by: Randeep Singh <randeep.s@samsung.com>
resource/csdk/security/include/internal/aclresource.h
resource/csdk/security/provisioning/src/ownershiptransfermanager.c
resource/csdk/security/src/aclresource.c
resource/csdk/security/src/doxmresource.c