iotivity: add some default security configuration
This is just a dummy configuration. Signed-off-by: Hauke Mehrtens <hauke.mehrtens@intel.com>
This commit is contained in:
parent
a29d7a887b
commit
6ed76187d6
4 changed files with 158 additions and 2 deletions
|
@ -33,7 +33,8 @@ PKG_CONFIG_DEPENDS := \
|
||||||
CONFIG_PACKAGE_iotivity-resource-container-sample \
|
CONFIG_PACKAGE_iotivity-resource-container-sample \
|
||||||
CONFIG_PACKAGE_iotivity-resource-container-hue \
|
CONFIG_PACKAGE_iotivity-resource-container-hue \
|
||||||
CONFIG_PACKAGE_iotivity-example-garage \
|
CONFIG_PACKAGE_iotivity-example-garage \
|
||||||
CONFIG_PACKAGE_iotivity_DEBUG
|
CONFIG_PACKAGE_iotivity_DEBUG \
|
||||||
|
CONFIG_PACKAGE_iotivity_SECURE
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
include $(INCLUDE_DIR)/scons.mk
|
include $(INCLUDE_DIR)/scons.mk
|
||||||
|
@ -60,6 +61,12 @@ define Package/iotivity/config
|
||||||
help
|
help
|
||||||
Build IoTivity with debuging support.
|
Build IoTivity with debuging support.
|
||||||
|
|
||||||
|
config PACKAGE_iotivity_SECURE
|
||||||
|
bool "IoTivity with security support"
|
||||||
|
default y
|
||||||
|
help
|
||||||
|
Activate security support.
|
||||||
|
|
||||||
endif
|
endif
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
@ -194,7 +201,6 @@ SCONS_OPTIONS += \
|
||||||
TARGET_ARCH=$(ARCH) \
|
TARGET_ARCH=$(ARCH) \
|
||||||
STAGING_DIR=$(STAGING_DIR) \
|
STAGING_DIR=$(STAGING_DIR) \
|
||||||
LOGGING=true \
|
LOGGING=true \
|
||||||
SECURED=1 \
|
|
||||||
$(if $(CONFIG_PACKAGE_iotivity),liboctbstack) \
|
$(if $(CONFIG_PACKAGE_iotivity),liboctbstack) \
|
||||||
$(if $(CONFIG_PACKAGE_iotivity-cpp),liboc) \
|
$(if $(CONFIG_PACKAGE_iotivity-cpp),liboc) \
|
||||||
$(if $(CONFIG_PACKAGE_iotivity-things-manager-lib),libTGMSDK) \
|
$(if $(CONFIG_PACKAGE_iotivity-things-manager-lib),libTGMSDK) \
|
||||||
|
@ -213,6 +219,12 @@ else
|
||||||
APP_OPTIM:=release
|
APP_OPTIM:=release
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_PACKAGE_iotivity_SECURE),y)
|
||||||
|
SCONS_OPTIONS += SECURED=1
|
||||||
|
else
|
||||||
|
SCONS_OPTIONS += SECURED=0
|
||||||
|
endif
|
||||||
|
|
||||||
ifneq ($(findstring c,$(OPENWRT_VERBOSE)),)
|
ifneq ($(findstring c,$(OPENWRT_VERBOSE)),)
|
||||||
SCONS_OPTIONS += VERBOSE=true
|
SCONS_OPTIONS += VERBOSE=true
|
||||||
endif
|
endif
|
||||||
|
@ -238,6 +250,10 @@ endef
|
||||||
define Package/iotivity/install
|
define Package/iotivity/install
|
||||||
$(INSTALL_DIR) $(1)/usr/lib
|
$(INSTALL_DIR) $(1)/usr/lib
|
||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/$(APP_OPTIM)/liboctbstack.so $(1)/usr/lib/
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/$(APP_OPTIM)/liboctbstack.so $(1)/usr/lib/
|
||||||
|
ifeq ($(CONFIG_PACKAGE_iotivity_SECURE),y)
|
||||||
|
$(INSTALL_DIR) $(1)/etc/iotivity/
|
||||||
|
$(INSTALL_DATA) ./files/etc/iotivity/oic_svr_db.cbor $(1)/etc/iotivity/
|
||||||
|
endif
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/iotivity-cpp/install
|
define Package/iotivity-cpp/install
|
||||||
|
|
2
net/iotivity/files/etc/iotivity/ReadMe.txt
Normal file
2
net/iotivity/files/etc/iotivity/ReadMe.txt
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
The file oic_svr_db.cbor in generated from the oic_svr_db.json with the
|
||||||
|
resource/csdk/security/tool/json2cbor.c tool.
|
BIN
net/iotivity/files/etc/iotivity/oic_svr_db.cbor
Normal file
BIN
net/iotivity/files/etc/iotivity/oic_svr_db.cbor
Normal file
Binary file not shown.
138
net/iotivity/files/etc/iotivity/oic_svr_db.json
Normal file
138
net/iotivity/files/etc/iotivity/oic_svr_db.json
Normal file
|
@ -0,0 +1,138 @@
|
||||||
|
{
|
||||||
|
"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/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": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"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": 31
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"subjectuuid": "*",
|
||||||
|
"resources": [
|
||||||
|
{
|
||||||
|
"href": "*",
|
||||||
|
"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.raw"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"rowneruuid": "32323232-3232-3232-3232-323232323232"
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue