From f829a81adcc170d1d8d9357a8a20b50aa4ba8cba Mon Sep 17 00:00:00 2001 From: Yonggoo Kang Date: Thu, 24 Mar 2016 23:29:21 +0900 Subject: [PATCH] Update db files and Fix json2cbor tool patch#1 : 1. Update dat/json files. 2. Fix json2cbor tool about CRED patch#2 : Rebase to resolve conflict, minor fix patch#3 : Resolve SVACE issue, check return value Change-Id: Ibcaa8f2d0588924e42ab8985dac7b15a82579c8c Signed-off-by: Yonggoo Kang Reviewed-on: https://gerrit.iotivity.org/gerrit/6301 Reviewed-by: Dmitriy Zhuravlev Reviewed-by: dongik Lee Reviewed-by: Jongsung Lee Tested-by: jenkins-iotivity Reviewed-by: Randeep Singh --- .../src/main/assets/oic_svr_db_client.json | 131 +++++++---- .../src/main/assets/oic_svr_db_client.json | 152 ++++++++---- .../src/main/assets/oic_svr_db_server.json | 183 +++++++++----- .../ck_manager/sample/oic_svr_db_door.dat | Bin .../ck_manager/sample/oic_svr_db_door.json | 176 +++++++------- .../ck_manager/sample/oic_svr_db_light.dat | Bin .../ck_manager/sample/oic_svr_db_light.json | 176 +++++++------- .../ck_manager/sample/oic_svr_db_pt.dat | Bin .../ck_manager/sample/oic_svr_db_pt.json | 157 ++++++------ .../ck_manager/unittest/test_data/CKMInfo.dat | Bin 350 -> 742 bytes .../ck_manager/unittest/test_data/CKMInfo.json | 147 ++++++++---- resource/csdk/security/src/credresource.c | 2 +- resource/csdk/security/tool/json2cbor.c | 178 ++++++-------- .../stack/samples/linux/secure/oic_amss_db.dat | Bin 896 -> 949 bytes .../stack/samples/linux/secure/oic_amss_db.json | 175 ++++++++------ .../samples/linux/secure/oic_svr_db_client.dat | Bin 936 -> 949 bytes .../samples/linux/secure/oic_svr_db_client.json | 176 ++++++++------ .../secure/oic_svr_db_client_directpairing.dat | Bin 674 -> 722 bytes .../secure/oic_svr_db_client_directpairing.json | 168 ++++++------- .../samples/linux/secure/oic_svr_db_server.dat | Bin 1650 -> 1728 bytes .../samples/linux/secure/oic_svr_db_server.json | 262 +++++++++++++-------- resource/examples/oic_svr_db_client.json | 152 ++++++++---- resource/examples/oic_svr_db_server.json | 170 ++++++++----- .../app/src/main/assets/oic_svr_db_client.dat | Bin 711 -> 709 bytes .../app/src/main/assets/oic_svr_db_client.json | 88 +++++++ .../secureResourceExample/oic_svr_db_client.json | 152 ++++++++---- .../secureResourceExample/oic_svr_db_server.json | 183 +++++++++----- 27 files changed, 1745 insertions(+), 1083 deletions(-) mode change 100755 => 100644 android/examples/simpleserver/src/main/assets/oic_svr_db_server.json mode change 100644 => 100755 resource/csdk/security/provisioning/ck_manager/sample/oic_svr_db_door.dat mode change 100644 => 100755 resource/csdk/security/provisioning/ck_manager/sample/oic_svr_db_door.json mode change 100644 => 100755 resource/csdk/security/provisioning/ck_manager/sample/oic_svr_db_light.dat mode change 100644 => 100755 resource/csdk/security/provisioning/ck_manager/sample/oic_svr_db_light.json mode change 100644 => 100755 resource/csdk/security/provisioning/ck_manager/sample/oic_svr_db_pt.dat mode change 100644 => 100755 resource/csdk/security/provisioning/ck_manager/sample/oic_svr_db_pt.json mode change 100755 => 100644 resource/examples/oic_svr_db_client.json mode change 100755 => 100644 resource/examples/oic_svr_db_server.json mode change 100644 => 100755 service/easy-setup/sampleapp/mediator/android/EasySetup/app/src/main/assets/oic_svr_db_client.dat create mode 100755 service/easy-setup/sampleapp/mediator/android/EasySetup/app/src/main/assets/oic_svr_db_client.json diff --git a/android/examples/provisioningclient/src/main/assets/oic_svr_db_client.json b/android/examples/provisioningclient/src/main/assets/oic_svr_db_client.json index 1219d6a..1089925 100644 --- a/android/examples/provisioningclient/src/main/assets/oic_svr_db_client.json +++ b/android/examples/provisioningclient/src/main/assets/oic_svr_db_client.json @@ -1,43 +1,88 @@ -{ - "acl": [ - { - "sub": "Kg==", - "rsrc": [ - "/oic/res", - "/oic/d", - "/oic/p", - "/oic/res/types/d", - "/oic/ad", - "/oic/sec/amacl" - ], - "perms": 2, - "ownrs" : ["YWRtaW5EZXZpY2VVVUlEMA=="] - }, - { - "sub": "Kg==", - "rsrc": [ - "/oic/sec/doxm", - "/oic/sec/pstat" - ], - "perms": 2, - "ownrs" : ["YWRtaW5EZXZpY2VVVUlEMA=="] - } - ], - "pstat": { - "isop": true, - "deviceid": "YWRtaW5EZXZpY2VVVUlEMA==", - "ch": 0, - "cm": 0, - "tm": 0, - "om": 3, - "sm": [3] - }, - "doxm": { - "oxm": [0], - "oxmsel": 0, - "sct": 1, - "owned": true, - "deviceid": "YWRtaW5EZXZpY2VVVUlEMA==", - "ownr": "YWRtaW5EZXZpY2VVVUlEMA==" - } -} +{ + "acl": { + "aclist": { + "aces": [ + { + "subjectuuid": "*", + "resources": [ + { + "href": "/oic/res", + "rel": "", + "rt": "", + "if": "" + }, + { + "href": "/oic/d", + "rel": "", + "rt": "", + "if": "" + }, + { + "href": "/oic/p", + "rel": "", + "rt": "", + "if": "" + }, + { + "href": "/oic/res/types/d", + "rel": "", + "rt": "", + "if": "" + }, + { + "href": "/oic/ad", + "rel": "", + "rt": "", + "if": "" + }, + { + "href": "/oic/sec/acl", + "rel": "", + "rt": "", + "if": "" + } + ], + "permission": 2 + }, + { + "subjectuuid": "*", + "resources": [ + { + "href": "/oic/sec/doxm", + "rel": "", + "rt": "", + "if": "" + } , + { + "href": "/oic/sec/pstat", + "rel": "", + "rt": "", + "if": "" + } + ], + "permission": 2 + } + ] + }, + "rowneruuid" : "61646d69-6e44-6576-6963-655555494430" + }, + "pstat": { + "isop": true, + "deviceuuid": "61646d69-6e44-6576-6963-655555494430", + "rowneruuid": "61646d69-6e44-6576-6963-655555494430", + "cm": 0, + "tm": 0, + "om": 3, + "sm": 3 + }, + "doxm": { + "oxms": [0], + "oxmsel": 0, + "sct": 1, + "owned": true, + "deviceuuid": "61646d69-6e44-6576-6963-655555494430", + "devowneruuid": "61646d69-6e44-6576-6963-655555494430", + "rowneruuid": "61646d69-6e44-6576-6963-655555494430", + "dpc": false + } +} \ No newline at end of file diff --git a/android/examples/simpleclient/src/main/assets/oic_svr_db_client.json b/android/examples/simpleclient/src/main/assets/oic_svr_db_client.json index c16acb8..c5b6ee8 100644 --- a/android/examples/simpleclient/src/main/assets/oic_svr_db_client.json +++ b/android/examples/simpleclient/src/main/assets/oic_svr_db_client.json @@ -1,50 +1,102 @@ -{ - "acl": [ - { - "sub": "Kg==", - "rsrc": [ - "/oic/res", - "/oic/d", - "/oic/p", - "/oic/res/types/d", - "/oic/ad", - "/oic/sec/acl" - ], - "perms": 2, - "ownrs" : ["MjIyMjIyMjIyMjIyMjIyMg=="] - }, - { - "sub": "Kg==", - "rsrc": [ - "/oic/sec/doxm", - "/oic/sec/pstat" - ], - "perms": 2, - "ownrs" : ["MjIyMjIyMjIyMjIyMjIyMg=="] - } - ], - "pstat": { - "isop": true, - "deviceid": "ZGV2aWNlaWQAAAAAABhanw==", - "ch": 0, - "cm": 0, - "tm": 0, - "om": 3, - "sm": [3] - }, - "doxm": { - "oxm": [0], - "oxmsel": 0, - "sct": 1, - "owned": true, - "deviceid": "MjIyMjIyMjIyMjIyMjIyMg==", - "ownr": "MjIyMjIyMjIyMjIyMjIyMg==" - }, - "cred": [{ - "credid": 1, - "sub": "MTExMTExMTExMTExMTExMQ==", - "credtyp": 1, - "pvdata": "QUFBQUFBQUFBQUFBQUFBQQ==", - "ownrs" : ["MjIyMjIyMjIyMjIyMjIyMg=="] - }] -} +{ + "acl": { + "aclist": { + "aces": [ + { + "subjectuuid": "*", + "resources": [ + { + "href": "/oic/res", + "rel": "", + "rt": "", + "if": "" + }, + { + "href": "/oic/d", + "rel": "", + "rt": "", + "if": "" + }, + { + "href": "/oic/p", + "rel": "", + "rt": "", + "if": "" + }, + { + "href": "/oic/res/types/d", + "rel": "", + "rt": "", + "if": "" + }, + { + "href": "/oic/ad", + "rel": "", + "rt": "", + "if": "" + }, + { + "href": "/oic/sec/acl", + "rel": "", + "rt": "", + "if": "" + } + ], + "permission": 2 + }, + { + "subjectuuid": "*", + "resources": [ + { + "href": "/oic/sec/doxm", + "rel": "", + "rt": "", + "if": "" + } , + { + "href": "/oic/sec/pstat", + "rel": "", + "rt": "", + "if": "" + } + ], + "permission": 2 + } + ] + }, + "rowneruuid" : "32323232-3232-3232-3232-323232323232" + }, + "pstat": { + "isop": true, + "deviceuuid": "32323232-3232-3232-3232-323232323232", + "rowneruuid": "32323232-3232-3232-3232-323232323232", + "cm": 0, + "tm": 0, + "om": 3, + "sm": 3 + }, + "doxm": { + "oxms": [0], + "oxmsel": 0, + "sct": 1, + "owned": true, + "deviceuuid": "32323232-3232-3232-3232-323232323232", + "devowneruuid": "32323232-3232-3232-3232-323232323232", + "rowneruuid": "32323232-3232-3232-3232-323232323232", + "dpc": false + }, + "cred": { + "creds": [ + { + "credid": 1, + "subjectuuid": "31313131-3131-3131-3131-313131313131", + "credtype": 1, + "privatedata": { + "data": "AAAAAAAAAAAAAAAA", + "encoding": "oic.sec.encoding.bytestream" + } + } + ], + "rowneruuid": "32323232-3232-3232-3232-323232323232" + } +} \ No newline at end of file diff --git a/android/examples/simpleserver/src/main/assets/oic_svr_db_server.json b/android/examples/simpleserver/src/main/assets/oic_svr_db_server.json old mode 100755 new mode 100644 index 729138c..1ab4505 --- a/android/examples/simpleserver/src/main/assets/oic_svr_db_server.json +++ b/android/examples/simpleserver/src/main/assets/oic_svr_db_server.json @@ -1,56 +1,127 @@ -{ - "acl": [ - { - "sub": "Kg==", - "rsrc": [ - "/oic/res", - "/oic/d", - "/oic/p", - "/oic/res/types/d", - "/oic/ad", - "/oic/sec/acl" - ], - "perms": 2, - "ownrs" : ["MTExMTExMTExMTExMTExMQ=="] - }, - { - "sub": "Kg==", - "rsrc": [ - "/oic/sec/doxm", - "/oic/sec/pstat" - ], - "perms": 2, - "ownrs" : ["MTExMTExMTExMTExMTExMQ=="] - }, - { - "sub": "Kg==", - "rsrc": ["/light0", "/light1", "/a/light"], - "perms": 6, - "ownrs" : ["MjIyMjIyMjIyMjIyMjIyMg=="] - } - ], - "pstat": { - "isop": true, - "deviceid": "ZGV2aWNlaWQAAAAAABhanw==", - "ch": 0, - "cm": 0, - "tm": 0, - "om": 3, - "sm": [3] - }, - "doxm": { - "oxm": [0], - "oxmsel": 0, - "sct": 1, - "owned": true, - "deviceid": "MTExMTExMTExMTExMTExMQ==", - "ownr": "MjIyMjIyMjIyMjIyMjIyMg==" - }, - "cred": [{ - "credid": 1, - "sub": "MjIyMjIyMjIyMjIyMjIyMg==", - "credtyp": 1, - "pvdata": "QUFBQUFBQUFBQUFBQUFBQQ==", - "ownrs" : ["MjIyMjIyMjIyMjIyMjIyMg=="] - }] -} +{ + "acl": { + "aclist": { + "aces": [ + { + "subjectuuid": "*", + "resources": [ + { + "href": "/oic/res", + "rel": "", + "rt": "", + "if": "" + }, + { + "href": "/oic/d", + "rel": "", + "rt": "", + "if": "" + }, + { + "href": "/oic/p", + "rel": "", + "rt": "", + "if": "" + }, + { + "href": "/oic/res/types/d", + "rel": "", + "rt": "", + "if": "" + }, + { + "href": "/oic/ad", + "rel": "", + "rt": "", + "if": "" + }, + { + "href": "/oic/sec/acl", + "rel": "", + "rt": "", + "if": "" + } + ], + "permission": 2 + }, + { + "subjectuuid": "*", + "resources": [ + { + "href": "/oic/sec/doxm", + "rel": "", + "rt": "", + "if": "" + } , + { + "href": "/oic/sec/pstat", + "rel": "", + "rt": "", + "if": "" + } + ], + "permission": 2 + }, + { + "subjectuuid": "*", + "resources": [ + { + "href": "/a/light", + "rel": "", + "rt": "", + "if": "" + }, + { + "href": "/a/light0", + "rel": "", + "rt": "", + "if": "" + }, + { + "href": "/a/light1", + "rel": "", + "rt": "", + "if": "" + } + ], + "permission": 6 + } + ] + }, + "rowneruuid" : "31313131-3131-3131-3131-313131313131" + }, + "pstat": { + "isop": true, + "deviceuuid": "31313131-3131-3131-3131-313131313131", + "rowneruuid": "31313131-3131-3131-3131-313131313131", + "cm": 0, + "tm": 0, + "om": 3, + "sm": 3 + }, + "doxm": { + "oxms": [0], + "oxmsel": 0, + "sct": 1, + "owned": true, + "deviceuuid": "31313131-3131-3131-3131-313131313131", + "devowneruuid": "32323232-3232-3232-3232-323232323232", + "rowneruuid": "31313131-3131-3131-3131-313131313131", + "dpc": false + }, + "cred": { + "creds": [ + { + "credid": 1, + "subjectuuid": "32323232-3232-3232-3232-323232323232", + "credtype": 1, + "privatedata": { + "data": "AAAAAAAAAAAAAAAA", + "encoding": "oic.sec.encoding.bytestream" + } + } + ], + "rowneruuid": "31313131-3131-3131-3131-313131313131" + } +} + diff --git a/resource/csdk/security/provisioning/ck_manager/sample/oic_svr_db_door.dat b/resource/csdk/security/provisioning/ck_manager/sample/oic_svr_db_door.dat old mode 100644 new mode 100755 diff --git a/resource/csdk/security/provisioning/ck_manager/sample/oic_svr_db_door.json b/resource/csdk/security/provisioning/ck_manager/sample/oic_svr_db_door.json old mode 100644 new mode 100755 index 0466033..f95349d --- a/resource/csdk/security/provisioning/ck_manager/sample/oic_svr_db_door.json +++ b/resource/csdk/security/provisioning/ck_manager/sample/oic_svr_db_door.json @@ -1,85 +1,93 @@ -{ - "acl": { - "aclist":{ - "aces":[ - { - "subjectuuid": "*", - "resources": [ - { - "href": "/oic/res", - "rt": "", - "if": "" - }, - { - "href": "/oic/res/d", - "rt": "", - "if": "" - }, - { - "href": "/oic/res/types/d", - "rt": "", - "if": "" - }, - { - "href": "/oic/presence", - "rt": "", - "if": "" - } - ], - "permission": 2 - }, - { - "subjectuuid": "*", - "resources": [ - { - "href": "/oic/sec/doxm", - "rt": "", - "if": "" - }, - { - "href": "/oic/sec/pstat", - "rt": "", - "if": "" - }, - { - "href": "/oic/sec/acl", - "rt": "", - "if": "" - }, - { - "href": "/oic/sec/crl", - "rt": "", - "if": "" - }, - { - "href": "/oic/sec/cred", - "rt": "", - "if": "" - } - ], - "permission": 6 - } - ] - }, - "rowneruuid" : "646F6F72-4465-7669-6365-555549443030" - }, - "pstat": { - "isop": false, - "deviceuuid": "646F6F72-4465-7669-6365-555549443030", - "rowneruuid": "646F6F72-4465-7669-6365-555549443030", - "cm": 2, - "tm": 0, - "om": 3, - "sm": 3 - }, - "doxm": { - "oxms": [0], - "oxmsel": 0, - "sct": 1, - "owned": false, - "didformat": 0, - "dpc": false, - "deviceuuid": "646F6F72-4465-7669-6365-555549443030", - "rowneruuid": "646F6F72-4465-7669-6365-555549443030" - } +{ + "acl": { + "aclist": { + "aces": [ + { + "subjectuuid": "*", + "resources": [ + { + "href": "/oic/res", + "rel": "", + "rt": "", + "if": "" + }, + { + "href": "/oic/res/d", + "rel": "", + "rt": "", + "if": "" + }, + { + "href": "/oic/res/types/d", + "rel": "", + "rt": "", + "if": "" + }, + { + "href": "/oic/presence", + "rel": "", + "rt": "", + "if": "" + } + ], + "permission": 2 + }, + { + "subjectuuid": "*", + "resources": [ + { + "href": "/oic/sec/doxm", + "rel": "", + "rt": "", + "if": "" + }, + { + "href": "/oic/sec/pstat", + "rel": "", + "rt": "", + "if": "" + }, + { + "href": "/oic/sec/acl", + "rel": "", + "rt": "", + "if": "" + }, + { + "href": "/oic/sec/crl", + "rel": "", + "rt": "", + "if": "" + }, + { + "href": "/oic/sec/cred", + "rel": "", + "rt": "", + "if": "" + } + ], + "permission": 6 + } + ] + }, + "rowneruuid" : "646F6F72-4465-7669-6365-555549443030" + }, + "pstat": { + "isop": false, + "deviceuuid": "646F6F72-4465-7669-6365-555549443030", + "rowneruuid": "646F6F72-4465-7669-6365-555549443030", + "cm": 2, + "tm": 0, + "om": 3, + "sm": 3 + }, + "doxm": { + "oxms": [0], + "oxmsel": 0, + "sct": 1, + "owned": false, + "deviceuuid": "646F6F72-4465-7669-6365-555549443030", + "rowneruuid": "646F6F72-4465-7669-6365-555549443030", + "dpc": false + } } diff --git a/resource/csdk/security/provisioning/ck_manager/sample/oic_svr_db_light.dat b/resource/csdk/security/provisioning/ck_manager/sample/oic_svr_db_light.dat old mode 100644 new mode 100755 diff --git a/resource/csdk/security/provisioning/ck_manager/sample/oic_svr_db_light.json b/resource/csdk/security/provisioning/ck_manager/sample/oic_svr_db_light.json old mode 100644 new mode 100755 index 2074cc2..a46d1b2 --- a/resource/csdk/security/provisioning/ck_manager/sample/oic_svr_db_light.json +++ b/resource/csdk/security/provisioning/ck_manager/sample/oic_svr_db_light.json @@ -1,85 +1,93 @@ -{ - "acl": { - "aclist":{ - "aces":[ - { - "subjectuuid": "*", - "resources": [ - { - "href": "/oic/res", - "rt": "", - "if": "" - }, - { - "href": "/oic/res/d", - "rt": "", - "if": "" - }, - { - "href": "/oic/res/types/d", - "rt": "", - "if": "" - }, - { - "href": "/oic/presence", - "rt": "", - "if": "" - } - ], - "permission": 2 - }, - { - "subjectuuid": "*", - "resources": [ - { - "href": "/oic/sec/doxm", - "rt": "", - "if": "" - }, - { - "href": "/oic/sec/pstat", - "rt": "", - "if": "" - }, - { - "href": "/oic/sec/acl", - "rt": "", - "if": "" - }, - { - "href": "/oic/sec/crl", - "rt": "", - "if": "" - }, - { - "href": "/oic/sec/cred", - "rt": "", - "if": "" - } - ], - "permission": 6 - } - ] - }, - "rowneruuid" : "6C696768-7444-6576-6963-655555494430" - }, - "pstat": { - "isop": false, - "deviceuuid": "6C696768-7444-6576-6963-655555494430", - "rowneruuid": "6C696768-7444-6576-6963-655555494430", - "cm": 2, - "tm": 0, - "om": 3, - "sm": 3 - }, - "doxm": { - "oxms": [0], - "oxmsel": 0, - "sct": 1, - "owned": false, - "dpc": false, - "didformat": 0, - "deviceuuid": "6C696768-7444-6576-6963-655555494430", - "rowneruuid": "6C696768-7444-6576-6963-655555494430" - } +{ + "acl": { + "aclist": { + "aces": [ + { + "subjectuuid": "*", + "resources": [ + { + "href": "/oic/res", + "rel": "", + "rt": "", + "if": "" + }, + { + "href": "/oic/res/d", + "rel": "", + "rt": "", + "if": "" + }, + { + "href": "/oic/res/types/d", + "rel": "", + "rt": "", + "if": "" + }, + { + "href": "/oic/presence", + "rel": "", + "rt": "", + "if": "" + } + ], + "permission": 2 + }, + { + "subjectuuid": "*", + "resources": [ + { + "href": "/oic/sec/doxm", + "rel": "", + "rt": "", + "if": "" + }, + { + "href": "/oic/sec/pstat", + "rel": "", + "rt": "", + "if": "" + }, + { + "href": "/oic/sec/acl", + "rel": "", + "rt": "", + "if": "" + }, + { + "href": "/oic/sec/crl", + "rel": "", + "rt": "", + "if": "" + }, + { + "href": "/oic/sec/cred", + "rel": "", + "rt": "", + "if": "" + } + ], + "permission": 6 + } + ] + }, + "rowneruuid" : "6C696768-7444-6576-6963-655555494430" + }, + "pstat": { + "isop": false, + "deviceuuid": "6C696768-7444-6576-6963-655555494430", + "rowneruuid": "6C696768-7444-6576-6963-655555494430", + "cm": 2, + "tm": 0, + "om": 3, + "sm": 3 + }, + "doxm": { + "oxms": [0], + "oxmsel": 0, + "sct": 1, + "owned": false, + "deviceuuid": "6C696768-7444-6576-6963-655555494430", + "rowneruuid": "6C696768-7444-6576-6963-655555494430", + "dpc": false + } } diff --git a/resource/csdk/security/provisioning/ck_manager/sample/oic_svr_db_pt.dat b/resource/csdk/security/provisioning/ck_manager/sample/oic_svr_db_pt.dat old mode 100644 new mode 100755 diff --git a/resource/csdk/security/provisioning/ck_manager/sample/oic_svr_db_pt.json b/resource/csdk/security/provisioning/ck_manager/sample/oic_svr_db_pt.json old mode 100644 new mode 100755 index b529754..2e33796 --- a/resource/csdk/security/provisioning/ck_manager/sample/oic_svr_db_pt.json +++ b/resource/csdk/security/provisioning/ck_manager/sample/oic_svr_db_pt.json @@ -1,75 +1,82 @@ -{ - "acl": { - "aclist":{ - "aces":[ - { - "subjectuuid": "*", - "resources": [ - { - "href": "/oic/res", - "rt": "", - "if": "" - }, - { - "href": "/oic/d", - "rt": "", - "if": "" - }, - { - "href": "/oic/p", - "rt": "", - "if": "" - }, - { - "href": "/oic/res/types/d", - "rt": "", - "if": "" - }, - { - "href": "/oic/ad", - "rt": "", - "if": "" - } - ], - "permission": 2 - }, - { - "subjectuuid": "*", - "resources": [ - { - "href": "/oic/sec/doxm", - "rt": "", - "if": "" - } , - { - "href": "/oic/sec/pstat", - "rt": "", - "if": "" - } - ], - "permission": 2 - } - ] - }, - "rowneruuid" : "61646D69-6E44-6576-6963-655555494430" - }, - "pstat": { - "isop": true, - "cm": 2, - "tm": 0, - "om": 3, - "sm": 3, - "deviceuuid": "61646D69-6E44-6576-6963-655575696430", - "rowneruuid": "61646D69-6E44-6576-6963-655575696430" - }, - "doxm": { - "oxms": [0], - "oxmsel": 0, - "sct": 1, - "owned": true, - "deviceuuid": "61646D69-6E44-6576-6963-655575696430", - "dpc": false, - "devowneruuid": "61646D69-6E44-6576-6963-655575696430", - "rowneruuid": "61646D69-6E44-6576-6963-655575696430" - } -} +{ + "acl": { + "aclist": { + "aces": [ + { + "subjectuuid": "*", + "resources": [ + { + "href": "/oic/res", + "rel": "", + "rt": "", + "if": "" + }, + { + "href": "/oic/d", + "rel": "", + "rt": "", + "if": "" + }, + { + "href": "/oic/p", + "rel": "", + "rt": "", + "if": "" + }, + { + "href": "/oic/res/types/d", + "rel": "", + "rt": "", + "if": "" + }, + { + "href": "/oic/ad", + "rel": "", + "rt": "", + "if": "" + } + ], + "permission": 2 + }, + { + "subjectuuid": "*", + "resources": [ + { + "href": "/oic/sec/doxm", + "rel": "", + "rt": "", + "if": "" + } , + { + "href": "/oic/sec/pstat", + "rel": "", + "rt": "", + "if": "" + } + ], + "permission": 2 + } + ] + }, + "rowneruuid" : "61646D69-6E44-6576-6963-655555494430" + }, + "pstat": { + "isop": true, + "deviceuuid": "61646D69-6E44-6576-6963-655575696430", + "rowneruuid": "61646D69-6E44-6576-6963-655575696430", + "cm": 2, + "tm": 0, + "om": 3, + "sm": 3 + }, + "doxm": { + "oxms": [0], + "oxmsel": 0, + "sct": 1, + "owned": true, + "deviceuuid": "61646D69-6E44-6576-6963-655575696430", + "devowneruuid": "61646D69-6E44-6576-6963-655575696430", + "rowneruuid": "61646D69-6E44-6576-6963-655575696430", + "dpc": false + } +} \ No newline at end of file diff --git a/resource/csdk/security/provisioning/ck_manager/unittest/test_data/CKMInfo.dat b/resource/csdk/security/provisioning/ck_manager/unittest/test_data/CKMInfo.dat index 0f1ecf1109871434d12737cf814ea220b6aec267..06454be2eb7981948cab1a1c5475e8383ffda0f9 100644 GIT binary patch literal 742 zcmb7=&q~BF5XQUi!58r)lqwq|eUtUpW-@hCn+M(|yyWO=9@lIdI^ch7R=uv%qCK^AVo zVN(d_3!$oF%c`EqQDO&({h62fjYZ0ay3cz}`4`m|omNE3w0onbZ@0#DKY$Q2Y1Vqc zMY|JN@}(b8G&@CzYk>bg5#XrP{o0wU7F`T?eZY@7`Sl^F=tt#d5|L zN7x%$ZeFA!V?S$&mkRLz{Q`6%eAq_M1?l-@12RUoe0zwGmM{+(@izu O7ZY=s>>H$okFRfZDg&1Q literal 350 zcmaKnI}XAy42B~ZxC=`*b|eGSJ|j~PlBfhqxXwJaX%XzP_uQH0wZ4Imly?wP+)`# ojak!GZ0atyTC!vhO{m4B@l2%vh9FuX;h%$m4$j!V{>8f90AoglPyhe` diff --git a/resource/csdk/security/provisioning/ck_manager/unittest/test_data/CKMInfo.json b/resource/csdk/security/provisioning/ck_manager/unittest/test_data/CKMInfo.json index d036473..dbdee77 100644 --- a/resource/csdk/security/provisioning/ck_manager/unittest/test_data/CKMInfo.json +++ b/resource/csdk/security/provisioning/ck_manager/unittest/test_data/CKMInfo.json @@ -1,48 +1,99 @@ -{ - "acl": [ - { - "sub": "Kg==", - "rsrc": [ - "/oic/res", - "/oic/d", - "/oic/p", - "/oic/res/types/d", - "/oic/ad" - ], - "perms": 2, - "ownrs" : ["YWRtaW5EZXZpY2VVVUlE"] - }, - { - "sub": "Kg==", - "rsrc": [ - "/oic/sec/doxm", - "/oic/sec/pstat", - "/oic/sec/acl", - "/oic/sec/cred" - ], - "perms": 7, - "ownrs" : ["YWRtaW5EZXZpY2VVVUlE"] - } - ], - "crl": { - "CRLId": 1, - "ThisUpdate": "MTUwMTAxMDAwMDAwWg==", - "CRLData": "LQ==" - }, - "pstat": { - "isop": true, - "deviceid": "YWRtaW5EZXZpY2VVVUlE", - "ch": 0, - "cm": 0, - "tm": 0, - "om": 3, - "sm": [3] - }, - "doxm": { - "oxm": [0], - "oxmsel": 0, - "owned": true, - "deviceid": "YWRtaW5EZXZpY2VVVUlE", - "ownr": "YWRtaW5EZXZpY2VVVUlE" - } -} +{ + "acl": { + "aclist": { + "aces": [ + { + "subjectuuid": "*", + "resources": [ + { + "href": "/oic/res", + "rel": "", + "rt": "", + "if": "" + }, + { + "href": "/oic/d", + "rel": "", + "rt": "", + "if": "" + }, + { + "href": "/oic/p", + "rel": "", + "rt": "", + "if": "" + }, + { + "href": "/oic/res/types/d", + "rel": "", + "rt": "", + "if": "" + }, + { + "href": "/oic/ad", + "rel": "", + "rt": "", + "if": "" + } + ], + "permission": 2 + }, + { + "subjectuuid": "*", + "resources": [ + { + "href": "/oic/sec/doxm", + "rel": "", + "rt": "", + "if": "" + } , + { + "href": "/oic/sec/pstat", + "rel": "", + "rt": "", + "if": "" + }, + { + "href": "/oic/sec/acl", + "rel": "", + "rt": "", + "if": "" + }, + { + "href": "/oic/sec/cred", + "rel": "", + "rt": "", + "if": "" + } + ], + "permission": 7 + } + ] + }, + "rowneruuid" : "61646d69-6e44-6576-6963-655555494430" + }, + "crl": { + "CRLId": 1, + "ThisUpdate": "150101000000Z", + "CRLData": "-" + }, + "pstat": { + "isop": true, + "deviceuuid": "61646d69-6e44-6576-6963-655555494430", + "rowneruuid": "61646d69-6e44-6576-6963-655555494430", + "cm": 0, + "tm": 0, + "om": 3, + "sm": 3 + }, + "doxm": { + "oxms": [0], + "oxmsel": 0, + "sct": 1, + "owned": true, + "deviceuuid": "61646d69-6e44-6576-6963-655555494430", + "devowneruuid": "61646d69-6e44-6576-6963-655555494430", + "rowneruuid": "61646d69-6e44-6576-6963-655555494430", + "dpc": false + } +} \ No newline at end of file diff --git a/resource/csdk/security/src/credresource.c b/resource/csdk/security/src/credresource.c index 26cf71f..7227bda 100644 --- a/resource/csdk/security/src/credresource.c +++ b/resource/csdk/security/src/credresource.c @@ -452,7 +452,7 @@ OCStackResult CBORPayloadToCred(const uint8_t *cborPayload, size_t size, VERIFY_SUCCESS(TAG, ret == OC_STACK_OK, ERROR); OICFree(subjectid); } - // subjectid + // credtype if (strcmp(name, OIC_JSON_CREDTYPE_NAME) == 0) { cborFindResult = cbor_value_get_uint64(&credMap, (uint64_t *) &cred->credType); diff --git a/resource/csdk/security/tool/json2cbor.c b/resource/csdk/security/tool/json2cbor.c index e10a79f..60710b0 100644 --- a/resource/csdk/security/tool/json2cbor.c +++ b/resource/csdk/security/tool/json2cbor.c @@ -215,7 +215,6 @@ static void ConvertJsonToCBOR(const char *jsonFileName, const char *cborFileName DeleteCredList(cred); } - cJSON_Delete(value); CborEncoder encoder = { {.ptr = NULL }, .end = 0 }; size_t cborSize = aclCborSize + pstatCborSize + doxmCborSize + svcCborSize + credCborSize + amaclCborSize; @@ -281,7 +280,14 @@ static void ConvertJsonToCBOR(const char *jsonFileName, const char *cborFileName if (fp1) { size_t bytesWritten = fwrite(outPayload, 1, s, fp1); - OIC_LOG_V(DEBUG, TAG, "Written %zu bytes", bytesWritten); + if (bytesWritten == s) + { + OIC_LOG_V(DEBUG, TAG, "Written %zu bytes", bytesWritten); + } + else + { + OIC_LOG_V(ERROR, TAG, "Failed writing %zu bytes", s); + } fclose(fp1); fp1 = NULL; } @@ -494,9 +500,6 @@ OicSecDoxm_t* JSONToDoxmBin(const char * jsonStr) cJSON *jsonObj = NULL; size_t jsonObjLen = 0; - unsigned char base64Buff[sizeof(((OicUuid_t*)0)->id)] = {}; - uint32_t outLen = 0; - B64Result b64Ret = B64_OK; cJSON *jsonRoot = cJSON_Parse(jsonStr); VERIFY_NON_NULL(TAG, jsonRoot, ERROR); @@ -645,10 +648,6 @@ OicSecPstat_t* JSONToPstatBin(const char * jsonStr) cJSON *jsonPstat = NULL; cJSON *jsonObj = NULL; - unsigned char base64Buff[sizeof(((OicUuid_t*) 0)->id)] = {}; - uint32_t outLen = 0; - B64Result b64Ret = B64_OK; - cJSON *jsonRoot = cJSON_Parse(jsonStr); VERIFY_NON_NULL(TAG, jsonRoot, INFO); @@ -710,37 +709,51 @@ exit: OicSecCred_t * JSONToCredBin(const char * jsonStr) { + + VERIFY_NON_NULL(TAG, jsonStr, ERROR); + OicSecCred_t *headCred = (OicSecCred_t*)OICCalloc(1, sizeof(OicSecCred_t)); + OCStackResult ret = OC_STACK_ERROR; - OicSecCred_t * headCred = NULL; - OicSecCred_t * prevCred = NULL; - cJSON *jsonCredArray = NULL; + cJSON *jsonRoot = NULL; - cJSON *jsonRoot = cJSON_Parse(jsonStr); + jsonRoot = cJSON_Parse(jsonStr); VERIFY_NON_NULL(TAG, jsonRoot, ERROR); - jsonCredArray = cJSON_GetObjectItem(jsonRoot, OIC_JSON_CRED_NAME); + cJSON *jsonCredMap = cJSON_GetObjectItem(jsonRoot, OIC_JSON_CRED_NAME); + VERIFY_NON_NULL(TAG, jsonCredMap, ERROR); + + // creds + cJSON *jsonCredArray = NULL; + jsonCredArray = cJSON_GetObjectItem(jsonCredMap, OIC_JSON_CREDS_NAME); VERIFY_NON_NULL(TAG, jsonCredArray, ERROR); + if (cJSON_Array == jsonCredArray->type) { int numCred = cJSON_GetArraySize(jsonCredArray); VERIFY_SUCCESS(TAG, numCred > 0, ERROR); - unsigned char base64Buff[sizeof(((OicUuid_t*)0)->id)] = {}; - uint32_t outLen = 0; - B64Result b64Ret = B64_OK; int idx = 0; do { cJSON *jsonCred = cJSON_GetArrayItem(jsonCredArray, idx); VERIFY_NON_NULL(TAG, jsonCred, ERROR); - OicSecCred_t *cred = (OicSecCred_t*)OICCalloc(1, sizeof(OicSecCred_t)); - VERIFY_NON_NULL(TAG, cred, ERROR); - - headCred = (headCred) ? headCred : cred; - if (prevCred) + OicSecCred_t *cred = NULL; + if(idx == 0) { - prevCred->next = cred; + cred = headCred; } + else + { + cred = (OicSecCred_t*)OICCalloc(1, sizeof(OicSecCred_t)); + OicSecCred_t *temp = headCred; + while (temp->next) + { + temp = temp->next; + } + temp->next = cred; + } + VERIFY_NON_NULL(TAG, cred, ERROR); + size_t jsonObjLen = 0; cJSON *jsonObj = NULL; @@ -756,84 +769,40 @@ OicSecCred_t * JSONToCredBin(const char * jsonStr) jsonObj = cJSON_GetObjectItem(jsonCred, OIC_JSON_SUBJECTID_NAME); VERIFY_NON_NULL(TAG, jsonObj, ERROR); VERIFY_SUCCESS(TAG, cJSON_String == jsonObj->type, ERROR); - outLen = 0; - memset(base64Buff, 0, sizeof(base64Buff)); - b64Ret = b64Decode(jsonObj->valuestring, strlen(jsonObj->valuestring), - base64Buff, sizeof(base64Buff), &outLen); - VERIFY_SUCCESS(TAG, (b64Ret == B64_OK && outLen <= sizeof(cred->subject.id)), - ERROR); - memcpy(cred->subject.id, base64Buff, outLen); + ret = ConvertStrToUuid(jsonObj->valuestring, &cred->subject); + VERIFY_SUCCESS(TAG, OC_STACK_OK == ret, ERROR); //CredType -- Mandatory jsonObj = cJSON_GetObjectItem(jsonCred, OIC_JSON_CREDTYPE_NAME); VERIFY_NON_NULL(TAG, jsonObj, ERROR); VERIFY_SUCCESS(TAG, cJSON_Number == jsonObj->type, ERROR); cred->credType = (OicSecCredType_t)jsonObj->valueint; - //PrivateData is mandatory for some of the credential types listed below. jsonObj = cJSON_GetObjectItem(jsonCred, OIC_JSON_PRIVATEDATA_NAME); - if ((cred->credType & SYMMETRIC_PAIR_WISE_KEY) || - (cred->credType & SYMMETRIC_GROUP_KEY) || - (cred->credType & PIN_PASSWORD)) - { - VERIFY_NON_NULL(TAG, jsonObj, ERROR); - VERIFY_SUCCESS(TAG, cJSON_String == jsonObj->type, ERROR); - } -#ifdef __WITH_X509__ - else if (cred->credType & SIGNED_ASYMMETRIC_KEY) - { - VERIFY_NON_NULL(TAG, jsonObj, ERROR); - VERIFY_SUCCESS(TAG, cJSON_Object == jsonObj->type, ERROR); - } -#endif // __WITH_X509__ + if (NULL != jsonObj) { - if (cJSON_String == jsonObj->type) - { - jsonObjLen = strlen(jsonObj->valuestring) + 1; - cred->privateData.data = (uint8_t *)OICCalloc(1, jsonObjLen); - VERIFY_NON_NULL(TAG, (cred->privateData.data), ERROR); - outLen = 0; - uint8_t pskKey[OWNER_PSK_LENGTH_256] = {}; - - memset(pskKey, 0, sizeof(pskKey)); - b64Ret = b64Decode(jsonObj->valuestring, strlen(jsonObj->valuestring), - pskKey, sizeof(pskKey), &outLen); - VERIFY_SUCCESS(TAG, (b64Ret == B64_OK && - outLen <= OWNER_PSK_LENGTH_256), ERROR); - memcpy(cred->privateData.data, pskKey, outLen); - cred->privateData.len = outLen; - } -#ifdef __WITH_X509__ - else if (SIGNED_ASYMMETRIC_KEY == cred->credType && cJSON_Object == jsonObj->type) - { - cred->privateData.data = cJSON_PrintUnformatted(jsonObj); - VERIFY_NON_NULL(TAG, (cred->privateData.data), ERROR); - } -#endif // __WITH_X509__ + cJSON *jsonPriv = cJSON_GetObjectItem(jsonObj, OIC_JSON_DATA_NAME); + VERIFY_NON_NULL(TAG, jsonPriv, ERROR); + jsonObjLen = strlen(jsonPriv->valuestring); + cred->privateData.data = (uint8_t *)OICCalloc(1, jsonObjLen); + VERIFY_NON_NULL(TAG, (cred->privateData.data), ERROR); + memcpy(cred->privateData.data, jsonPriv->valuestring, jsonObjLen); + cred->privateData.len = jsonObjLen; } #ifdef __WITH_X509__ //PublicData is mandatory only for SIGNED_ASYMMETRIC_KEY credentials type. jsonObj = cJSON_GetObjectItem(jsonCred, OIC_JSON_PUBLICDATA_NAME); - if (cred->credType & SIGNED_ASYMMETRIC_KEY) - { - VERIFY_NON_NULL(TAG, jsonObj, ERROR); - VERIFY_SUCCESS(TAG, cJSON_Object == jsonObj->type, ERROR); - } + if (NULL != jsonObj) { - if (cJSON_String == jsonObj->type) - { - jsonObjLen = strlen(jsonObj->valuestring) + 1; - cred->publicData.data = (uint8_t *)OICCalloc(1, jsonObjLen); - VERIFY_NON_NULL(TAG, (cred->publicData.data), ERROR); - memcpy(cred->publicData.data, jsonObj->valuestring, jsonObjLen); - } - else if (SIGNED_ASYMMETRIC_KEY == cred->credType && cJSON_Object == jsonObj->type) - { - cred->publicData.data = cJSON_PrintUnformatted(jsonObj); - VERIFY_NON_NULL(TAG, (cred->publicData.data), ERROR); - } + cJSON *jsonPub = cJSON_GetObjectItem(jsonObj, OIC_JSON_DATA_NAME); + VERIFY_NON_NULL(TAG, jsonPub, ERROR); + jsonObjLen = strlen(jsonPub->valuestring); + cred->publicData.data = (uint8_t *)OICCalloc(1, jsonObjLen); + VERIFY_NON_NULL(TAG, (cred->publicData.data), ERROR); + memcpy(cred->publicData.data, jsonPub->valuestring, jsonObjLen); + cred->publicData.len = jsonObjLen; } #endif // __WITH_X509__ //Period -- Not Mandatory @@ -846,35 +815,25 @@ OicSecCred_t * JSONToCredBin(const char * jsonStr) strncpy(cred->period, jsonObj->valuestring, jsonObjLen); } - //Owners -- Mandatory - jsonObj = cJSON_GetObjectItem(jsonCred, OIC_JSON_OWNERS_NAME); - VERIFY_NON_NULL(TAG, jsonObj, ERROR); - VERIFY_SUCCESS(TAG, cJSON_Array == jsonObj->type, ERROR); - cred->ownersLen = (size_t)cJSON_GetArraySize(jsonObj); - VERIFY_SUCCESS(TAG, cred->ownersLen > 0, ERROR); - cred->owners = (OicUuid_t*)OICCalloc(cred->ownersLen, sizeof(OicUuid_t)); - VERIFY_NON_NULL(TAG, (cred->owners), ERROR); - for(size_t i = 0; i < cred->ownersLen; i++) - { - cJSON *jsonOwnr = cJSON_GetArrayItem(jsonObj, i); - VERIFY_NON_NULL(TAG, jsonOwnr, ERROR); - VERIFY_SUCCESS(TAG, cJSON_String == jsonOwnr->type, ERROR); - outLen = 0; - memset(base64Buff, 0, sizeof(base64Buff)); - b64Ret = b64Decode(jsonOwnr->valuestring, strlen(jsonOwnr->valuestring), - base64Buff, sizeof(base64Buff), &outLen); - VERIFY_SUCCESS(TAG, (b64Ret == B64_OK && - outLen <= sizeof(cred->owners[i].id)), ERROR); - memcpy(cred->owners[i].id, base64Buff, outLen); - } - prevCred = cred; + cred->next = NULL; + } while( ++idx < numCred); } + // rownerid + cJSON *jsonCredObj = cJSON_GetObjectItem(jsonCredMap, OIC_JSON_ROWNERID_NAME); + VERIFY_NON_NULL(TAG, jsonCredObj, ERROR); + VERIFY_SUCCESS(TAG, cJSON_String == jsonCredObj->type, ERROR); + headCred->ownersLen = 1; + VERIFY_SUCCESS(TAG, headCred->ownersLen > 0, ERROR); + headCred->owners = (OicUuid_t*)OICCalloc(headCred->ownersLen, sizeof(OicUuid_t)); + VERIFY_NON_NULL(TAG, (headCred->owners), ERROR); + ret = ConvertStrToUuid(jsonCredObj->valuestring, &headCred->owners[0]); + VERIFY_SUCCESS(TAG, OC_STACK_OK == ret, ERROR); ret = OC_STACK_OK; exit: - cJSON_Delete(jsonRoot); + if (OC_STACK_OK != ret) { DeleteCredList(headCred); @@ -997,8 +956,7 @@ static OicSecAmacl_t* JSONToAmaclBin(const char * jsonStr) jsonAmacl = cJSON_GetObjectItem(jsonRoot, OIC_JSON_AMACL_NAME); VERIFY_NON_NULL(TAG, jsonAmacl, INFO); - size_t jsonObjLen = 0; - cJSON *jsonObj = NULL; + cJSON *jsonObj = NULL; // Resources -- Mandatory jsonObj = cJSON_GetObjectItem(jsonAmacl, OIC_JSON_RESOURCES_NAME); diff --git a/resource/csdk/stack/samples/linux/secure/oic_amss_db.dat b/resource/csdk/stack/samples/linux/secure/oic_amss_db.dat index ed2d10395026ab4e8d16b6c6ceedaec364ebe048..1d73bc704c91fc1cff7e8022cf05ad70dbbf80fa 100644 GIT binary patch literal 949 zcmb7D!A`?43|-l0aOH&5m98adSH6JbxGhcGHC@|ONjkRUcHuW*OoA`q%8?&}GsK++ zTh$?!D0by%JARJ)#wg2forhIywb15~QwDnZG|^R*0y9-5I6W5%w5*gx?$j3N<_HdtI^{2)@cAmuinXXYhnuPu69`_MKht04`{vn*QD7r%Jk^hirk zxzJk3;^ZLh<%U}RlZVS${^v!dHq`8S>|T^Ac~^kK?#|8vKN#R~Tf`QFI^S^q%!QWa zXUbtJ82mpzVtFSr_Q<>&>AZV%0UQ|*Utdt^MJGlDS%+z696&Ps_@Xk)Vy6$pCn4cv z;1UQ!mt0;EmkdZ?zi@?vFbpn^uAA|aec;US;rj|u>%}@oEx5Bg<@G!Gw%`@8h)eD=1MUNkqLjRKnQQ|brxc2PCN I1_}CK-`hq*G5`Po literal 896 zcmb7C!BWC75T)`NUOhQeYH5wrt6$&|Z=~5R4U(pl1cW18{0_kx$8Yf9(I1ktCWRt& za7L2JzVyA>?e1nj7-ge-k1sQeT$^X04E16)(BpK7%+O1&P|LBh?9&Qzg;^d*&H~G( z%Jfs7^*3}@(Qu3`56Q9)5SUqsI%xO|Dw#IeQN?Oxflc%_$zd&4K=m6A39g^u|UOPdJ%*E?mR zl^T1bXs24t+b8}VT#3E+HwSv&${gUR#WXV>x;kLZfkP&hpr&*q7lGt6-HBA(!V>@maegnoN_yVpR`5`z%(yB13 z4$)Zhlk#lGFL7Q46ZuVaze_wyau2`+()MvdCC^Z}vXsEiq(#!D^~~KKQj19%Ybj#C zD=g+SZrzN_WL9%Y#lca=bTFo=7rV7Vio3GsRSfH*@`@r9u~*SizWCu)J0de^l_Zk7 z7#@|qt);2&I-pnT&w~s(=6*#S9+X*qTc8cMyE?tRsBIje8ue}fg5v4Ra{$^5k^qm5Ci?2%Dsx7_t3j<0Y^;K)7SO^WWn6FO!cbWM4 SoHRQVzII5?B2&F3eSQI(TS0&T literal 936 zcmb7Cv2MaJ5KZ7SI&|q&2@-;e#MnRRz(6+~--R5-abz0`BP{)nf~uY7z48(VIQ6*Z#z*G^b_4{8RDv0==5Q11rPf>29G*kY zKY%NQ;rj+1>eW-?kie(!z!opr=@z@?pmOY$ZYOnhE`R=Au4v8-0yAurx{Ld|xvs1f zGcJL$@#4(pzipG)E}3?`G^mY2CK4MulCU_B!p>FL>xP4{7upp>VZR^tqi_&K?q1XS F=NHFPG@1Ya diff --git a/resource/csdk/stack/samples/linux/secure/oic_svr_db_client.json b/resource/csdk/stack/samples/linux/secure/oic_svr_db_client.json index 90f0f85..1bff7cd 100644 --- a/resource/csdk/stack/samples/linux/secure/oic_svr_db_client.json +++ b/resource/csdk/stack/samples/linux/secure/oic_svr_db_client.json @@ -1,70 +1,108 @@ -{ - "acl": - { - "aclist": - { - "aces": - [ - { - "subject": "*", - "resources": - [ - {"href": "/oic/res", "rt": "", "if": ""}, - {"href": "/oic/d", "rt": "", "if": ""}, - {"href": "/oic/p", "rt": "", "if": ""}, - {"href": "/oic/res/types/d", "rt": "", "if": ""}, - {"href": "/oic/ad", "rt": "", "if": ""}, - {"href": "/oic/sec/acl", "rt": "", "if": ""}, - {"href": "/oic/sec/amacl", "rt": "", "if": ""} - ], - "permission": 2 - }, - { - "subject": "*", - "resources": - [ - {"href": "/oic/sec/doxm", "rt": "", "if": ""}, - {"href": "/oic/sec/pstat", "rt": "", "if": ""} - ], - "permission": 2 - } - ] - }, - "rownerid": "32323232-3232-3232-3232-323232323232" - }, - - "pstat": - { - "isop": true, - "deviceid": "32323232-3232-3232-3232-323232323232", - "cm": 2, - "tm": 0, - "om": 3, - "sm": [3], - "rownerid": "32323232-3232-3232-3232-323232323232" - }, - - "doxm": - { - "oxms": [0], - "oxmsel": 0, - "sct": 1, - "owned": true, - "didformat": 0, - "deviceid": "32323232-3232-3232-3232-323232323232", - "devownerid": "32323232-3232-3232-3232-323232323232", - "rownerid": "32323232-3232-3232-3232-323232323232" - }, - - "cred": - [ - { - "credid": 1, - "subject": "MTExMTExMTExMTExMTExMQ==", - "credtype": 1, - "period": "20150630T060000/20990920T220000", - "privatedata": "QUFBQUFBQUFBQUFBQUFBQQ==", - "ownrs" : ["MjIyMjIyMjIyMjIyMjIyMg=="] - } - ] +{ + "acl": { + "aclist": { + "aces": [ + { + "subjectuuid": "*", + "resources": [ + { + "href": "/oic/res", + "rel": "", + "rt": "", + "if": "" + }, + { + "href": "/oic/d", + "rel": "", + "rt": "", + "if": "" + }, + { + "href": "/oic/p", + "rel": "", + "rt": "", + "if": "" + }, + { + "href": "/oic/res/types/d", + "rel": "", + "rt": "", + "if": "" + }, + { + "href": "/oic/ad", + "rel": "", + "rt": "", + "if": "" + }, + { + "href": "/oic/sec/acl", + "rel": "", + "rt": "", + "if": "" + }, + { + "href": "/oic/sec/amacl", + "rel": "", + "rt": "", + "if": "" + } + ], + "permission": 2 + }, + { + "subjectuuid": "*", + "resources": [ + { + "href": "/oic/sec/doxm", + "rel": "", + "rt": "", + "if": "" + } , + { + "href": "/oic/sec/pstat", + "rel": "", + "rt": "", + "if": "" + } + ], + "permission": 2 + } + ] + }, + "rowneruuid" : "32323232-3232-3232-3232-323232323232" + }, + "pstat": { + "isop": true, + "deviceuuid": "32323232-3232-3232-3232-323232323232", + "rowneruuid": "32323232-3232-3232-3232-323232323232", + "cm": 2, + "tm": 0, + "om": 3, + "sm": 3 + }, + "doxm": { + "oxms": [0], + "oxmsel": 0, + "sct": 1, + "owned": true, + "deviceuuid": "32323232-3232-3232-3232-323232323232", + "devowneruuid": "32323232-3232-3232-3232-323232323232", + "rowneruuid": "32323232-3232-3232-3232-323232323232", + "dpc": false + }, + "cred": { + "creds": [ + { + "credid": 1, + "subjectuuid": "31313131-3131-3131-3131-313131313131", + "credtype": 1, + "privatedata": { + "data": "AAAAAAAAAAAAAAAA", + "encoding": "oic.sec.encoding.bytestream" + } + } + ], + "rowneruuid": "32323232-3232-3232-3232-323232323232" + } } \ No newline at end of file diff --git a/resource/csdk/stack/samples/linux/secure/oic_svr_db_client_directpairing.dat b/resource/csdk/stack/samples/linux/secure/oic_svr_db_client_directpairing.dat index aa67b488bad630de6c22b56b774695bf66bd3cec..35364e83f88497b9757029380b2acb179b0b7299 100644 GIT binary patch literal 722 zcmb7AOHRWu5KUW&ldwXH5+HTNP0B9uc%nMQvE^}~U4qzg3O*8?fGwBm9_*w*D@B5O zF=Nep^XAQbKncy|CSrO{zWV;R?9?7NPHD6 zHU+n?;Ib+Ptm-i_f|&2F#H|fdGR9Fo$9QRM0rx~|gH}l*soUva1_v2JNQ7RgJ(z)dhL fBMvv!_$_wskZxZba-3oa{V&ArJJ>e}1Dnq;%?$b= literal 674 zcmb7AOHRWu5KUW&ldwXH5+HTNP1;@K@r1aFW6R@~vMk~v&;{ZQEVxwnV5d#`Ss?1g z%;-J8nK$zd1=Q2Q^u6?1l6w;cAiZoJX~E|RuDFpFNiVENUpJz%SXPOaka(0^H{-IL z?clP7#VKgIzlnP`NXZ$kTH5$t*Z_9Yxk0NWk<`ubFC#lOAtXYtRHxp#Y1+<#Gvo?) zO4dE;mp-KqJ;7q{_Q=syW%W~oR*Ka%%h*GH$HpgBo(DBCgellUk21oG!v;CSRW+(K;$a!a4#1H^8um*h(QqsjVtp kbfLMq-=)7rx_@!VAz)wanKV5z-(iPOhpOX17});&0?@VOfdBvi diff --git a/resource/csdk/stack/samples/linux/secure/oic_svr_db_client_directpairing.json b/resource/csdk/stack/samples/linux/secure/oic_svr_db_client_directpairing.json index 8280333..047cd47 100644 --- a/resource/csdk/stack/samples/linux/secure/oic_svr_db_client_directpairing.json +++ b/resource/csdk/stack/samples/linux/secure/oic_svr_db_client_directpairing.json @@ -1,80 +1,88 @@ -{ - "acl": { - "aclist":{ - "aces":[ - { - "subject": "*", - "resources": [ - { - "href": "/oic/res", - "rt": "", - "if": "" - }, - { - "href": "/oic/d", - "rt": "", - "if": "" - }, - { - "href": "/oic/res/types/d", - "rt": "", - "if": "" - }, - { - "href": "/oic/presence", - "rt": "", - "if": "" - } - ], - "permission": 2 - }, - { - "subject": "*", - "resources": [ - { - "href": "/oic/sec/doxm", - "rt": "", - "if": "" - }, - { - "href": "/oic/sec/pstat", - "rt": "", - "if": "" - }, - { - "href": "/oic/sec/acl", - "rt": "", - "if": "" - }, - { - "href": "/oic/sec/cred", - "rt": "", - "if": "" - } - ], - "permission": 6 - } - ] - }, - "rownerid" : "64697265-6374-7061-6972-696e67446576" - }, - "pstat": { - "isop": false, - "cm": 2, - "tm": 0, - "om": 3, - "sm": [3], - "deviceid": "64697265-6374-7061-6972-696e67446576", - "rownerid": "64697265-6374-7061-6972-696e67446576" - }, - "doxm": { - "oxms": [0], - "oxmsel": 0, - "sct": 1, - "owned": false, - "didformat": 0, - "deviceid": "64697265-6374-7061-6972-696e67446576", - "dpc": false, - "devownerid": "" - } -} +{ + "acl": { + "aclist": { + "aces": [ + { + "subjectuuid": "*", + "resources": [ + { + "href": "/oic/res", + "rel": "", + "rt": "", + "if": "" + }, + { + "href": "/oic/d", + "rel": "", + "rt": "", + "if": "" + }, + { + "href": "/oic/res/types/d", + "rel": "", + "rt": "", + "if": "" + }, + { + "href": "/oic/presence", + "rel": "", + "rt": "", + "if": "" + } + ], + "permission": 2 + }, + { + "subjectuuid": "*", + "resources": [ + { + "href": "/oic/sec/doxm", + "rel": "", + "rt": "", + "if": "" + }, + { + "href": "/oic/sec/pstat", + "rel": "", + "rt": "", + "if": "" + }, + { + "href": "/oic/sec/acl", + "rel": "", + "rt": "", + "if": "" + }, + { + "href": "/oic/sec/cred", + "rel": "", + "rt": "", + "if": "" + } + ], + "permission": 6 + } + ] + }, + "rowneruuid" : "64697265-6374-7061-6972-696e67446576" + }, + "pstat": { + "isop": false, + "deviceuuid": "64697265-6374-7061-6972-696e67446576", + "rowneruuid": "64697265-6374-7061-6972-696e67446576", + "cm": 2, + "tm": 0, + "om": 3, + "sm": 3 + }, + "doxm": { + "oxms": [0], + "oxmsel": 0, + "sct": 1, + "owned": false, + "deviceuuid": "64697265-6374-7061-6972-696e67446576", + "devowneruuid": "", + "rowneruuid": "64697265-6374-7061-6972-696e67446576", + "dpc": false + } +} \ No newline at end of file diff --git a/resource/csdk/stack/samples/linux/secure/oic_svr_db_server.dat b/resource/csdk/stack/samples/linux/secure/oic_svr_db_server.dat index 5add760701b56387378649f1b8a2c243ca901054..a3a5e32bf78e353233406416c153b44498d4415c 100644 GIT binary patch literal 1728 zcmb_c-EPw`6mC}u@eF`OFStOcZPErhMN=<2Z4;Bm-_(iau8DoJI!l_!cDD4gmA3bw zP{9*$%M0*0a1C~{G-+r{i?HQ$5`X^r&Y!;_6S+p^`_vYiF#Z9X2-wZXOBPxVARdMU zo6iUZ=7&@ux1aEUf;~`tf)p`}D7bx#^1emveu6nErr;%LFh}_)0Je0^MZCsbw%v^( z21pTnmmELLaId(+34nTpG2#z*RvI`-jPT~?U_bKKUKB8H@`V*EFN&UMt)$nbDu@)z zynRRJZ$@Wi1&u|o<*3}B<%24yG?SiZp=nxO3{88U^o+_l@r$jPio5!bd$#Z~@$n>j z+)|q_)V8Mf)V3;`GXHP2!4tuQM?AK+eE% z^dN7-oOJ9!hx*q;pt2J4K@-ud%K&B~4JgDJc|Q7#3G;)W4u&g&VDtSJ@=6vL!}lr{ z^D0{tz_Mn}zkZR5jZ3yv;Fb_WybRJ9ygeybSdsU`26ePGZ-fK%L)H&A%CjlR4>pb3mKI^WoA$C@UDw-U==$@t7slh%cUu9wb{9>QW3Rlwu#^S@h`W^zdE(U~qgg+-vR+4+g{jt2eFY`@>fA=rnrz zJ8GV_n&!*B=GklW_@pmv_av9HrYwOtxoYRrTSQn8-Z=H%KclAJ4iDPplfwQNZqq7eQ-vRH=o+c}mWY<6Qy zNl=|Ep0Fg8n;4h-s0U^>$Ecj=16hBK|0PC|<;lc&s{^rej@k z%s9osTNKu+>tz_Kp{ZtCR~he}CEi`#5EsRe*QPp2l^o9Bc<)!*|K(lI*#=Sm`3rrR B3>*Le diff --git a/resource/csdk/stack/samples/linux/secure/oic_svr_db_server.json b/resource/csdk/stack/samples/linux/secure/oic_svr_db_server.json index 63228b6..83dd98a 100644 --- a/resource/csdk/stack/samples/linux/secure/oic_svr_db_server.json +++ b/resource/csdk/stack/samples/linux/secure/oic_svr_db_server.json @@ -1,105 +1,159 @@ -{ - "acl": - { - "aclist": - { - "aces": - [ - { - "subject": "*", - "resources": - [ - {"href": "/oic/res", "rt": "", "if": ""}, - {"href": "/oic/res/d", "rt": "", "if": ""}, - {"href": "/oic/res/types/d", "rt": "", "if": ""}, - {"href": "/oic/ad", "rt": "", "if": ""}, - {"href": "/oic/sec/acl", "rt": "", "if": ""}, - {"href": "/oic/sec/amacl", "rt": "", "if": ""} - ], - "permission": 2 - }, - { - "subject": "*", - "resources": - [ - {"href": "/oic/sec/doxm", "rt": "", "if": ""}, - {"href": "/oic/sec/pstat", "rt": "", "if": ""} - ], - "permission": 2 - }, - { - "subject": "32323232-3232-3232-3232-323232323232", - "resources": - [ - {"href": "/oic/sec/acl", "rt": "", "if": ""}, - {"href": "/oic/sec/cred", "rt": "", "if": ""} - ], - "permission": 8 - }, - { - "subject": "31313131-3232-3232-3333-333334343434", - "resources": - [ - {"href": "/a/led", "rt": "", "if": ""} - ], - "permission": 6, - "period" : ["20150630T060000/20150630T220000", "20150630T060000/20150630T200000"], - "recurrence" : ["FREQ=DAILY; BYDAY=MO, WE, FR", "FREQ=DAILY; BYDAY=TU, TH; UNTIL=20160630"] - }, - { - "subject": "37373737-3737-3737-3737-373737373737", - "resources": - [ - {"href": "/a/led", "rt": "", "if": ""} - ], - "permission": 6, - "period" : ["20150630T060000/20150630T220000"], - "recurrence" : ["FREQ=DAILY; UNTIL=20150630"] - } - ] - }, - "rownerid": "31313131-3131-3131-3131-313131313131" - }, - - "pstat": - { - "isop": true, - "deviceid": "31313131-3131-3131-3131-313131313131", - "cm": 0, - "tm": 0, - "om": 3, - "sm": [3], - "rownerid": "31313131-3131-3131-3131-313131313131" - }, - - "doxm": - { - "oxms": [0], - "oxmsel": 0, - "sct": 1, - "owned": true, - "didformat": 0, - "deviceid": "31313131-3131-3131-3131-313131313131", - "devownerid": "32323232-3232-3232-3232-323232323232", - "rownerid": "31313131-3131-3131-3131-313131313131" - }, - "cred": - [ - { - "credid": 1, - "subject": "MjIyMjIyMjIyMjIyMjIyMg==", - "credtype": 1, - "period": "20150630T060000/20990920T220000", - "privatedata": "QUFBQUFBQUFBQUFBQUFBQQ==", - "ownrs" : ["MjIyMjIyMjIyMjIyMjIyMg=="] - }, - { - "credid": 2, - "subject": "MTkxOTE5MTkxOTE5MTkxOQ==", - "credtype": 1, - "period": "20150630T060000/20990920T220000", - "privatedata": "QkJCQkJCQkJCQkJCQkJCQg==", - "ownrs" : ["MTkxOTE5MTkxOTE5MTkxOQ=="] - } - ] +{ + "acl": { + "aclist": { + "aces": [ + { + "subjectuuid": "*", + "resources": [ + { + "href": "/oic/res", + "rel": "", + "rt": "", + "if": "" + }, + { + "href": "/oic/res/d", + "rel": "", + "rt": "", + "if": "" + }, + { + "href": "/oic/res/types/d", + "rel": "", + "rt": "", + "if": "" + }, + { + "href": "/oic/ad", + "rel": "", + "rt": "", + "if": "" + }, + { + "href": "/oic/sec/acl", + "rel": "", + "rt": "", + "if": "" + }, + { + "href": "/oic/sec/amacl", + "rel": "", + "rt": "", + "if": "" + } + ], + "permission": 2 + }, + { + "subjectuuid": "*", + "resources": [ + { + "href": "/oic/sec/doxm", + "rel": "", + "rt": "", + "if": "" + } , + { + "href": "/oic/sec/pstat", + "rel": "", + "rt": "", + "if": "" + } + ], + "permission": 2 + }, + { + "subjectuuid": "32323232-3232-3232-3232-323232323232", + "resources": [ + { + "href": "/oic/sec/acl", + "rel": "", + "rt": "", + "if": "" + } , + { + "href": "/oic/sec/cred", + "rel": "", + "rt": "", + "if": "" + } + ], + "permission": 8 + }, + { + "subjectuuid": "31313131-3232-3232-3333-333334343434", + "resources": [ + { + "href": "/a/led", + "rel": "", + "rt": "", + "if": "" + } + ], + "permission": 6, + "period" : ["20150630T060000/20150630T220000", "20150630T060000/20150630T200000"], + "recurrence" : ["FREQ=DAILY; BYDAY=MO, WE, FR", "FREQ=DAILY; BYDAY=TU, TH; UNTIL=20160630"] + }, + { + "subjectuuid": "37373737-3737-3737-3737-373737373737", + "resources": [ + { + "href": "/a/led", + "rel": "", + "rt": "", + "if": "" + } + ], + "permission": 6, + "period" : ["20150630T060000/20150630T220000"], + "recurrence" : ["FREQ=DAILY; UNTIL=20150630"] + } + ] + }, + "rowneruuid" : "31313131-3131-3131-3131-313131313131" + }, + "pstat": { + "isop": true, + "deviceuuid": "31313131-3131-3131-3131-313131313131", + "rowneruuid": "31313131-3131-3131-3131-313131313131", + "cm": 0, + "tm": 0, + "om": 3, + "sm": 3 + }, + "doxm": { + "oxms": [0], + "oxmsel": 0, + "sct": 1, + "owned": true, + "deviceuuid": "31313131-3131-3131-3131-313131313131", + "devowneruuid": "32323232-3232-3232-3232-323232323232", + "rowneruuid": "31313131-3131-3131-3131-313131313131", + "dpc": false + }, + "cred": { + "creds": [ + { + "credid": 1, + "subjectuuid": "32323232-3232-3232-3232-323232323232", + "credtype": 1, + "period": "20150630T060000/20990920T220000", + "privatedata": { + "data": "AAAAAAAAAAAAAAAA", + "encoding": "oic.sec.encoding.bytestream" + } + }, + { + "credid": 2, + "subjectuuid": "31393139-3139-3139-3139-313931393139", + "credtype": 1, + "period": "20150630T060000/20990920T220000", + "privatedata": { + "data": "BBBBBBBBBBBBBBBB", + "encoding": "oic.sec.encoding.bytestream" + } + } + ], + "rowneruuid": "32323232-3232-3232-3232-323232323232" + } } \ No newline at end of file diff --git a/resource/examples/oic_svr_db_client.json b/resource/examples/oic_svr_db_client.json old mode 100755 new mode 100644 index c16acb8..c5b6ee8 --- a/resource/examples/oic_svr_db_client.json +++ b/resource/examples/oic_svr_db_client.json @@ -1,50 +1,102 @@ -{ - "acl": [ - { - "sub": "Kg==", - "rsrc": [ - "/oic/res", - "/oic/d", - "/oic/p", - "/oic/res/types/d", - "/oic/ad", - "/oic/sec/acl" - ], - "perms": 2, - "ownrs" : ["MjIyMjIyMjIyMjIyMjIyMg=="] - }, - { - "sub": "Kg==", - "rsrc": [ - "/oic/sec/doxm", - "/oic/sec/pstat" - ], - "perms": 2, - "ownrs" : ["MjIyMjIyMjIyMjIyMjIyMg=="] - } - ], - "pstat": { - "isop": true, - "deviceid": "ZGV2aWNlaWQAAAAAABhanw==", - "ch": 0, - "cm": 0, - "tm": 0, - "om": 3, - "sm": [3] - }, - "doxm": { - "oxm": [0], - "oxmsel": 0, - "sct": 1, - "owned": true, - "deviceid": "MjIyMjIyMjIyMjIyMjIyMg==", - "ownr": "MjIyMjIyMjIyMjIyMjIyMg==" - }, - "cred": [{ - "credid": 1, - "sub": "MTExMTExMTExMTExMTExMQ==", - "credtyp": 1, - "pvdata": "QUFBQUFBQUFBQUFBQUFBQQ==", - "ownrs" : ["MjIyMjIyMjIyMjIyMjIyMg=="] - }] -} +{ + "acl": { + "aclist": { + "aces": [ + { + "subjectuuid": "*", + "resources": [ + { + "href": "/oic/res", + "rel": "", + "rt": "", + "if": "" + }, + { + "href": "/oic/d", + "rel": "", + "rt": "", + "if": "" + }, + { + "href": "/oic/p", + "rel": "", + "rt": "", + "if": "" + }, + { + "href": "/oic/res/types/d", + "rel": "", + "rt": "", + "if": "" + }, + { + "href": "/oic/ad", + "rel": "", + "rt": "", + "if": "" + }, + { + "href": "/oic/sec/acl", + "rel": "", + "rt": "", + "if": "" + } + ], + "permission": 2 + }, + { + "subjectuuid": "*", + "resources": [ + { + "href": "/oic/sec/doxm", + "rel": "", + "rt": "", + "if": "" + } , + { + "href": "/oic/sec/pstat", + "rel": "", + "rt": "", + "if": "" + } + ], + "permission": 2 + } + ] + }, + "rowneruuid" : "32323232-3232-3232-3232-323232323232" + }, + "pstat": { + "isop": true, + "deviceuuid": "32323232-3232-3232-3232-323232323232", + "rowneruuid": "32323232-3232-3232-3232-323232323232", + "cm": 0, + "tm": 0, + "om": 3, + "sm": 3 + }, + "doxm": { + "oxms": [0], + "oxmsel": 0, + "sct": 1, + "owned": true, + "deviceuuid": "32323232-3232-3232-3232-323232323232", + "devowneruuid": "32323232-3232-3232-3232-323232323232", + "rowneruuid": "32323232-3232-3232-3232-323232323232", + "dpc": false + }, + "cred": { + "creds": [ + { + "credid": 1, + "subjectuuid": "31313131-3131-3131-3131-313131313131", + "credtype": 1, + "privatedata": { + "data": "AAAAAAAAAAAAAAAA", + "encoding": "oic.sec.encoding.bytestream" + } + } + ], + "rowneruuid": "32323232-3232-3232-3232-323232323232" + } +} \ No newline at end of file diff --git a/resource/examples/oic_svr_db_server.json b/resource/examples/oic_svr_db_server.json old mode 100755 new mode 100644 index b6bb1eb..495403d --- a/resource/examples/oic_svr_db_server.json +++ b/resource/examples/oic_svr_db_server.json @@ -1,56 +1,114 @@ -{ - "acl": [ - { - "sub": "Kg==", - "rsrc": [ - "/oic/res", - "/oic/d", - "/oic/p", - "/oic/res/types/d", - "/oic/ad", - "/oic/sec/acl" - ], - "perms": 2, - "ownrs" : ["MTExMTExMTExMTExMTExMQ=="] - }, - { - "sub": "Kg==", - "rsrc": [ - "/oic/sec/doxm", - "/oic/sec/pstat" - ], - "perms": 2, - "ownrs" : ["MTExMTExMTExMTExMTExMQ=="] - }, - { - "sub": "Kg==", - "rsrc": ["/a/light"], - "perms": 6, - "ownrs" : ["MjIyMjIyMjIyMjIyMjIyMg=="] - } - ], - "pstat": { - "isop": true, - "deviceid": "ZGV2aWNlaWQAAAAAABhanw==", - "ch": 0, - "cm": 0, - "tm": 0, - "om": 3, - "sm": [3] - }, - "doxm": { - "oxm": [0], - "oxmsel": 0, - "sct": 1, - "owned": true, - "deviceid": "MTExMTExMTExMTExMTExMQ==", - "ownr": "MjIyMjIyMjIyMjIyMjIyMg==" - }, - "cred": [{ - "credid": 1, - "sub": "MjIyMjIyMjIyMjIyMjIyMg==", - "credtyp": 1, - "pvdata": "QUFBQUFBQUFBQUFBQUFBQQ==", - "ownrs" : ["MjIyMjIyMjIyMjIyMjIyMg=="] - }] -} +{ + "acl": { + "aclist": { + "aces": [ + { + "subjectuuid": "*", + "resources": [ + { + "href": "/oic/res", + "rel": "", + "rt": "", + "if": "" + }, + { + "href": "/oic/d", + "rel": "", + "rt": "", + "if": "" + }, + { + "href": "/oic/p", + "rel": "", + "rt": "", + "if": "" + }, + { + "href": "/oic/res/types/d", + "rel": "", + "rt": "", + "if": "" + }, + { + "href": "/oic/ad", + "rel": "", + "rt": "", + "if": "" + }, + { + "href": "/oic/sec/acl", + "rel": "", + "rt": "", + "if": "" + } + ], + "permission": 2 + }, + { + "subjectuuid": "*", + "resources": [ + { + "href": "/oic/sec/doxm", + "rel": "", + "rt": "", + "if": "" + } , + { + "href": "/oic/sec/pstat", + "rel": "", + "rt": "", + "if": "" + } + ], + "permission": 2 + }, + { + "subjectuuid": "*", + "resources": [ + { + "href": "/a/light", + "rel": "", + "rt": "", + "if": "" + } + ], + "permission": 6 + } + ] + }, + "rowneruuid" : "31313131-3131-3131-3131-313131313131" + }, + "pstat": { + "isop": true, + "deviceuuid": "31313131-3131-3131-3131-313131313131", + "rowneruuid": "31313131-3131-3131-3131-313131313131", + "cm": 0, + "tm": 0, + "om": 3, + "sm": 3 + }, + "doxm": { + "oxms": [0], + "oxmsel": 0, + "sct": 1, + "owned": true, + "deviceuuid": "31313131-3131-3131-3131-313131313131", + "devowneruuid": "32323232-3232-3232-3232-323232323232", + "rowneruuid": "31313131-3131-3131-3131-313131313131", + "dpc": false + }, + "cred": { + "creds": [ + { + "credid": 1, + "subjectuuid": "32323232-3232-3232-3232-323232323232", + "credtype": 1, + "privatedata": { + "data": "AAAAAAAAAAAAAAAA", + "encoding": "oic.sec.encoding.bytestream" + } + } + ], + "rowneruuid": "31313131-3131-3131-3131-313131313131" + } +} \ No newline at end of file diff --git a/service/easy-setup/sampleapp/mediator/android/EasySetup/app/src/main/assets/oic_svr_db_client.dat b/service/easy-setup/sampleapp/mediator/android/EasySetup/app/src/main/assets/oic_svr_db_client.dat old mode 100644 new mode 100755 index b8d249c3e77fb17c527c029b08c1d67dca7eeeb0..9a479eaa9290530b023be5539aaca0ee60c53fc4 GIT binary patch delta 38 tcmX@kdX$x8e{y1SP9$U9M2>yDIr{mT$@;~q$@)OC$##sA8{gez1ON|44ln=! delta 27 jcmX@gdYqMGe{y1SP9$T)M2>xvbs4#s5_30R_{s