Merge branch 'main' into May_11_2023-Dev

This commit is contained in:
Ned Wright 2023-05-14 18:52:57 +00:00
commit 3aa0885f74
9 changed files with 79103 additions and 3 deletions

2
.gitattributes vendored Normal file
View File

@ -0,0 +1,2 @@
build_system/docker/install-cp-agent-intelligence-service.sh binary
build_system/docker/install-cp-crowdsec-aux.sh binary

View File

@ -1,4 +1,4 @@
install(FILES Dockerfile entry.sh DESTINATION .) install(FILES Dockerfile entry.sh install-cp-agent-intelligence-service.sh install-cp-crowdsec-aux.sh DESTINATION .)
add_custom_command( add_custom_command(
OUTPUT ${CMAKE_INSTALL_PREFIX}/agent-docker.img OUTPUT ${CMAKE_INSTALL_PREFIX}/agent-docker.img

View File

@ -1,5 +1,7 @@
#!/bin/bash #!/bin/bash
INTELLIGENCE_INSTALLATION_SCRIPT="install-cp-agent-intelligence-service.sh"
CROWDSEC_INSTALLATION_SCRIPT="install-cp-crowdsec-aux.sh"
HTTP_TRANSACTION_HANDLER_SERVICE="install-cp-nano-service-http-transaction-handler.sh" HTTP_TRANSACTION_HANDLER_SERVICE="install-cp-nano-service-http-transaction-handler.sh"
ATTACHMENT_REGISTRATION_SERVICE="install-cp-nano-attachment-registration-manager.sh" ATTACHMENT_REGISTRATION_SERVICE="install-cp-nano-attachment-registration-manager.sh"
ORCHESTRATION_INSTALLATION_SCRIPT="install-cp-nano-agent.sh" ORCHESTRATION_INSTALLATION_SCRIPT="install-cp-nano-agent.sh"
@ -29,6 +31,9 @@ while true; do
elif [ "$1" == "--token" ]; then elif [ "$1" == "--token" ]; then
shift shift
var_token="$1" var_token="$1"
elif [ "$1" == "--standalone" ]; then
var_mode="--hybrid_mode"
var_token="cp-3fb5c718-5e39-47e6-8d5e-99b4bc5660b74b4b7fc8-5312-451d-a763-aaf7872703c0"
fi fi
shift shift
done done
@ -56,6 +61,11 @@ fi
/nano-service-installers/$ATTACHMENT_REGISTRATION_SERVICE --install /nano-service-installers/$ATTACHMENT_REGISTRATION_SERVICE --install
/nano-service-installers/$HTTP_TRANSACTION_HANDLER_SERVICE --install /nano-service-installers/$HTTP_TRANSACTION_HANDLER_SERVICE --install
if [ ! -z $CROWDSEC_ENABLED ]; then
/nano-service-installers/$INTELLIGENCE_INSTALLATION_SCRIPT --install
/nano-service-installers/$CROWDSEC_INSTALLATION_SCRIPT --install
fi
# use advanced model if exist as data for agent # use advanced model if exist as data for agent
FILE=/advanced-model/open-appsec-advanced-model.tgz FILE=/advanced-model/open-appsec-advanced-model.tgz
if [ -f "$FILE" ]; then if [ -f "$FILE" ]; then

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -34,6 +34,7 @@ target_link_libraries(cp-nano-http-transaction-handler
reputation reputation
ips ips
keywords keywords
l7_access_control
-Wl,--end-group -Wl,--end-group
) )

View File

@ -16,6 +16,7 @@
#include "nginx_attachment.h" #include "nginx_attachment.h"
#include "gradual_deployment.h" #include "gradual_deployment.h"
#include "http_manager.h" #include "http_manager.h"
#include "layer_7_access_control.h"
#include "waap.h" #include "waap.h"
#include "ips_comp.h" #include "ips_comp.h"
#include "keyword_comp.h" #include "keyword_comp.h"
@ -28,6 +29,7 @@ main(int argc, char **argv)
NginxAttachment, NginxAttachment,
GradualDeployment, GradualDeployment,
HttpManager, HttpManager,
Layer7AccessControl,
WaapComponent, WaapComponent,
IPSComp, IPSComp,
KeywordComp KeywordComp

View File

@ -27,4 +27,5 @@ sdwan="sdwan 1204 SD-WAN"
sdwan_logger="sdwanLogger 2204 SD-WAN_Logger" sdwan_logger="sdwanLogger 2204 SD-WAN_Logger"
cpview_metric_provider="cpviewMetricProvider 8282" cpview_metric_provider="cpviewMetricProvider 8282"
hello_world="hello_world" hello_world="hello_world"
crowdsec_aux="crowdsecAux 8081"
# ** Please do not remove this comment - newline at end of file required. # ** Please do not remove this comment - newline at end of file required.

View File

@ -667,7 +667,7 @@ load_services()
fi fi
log "load_services" "Respawn ${service}" log "load_services" "Respawn ${service}"
if [ "${service}" == "/etc/cp/agentIntelligence/redis/redis-server" ]; then if [ "${service}" == "/etc/cp/agentIntelligence/redis/redis-server" ] || [ "${service}" = "/etc/cp/crowdsecAux/cp-nano-crowdsec-aux" ]; then
eval "LD_LIBRARY_PATH=${NGEN_LIB_PATH} ${service} ${execution_flags} &" eval "LD_LIBRARY_PATH=${NGEN_LIB_PATH} ${service} ${execution_flags} &"
else else
eval "LD_LIBRARY_PATH=${NGEN_LIB_PATH} ${service} ${execution_flags} --filesystem_path=${FILESYSTEM_PATH} --log_files_path=${LOG_FILE_PATH} &" eval "LD_LIBRARY_PATH=${NGEN_LIB_PATH} ${service} ${execution_flags} --filesystem_path=${FILESYSTEM_PATH} --log_files_path=${LOG_FILE_PATH} &"