Skip to content

Commit abc00d3

Browse files
committed
Merge branch 'task/def_security_enable' into 'master'
examples: Enable some security features and change order of component dirs See merge request app-frameworks/esp-rainmaker!274
2 parents 84ab732 + 2297134 commit abc00d3

File tree

15 files changed

+70
-7
lines changed

15 files changed

+70
-7
lines changed

CHANGES.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
# Changes
22

3+
## 25-Jan-2022 (examples: Enable some security features and change order of component dirs)
4+
5+
A couple of security features were added some time back, viz.
6+
7+
1. esp_rmaker_local_ctrl: Added support for sec1
8+
2. esp_rmaker_user_mapping: Add checks for user id for better security
9+
10+
These are kept disabled by default at component level to maintain backward compatibility and not
11+
change any existing projects. However, since enabling them is recommended, these are added in
12+
the sdkconfig.defaults of all examples.
13+
14+
A minor change in CMakeLists.txt has also been done for all examples so that the rmaker_common
15+
component from esp-rainmaker gets used, rather than the one from esp-insights.
16+
317
## 12-Jan-2022 (esp_rmaker_local_ctrl: Added support for sec1)
418

519
This commit adds support for security1 for local control. This can be enabled by setting

examples/fan/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ else()
99
endif(DEFINED ENV{RMAKER_PATH})
1010

1111
# Add RainMaker components and other common application components
12-
set(EXTRA_COMPONENT_DIRS ${RMAKER_PATH}/components ${RMAKER_PATH}/examples/common ${RMAKER_PATH}/components/esp-insights/components)
12+
set(EXTRA_COMPONENT_DIRS ${RMAKER_PATH}/components/esp-insights/components ${RMAKER_PATH}/components ${RMAKER_PATH}/examples/common)
1313

1414
set(PROJECT_VER "1.0")
1515
include($ENV{IDF_PATH}/tools/cmake/project.cmake)

examples/fan/sdkconfig.defaults

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,10 @@ CONFIG_BT_NIMBLE_ENABLED=y
1919

2020
# Temporary Fix for Timer Overflows
2121
CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=3120
22+
23+
# For additional security on reset to factory
24+
CONFIG_ESP_RMAKER_USER_ID_CHECK=y
25+
26+
# Secure Local Control
27+
CONFIG_ESP_RMAKER_LOCAL_CTRL_ENABLE=y
28+
CONFIG_ESP_RMAKER_LOCAL_CTRL_SECURITY_1=y

examples/gpio/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ else()
99
endif(DEFINED ENV{RMAKER_PATH})
1010

1111
# Add RainMaker components and other common application components
12-
set(EXTRA_COMPONENT_DIRS ${RMAKER_PATH}/components ${RMAKER_PATH}/examples/common ${RMAKER_PATH}/components/esp-insights/components)
12+
set(EXTRA_COMPONENT_DIRS ${RMAKER_PATH}/components/esp-insights/components ${RMAKER_PATH}/components ${RMAKER_PATH}/examples/common)
1313

1414
set(PROJECT_VER "1.0")
1515
include($ENV{IDF_PATH}/tools/cmake/project.cmake)

examples/gpio/sdkconfig.defaults

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,10 @@ CONFIG_BT_NIMBLE_ENABLED=y
1919

2020
# Temporary Fix for Timer Overflows
2121
CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=3120
22+
23+
# For additional security on reset to factory
24+
CONFIG_ESP_RMAKER_USER_ID_CHECK=y
25+
26+
# Secure Local Control
27+
CONFIG_ESP_RMAKER_LOCAL_CTRL_ENABLE=y
28+
CONFIG_ESP_RMAKER_LOCAL_CTRL_SECURITY_1=y

examples/homekit_switch/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ else()
1313
endif(DEFINED ENV{RMAKER_PATH})
1414

1515
# Add RainMaker components and other common application components
16-
set(EXTRA_COMPONENT_DIRS $ENV{HOMEKIT_PATH}/components/homekit ${RMAKER_PATH}/components ${RMAKER_PATH}/examples/common ${RMAKER_PATH}/components/esp-insights/components)
16+
set(EXTRA_COMPONENT_DIRS $ENV{HOMEKIT_PATH}/components/homekit ${RMAKER_PATH}/components/esp-insights/components ${RMAKER_PATH}/components ${RMAKER_PATH}/examples/common)
1717

1818
set(PROJECT_VER "1.0")
1919
include($ENV{IDF_PATH}/tools/cmake/project.cmake)

examples/homekit_switch/sdkconfig.defaults

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,10 @@ CONFIG_BT_NIMBLE_ENABLED=y
2929

3030
# Temporary Fix for Timer Overflows
3131
CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=3120
32+
33+
# For additional security on reset to factory
34+
CONFIG_ESP_RMAKER_USER_ID_CHECK=y
35+
36+
# Secure Local Control
37+
CONFIG_ESP_RMAKER_LOCAL_CTRL_ENABLE=y
38+
CONFIG_ESP_RMAKER_LOCAL_CTRL_SECURITY_1=y

examples/led_light/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ else()
99
endif(DEFINED ENV{RMAKER_PATH})
1010

1111
# Add RainMaker components and other common application components
12-
set(EXTRA_COMPONENT_DIRS ${RMAKER_PATH}/components ${RMAKER_PATH}/examples/common ${RMAKER_PATH}/components/esp-insights/components)
12+
set(EXTRA_COMPONENT_DIRS ${RMAKER_PATH}/components/esp-insights/components ${RMAKER_PATH}/components ${RMAKER_PATH}/examples/common)
1313

1414
set(PROJECT_VER "1.0")
1515
include($ENV{IDF_PATH}/tools/cmake/project.cmake)

examples/led_light/sdkconfig.defaults

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,10 @@ CONFIG_BT_NIMBLE_ENABLED=y
1919

2020
# Temporary Fix for Timer Overflows
2121
CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=3120
22+
23+
# For additional security on reset to factory
24+
CONFIG_ESP_RMAKER_USER_ID_CHECK=y
25+
26+
# Secure Local Control
27+
CONFIG_ESP_RMAKER_LOCAL_CTRL_ENABLE=y
28+
CONFIG_ESP_RMAKER_LOCAL_CTRL_SECURITY_1=y

examples/multi_device/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ else()
99
endif(DEFINED ENV{RMAKER_PATH})
1010

1111
# Add RainMaker components and other common application components
12-
set(EXTRA_COMPONENT_DIRS ${RMAKER_PATH}/components ${RMAKER_PATH}/examples/common ${RMAKER_PATH}/components/esp-insights/components)
12+
set(EXTRA_COMPONENT_DIRS ${RMAKER_PATH}/components/esp-insights/components ${RMAKER_PATH}/components ${RMAKER_PATH}/examples/common)
1313

1414
set(PROJECT_VER "1.0")
1515
include($ENV{IDF_PATH}/tools/cmake/project.cmake)

examples/multi_device/sdkconfig.defaults

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,10 @@ CONFIG_BT_NIMBLE_ENABLED=y
1919

2020
# Temporary Fix for Timer Overflows
2121
CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=3120
22+
23+
# For additional security on reset to factory
24+
CONFIG_ESP_RMAKER_USER_ID_CHECK=y
25+
26+
# Secure Local Control
27+
CONFIG_ESP_RMAKER_LOCAL_CTRL_ENABLE=y
28+
CONFIG_ESP_RMAKER_LOCAL_CTRL_SECURITY_1=y

examples/switch/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ else()
99
endif(DEFINED ENV{RMAKER_PATH})
1010

1111
# Add RainMaker components and other common application components
12-
set(EXTRA_COMPONENT_DIRS ${RMAKER_PATH}/components ${RMAKER_PATH}/examples/common ${RMAKER_PATH}/components/esp-insights/components)
12+
set(EXTRA_COMPONENT_DIRS ${RMAKER_PATH}/components/esp-insights/components ${RMAKER_PATH}/components ${RMAKER_PATH}/examples/common)
1313

1414
set(PROJECT_VER "1.0")
1515
include($ENV{IDF_PATH}/tools/cmake/project.cmake)

examples/switch/sdkconfig.defaults

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,10 @@ CONFIG_BT_NIMBLE_ENABLED=y
1919

2020
# Temporary Fix for Timer Overflows
2121
CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=3120
22+
23+
# For additional security on reset to factory
24+
CONFIG_ESP_RMAKER_USER_ID_CHECK=y
25+
26+
# Secure Local Control
27+
CONFIG_ESP_RMAKER_LOCAL_CTRL_ENABLE=y
28+
CONFIG_ESP_RMAKER_LOCAL_CTRL_SECURITY_1=y

examples/temperature_sensor/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ else()
99
endif(DEFINED ENV{RMAKER_PATH})
1010

1111
# Add RainMaker components and other common application components
12-
set(EXTRA_COMPONENT_DIRS ${RMAKER_PATH}/components ${RMAKER_PATH}/examples/common ${RMAKER_PATH}/components/esp-insights/components)
12+
set(EXTRA_COMPONENT_DIRS ${RMAKER_PATH}/components/esp-insights/components ${RMAKER_PATH}/components ${RMAKER_PATH}/examples/common)
1313

1414
set(PROJECT_VER "1.0")
1515
include($ENV{IDF_PATH}/tools/cmake/project.cmake)

examples/temperature_sensor/sdkconfig.defaults

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,10 @@ CONFIG_BT_NIMBLE_ENABLED=y
1919

2020
# Temporary Fix for Timer Overflows
2121
CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=3120
22+
23+
# For additional security on reset to factory
24+
CONFIG_ESP_RMAKER_USER_ID_CHECK=y
25+
26+
# Secure Local Control
27+
CONFIG_ESP_RMAKER_LOCAL_CTRL_ENABLE=y
28+
CONFIG_ESP_RMAKER_LOCAL_CTRL_SECURITY_1=y

0 commit comments

Comments
 (0)