Skip to content

Commit ebdd3ff

Browse files
RDKB-62350 : Implement SentryAtTheEdge and TCPTrackerFilterDevices RFC DML parameters (#37)
**Reason for change:** Implement SentryAtTheEdge (SATE) and TCPTrackerFilterDevices RFC DML parameters to control `dos_protection`, `ip_reputation` and `tcptracker_filter_devices` breakers **RFC DML parameters implemented:** ``` Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.AdvSecSentryAtTheEdge.Enable Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.AdvSecTCPTrackerFilterDevices.Enable ``` For SATE listen Only, AdvSecSentryAtTheEdge RFC needs to be enabled For SATE full mode, Both AdvSecSentryAtTheEdge and TCPTrackerFilterDevices RFCs needs to be enabled **Test Procedure:** 1. Sentry at the Edge listen only needs to be tested 2. For every DOS / IP reputation / model profile threat generated in client, 2 threats are recorded in CUJO admin portal one being ignored (sentry at the edge) and another being blocked (sentry at the cloud) **Risks:** Low **Priority:** P1 **Signed-off-by:** Santhosh_GujulvaJagadeesh@comcast.com --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 9a77bb3 commit ebdd3ff

9 files changed

Lines changed: 589 additions & 0 deletions

config/TR181-AdvSecurity.xml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,38 @@
394394
</parameter>
395395
</parameters>
396396
</object>
397+
<object>
398+
<name>AdvSecSentryAtTheEdge</name>
399+
<objectType>object</objectType>
400+
<functions>
401+
<func_GetParamBoolValue>AdvSecSentryAtTheEdge_RFC_GetParamBoolValue</func_GetParamBoolValue>
402+
<func_SetParamBoolValue>AdvSecSentryAtTheEdge_RFC_SetParamBoolValue</func_SetParamBoolValue>
403+
</functions>
404+
<parameters>
405+
<parameter>
406+
<name>Enable</name>
407+
<type>boolean</type>
408+
<syntax>bool</syntax>
409+
<writable>true</writable>
410+
</parameter>
411+
</parameters>
412+
</object>
413+
<object>
414+
<name>AdvSecTCPTrackerFilterDevices</name>
415+
<objectType>object</objectType>
416+
<functions>
417+
<func_GetParamBoolValue>AdvSecTCPTrackerFilterDevices_RFC_GetParamBoolValue</func_GetParamBoolValue>
418+
<func_SetParamBoolValue>AdvSecTCPTrackerFilterDevices_RFC_SetParamBoolValue</func_SetParamBoolValue>
419+
</functions>
420+
<parameters>
421+
<parameter>
422+
<name>Enable</name>
423+
<type>boolean</type>
424+
<syntax>bool</syntax>
425+
<writable>true</writable>
426+
</parameter>
427+
</parameters>
428+
</object>
397429
<object>
398430
<name>WifiDataCollection</name>
399431
<objectType>object</objectType>

scripts/advsec.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ export ADVSEC_RAPTR_ENABLED_PATH=/tmp/advsec_raptr_enabled
8585
export ADVSEC_USERSPACE_ENABLED_PATH=/tmp/advsec_userspace_enabled
8686
export ADVSEC_CUJOTRACER_ENABLED_PATH=/tmp/advsec_cujotracer_enabled
8787
export ADVSEC_CUJOTELEMETRY_ENABLED_PATH=/tmp/advsec_cujotelemetry_enabled
88+
export ADVSEC_SATE_ENABLED_PATH=/tmp/advsec_sate_enabled
89+
export ADVSEC_TCPTRACKER_FILTER_DEVICES_ENABLED_PATH=/tmp/advsec_tcptracker_filter_devices_enabled
8890
export ADVSEC_WIFIDATACOLLECTION_ENABLED_PATH=/tmp/advsec_wifidatacollection_enabled
8991
export ADVSEC_LEVL_ENABLED_PATH=/tmp/advsec_levl_enabled
9092
export ADVSEC_AGENT_ENABLED_PATH=/tmp/advsec_agent_enabled
@@ -111,6 +113,8 @@ export ADVSEC_RAPTR_RFC_ENABLED=`syscfg get Adv_RaptrRFCEnable`
111113
export ADVSEC_USERSPACE_RFC_ENABLED=`syscfg get Adv_AdvSecUserSpaceRFCEnable`
112114
export ADVSEC_CUJOTRACER_RFC_ENABLED=`syscfg get Adv_AdvSecCujoTracerRFCEnable`
113115
export ADVSEC_CUJOTELEMETRY_RFC_ENABLED=`syscfg get Adv_AdvSecCujoTelemetryRFCEnable`
116+
export ADVSEC_SATE_RFC_ENABLED=`syscfg get Adv_SATERFCEnable`
117+
export ADVSEC_TCPTRACKER_FILTER_DEVICES_RFC_ENABLED=`syscfg get Adv_TCPTrackerFilterDevicesRFCEnable`
114118
export ADVSEC_WIFIDATACOLLECTION_RFC_ENABLED=`syscfg get Adv_WifiDataCollectionRFCEnable`
115119
export ADVSEC_LEVL_RFC_ENABLED=`syscfg get Adv_LevlRFCEnable`
116120
export ADVSEC_AGENT_RFC_ENABLED=`syscfg get Adv_AdvSecAgentRFCEnable`
@@ -156,6 +160,10 @@ export ADV_CUJOTRACER_RFC_ENABLE_LOG=ADVANCE_SECURITY_CUJOTRACER_ENABLED
156160
export ADV_CUJOTRACER_RFC_DISABLE_LOG=ADVANCE_SECURITY_CUJOTRACER_DISABLED
157161
export ADV_CUJOTELEMETRY_RFC_ENABLE_LOG=ADVANCE_SECURITY_CUJOTELEMETRY_ENABLED
158162
export ADV_CUJOTELEMETRY_RFC_DISABLE_LOG=ADVANCE_SECURITY_CUJOTELEMETRY_DISABLED
163+
export ADV_SATE_RFC_ENABLE_LOG=ADVANCE_SECURITY_SENTRY_AT_THE_EDGE_ENABLED
164+
export ADV_SATE_RFC_DISABLE_LOG=ADVANCE_SECURITY_SENTRY_AT_THE_EDGE_DISABLED
165+
export ADV_TCPTRACKER_FILTER_DEVICES_RFC_ENABLE_LOG=ADVANCE_SECURITY_TCPTRACKER_FILTER_DEVICES_ENABLED
166+
export ADV_TCPTRACKER_FILTER_DEVICES_RFC_DISABLE_LOG=ADVANCE_SECURITY_TCPTRACKER_FILTER_DEVICES_DISABLED
159167

160168
export ADVSEC_SAFEBRO_SETTING="${RW_DIR}/safebro.json"
161169

scripts/advsec_log_fp_status.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,18 @@ check_status()
124124
print_telemetry_log ${ADV_CUJOTELEMETRY_RFC_DISABLE_LOG} ${ADVSEC_AGENT_LOG_PATH}
125125
fi
126126

127+
if [ -e ${ADVSEC_SATE_ENABLED_PATH} ]; then
128+
print_telemetry_log ${ADV_SATE_RFC_ENABLE_LOG} ${ADVSEC_AGENT_LOG_PATH}
129+
else
130+
print_telemetry_log ${ADV_SATE_RFC_DISABLE_LOG} ${ADVSEC_AGENT_LOG_PATH}
131+
fi
132+
133+
if [ -e ${ADVSEC_TCPTRACKER_FILTER_DEVICES_ENABLED_PATH} ]; then
134+
print_telemetry_log ${ADV_TCPTRACKER_FILTER_DEVICES_RFC_ENABLE_LOG} ${ADVSEC_AGENT_LOG_PATH}
135+
else
136+
print_telemetry_log ${ADV_TCPTRACKER_FILTER_DEVICES_RFC_DISABLE_LOG} ${ADVSEC_AGENT_LOG_PATH}
137+
fi
138+
127139
if [ -e ${ADVSEC_WIFIDATACOLLECTION_ENABLED_PATH} ]; then
128140
print_telemetry_log ${ADV_WIFIDATACOLLECTION_RFC_ENABLE_LOG} ${ADVSEC_AGENT_LOG_PATH}
129141
else

scripts/start_adv_security.sh

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,14 @@ then
264264
rm $ADVSEC_CUJOTELEMETRY_ENABLED_PATH
265265
fi
266266

267+
if [ -f $ADVSEC_SATE_ENABLED_PATH ]; then
268+
rm $ADVSEC_SATE_ENABLED_PATH
269+
fi
270+
271+
if [ -f $ADVSEC_TCPTRACKER_FILTER_DEVICES_ENABLED_PATH ]; then
272+
rm $ADVSEC_TCPTRACKER_FILTER_DEVICES_ENABLED_PATH
273+
fi
274+
267275
if [ -f $ADVSEC_WIFIDATACOLLECTION_ENABLED_PATH ]; then
268276
rm $ADVSEC_WIFIDATACOLLECTION_ENABLED_PATH
269277
fi
@@ -608,6 +616,46 @@ disable_cujotelemetry()
608616
fi
609617
}
610618

619+
enable_sate()
620+
{
621+
touch $ADVSEC_SATE_ENABLED_PATH
622+
echo_t ${ADV_SATE_RFC_ENABLE_LOG} >> ${ADVSEC_AGENT_LOG_PATH}
623+
624+
if [ "$1" = "RR" ]; then
625+
advsec_restart_agent "AgentSentryAtTheEdge_RFC_Enabled"
626+
fi
627+
}
628+
629+
disable_sate()
630+
{
631+
rm -f $ADVSEC_SATE_ENABLED_PATH
632+
echo_t ${ADV_SATE_RFC_DISABLE_LOG} >> ${ADVSEC_AGENT_LOG_PATH}
633+
634+
if [ "$1" = "RR" ]; then
635+
advsec_restart_agent "AgentSentryAtTheEdge_RFC_Disabled"
636+
fi
637+
}
638+
639+
enable_tcptracker_filter_devices()
640+
{
641+
touch $ADVSEC_TCPTRACKER_FILTER_DEVICES_ENABLED_PATH
642+
echo_t ${ADV_TCPTRACKER_FILTER_DEVICES_RFC_ENABLE_LOG} >> ${ADVSEC_AGENT_LOG_PATH}
643+
644+
if [ "$1" = "RR" ]; then
645+
advsec_restart_agent "AgentTCPTrackerFilterDevices_RFC_Enabled"
646+
fi
647+
}
648+
649+
disable_tcptracker_filter_devices()
650+
{
651+
rm -f $ADVSEC_TCPTRACKER_FILTER_DEVICES_ENABLED_PATH
652+
echo_t ${ADV_TCPTRACKER_FILTER_DEVICES_RFC_DISABLE_LOG} >> ${ADVSEC_AGENT_LOG_PATH}
653+
654+
if [ "$1" = "RR" ]; then
655+
advsec_restart_agent "AgentTCPTrackerFilterDevices_RFC_Disabled"
656+
fi
657+
}
658+
611659
enable_wifidatacollection()
612660
{
613661
if [ -f $ADVSEC_WIFIDCL_INIT_PATH ]; then
@@ -913,6 +961,22 @@ if [ "$1" = "-disableCTD" ]; then
913961
disable_cujotelemetry "RR"
914962
fi
915963

964+
if [ "$1" = "-enableSATE" ]; then
965+
enable_sate "RR"
966+
fi
967+
968+
if [ "$1" = "-disableSATE" ]; then
969+
disable_sate "RR"
970+
fi
971+
972+
if [ "$1" = "-enableTCPTrackerFilterDevices" ]; then
973+
enable_tcptracker_filter_devices "RR"
974+
fi
975+
976+
if [ "$1" = "-disableTCPTrackerFilterDevices" ]; then
977+
disable_tcptracker_filter_devices "RR"
978+
fi
979+
916980
if [ "$1" = "-enableWSDiscovery" ]; then
917981
enable_wsdiscovery "FR"
918982
fi

0 commit comments

Comments
 (0)