Enabling crowdsec

This commit is contained in:
Ned Wright 2023-05-11 10:40:06 +00:00
parent 240f58217a
commit c49debe5d9
7 changed files with 79100 additions and 1 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

@ -32,6 +32,7 @@ target_link_libraries(cp-nano-http-transaction-handler
waap waap
waap_clib waap_clib
reputation reputation
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"
int int
@ -26,6 +27,7 @@ main(int argc, char **argv)
NginxAttachment, NginxAttachment,
GradualDeployment, GradualDeployment,
HttpManager, HttpManager,
Layer7AccessControl,
WaapComponent WaapComponent
> comps; > comps;