From: Willy Tarreau Date: Wed, 21 Apr 2021 09:29:47 +0000 (+0200) Subject: CONTRIB: move modsecurity out of the tree X-Git-Tag: v2.4-dev17~36 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b77cd7f5623381cc8d7b00977e5b784b9f814a38;p=thirdparty%2Fhaproxy.git CONTRIB: move modsecurity out of the tree As previously mentioned SPOA code has nothing to do in the haproxy core since they're not dependent on haproxy's version. This one was moved to its own repository here with complete history: https://github.com/haproxy/spoa-modsecurity --- diff --git a/.gitignore b/.gitignore index ecdd195be7..1065291c1a 100644 --- a/.gitignore +++ b/.gitignore @@ -50,6 +50,5 @@ dev/tcploop/tcploop dev/hpack/decode dev/hpack/gen-rht contrib/mod_defender/defender -contrib/modsecurity/modsecurity /src/dlmalloc.c /tests/test_hashes diff --git a/contrib/modsecurity/Makefile b/contrib/modsecurity/Makefile deleted file mode 100644 index a00bdd009d..0000000000 --- a/contrib/modsecurity/Makefile +++ /dev/null @@ -1,52 +0,0 @@ -DESTDIR = -PREFIX = /usr/local -BINDIR = $(PREFIX)/bin - -CC ?= gcc -LD = $(CC) - -ifeq ($(MODSEC_INC),) -MODSEC_INC := modsecurity-2.9.1/INSTALL/include -endif - -ifeq ($(MODSEC_LIB),) -MODSEC_LIB := modsecurity-2.9.1/INSTALL/lib -endif - -ifeq ($(APACHE2_INC),) -APACHE2_INC := /usr/include/apache2 -endif - -ifeq ($(APR_INC),) -APR_INC := /usr/include/apr-1.0 -endif - -ifeq ($(LIBXML_INC),) -LIBXML_INC := /usr/include/libxml2 -endif - -ifeq ($(EVENT_LIB),) -EVENT_LIB := -levent -endif - -ifeq ($(EVENT_INC),) -EVENT_INC := /usr/include -endif - -CFLAGS += -g -Wall -pthread -INCS += -Iinclude -I$(MODSEC_INC) -I$(APACHE2_INC) -I$(APR_INC) -I$(LIBXML_INC) -I$(EVENT_INC) -LIBS += -lpthread $(EVENT_LIB) -levent_pthreads -lcurl -lapr-1 -laprutil-1 -lxml2 -lpcre -lyajl - -OBJS = spoa.o modsec_wrapper.o - -modsecurity: $(OBJS) - $(LD) $(LDFLAGS) -o $@ $^ $(MODSEC_LIB)/standalone.a $(LIBS) - -install: modsecurity - install modsecurity $(DESTDIR)$(BINDIR) - -clean: - rm -f modsecurity $(OBJS) - -%.o: %.c - $(CC) $(CFLAGS) $(INCS) -c -o $@ $< diff --git a/contrib/modsecurity/README b/contrib/modsecurity/README deleted file mode 100644 index 8e74016fce..0000000000 --- a/contrib/modsecurity/README +++ /dev/null @@ -1,132 +0,0 @@ -ModSecurity for HAProxy ------------------------ - -This is a third party daemon which speaks SPOE. It gives requests send by HAProxy -to ModSecurity and returns the verdict. - - Compilation ---------------- - -You must compile ModSecurity in standalone mode. Below an example for -ModSecurity-2.9.1. Note that ModSecurity depends the Apache APR. I assume that -the Apache dependencies are installed on the system. - - ./configure \ - --prefix=$PWD/INSTALL \ - --disable-apache2-module \ - --enable-standalone-module \ - --enable-pcre-study \ - --without-lua \ - --enable-pcre-jit - make - make -C standalone install - mkdir -p $PWD/INSTALL/include - cp standalone/*.h $PWD/INSTALL/include - cp apache2/*.h $PWD/INSTALL/include - -Note that this compilation method works, but is a little bit rustic. I can't -deal with Lua, I supposed that is a dependencies problem on my computer. - - Start the service ---------------------- - -After you have compiled it, to start the service, you just need to use "spoa" -binary: - - $> ./modsecurity -h - Usage: ./spoa [-h] [-d] [-p ] [-n ] [-f ] - -h Print this message - -d Enable the debug mode - -f Modsecurity configuration file - -m Specify the maximum frame size (default : 16384) - -p Specify the port to listen on (default: 12345) - -n Specify the number of workers (default: 5) - -c Enable the support of the specified capability - -t