Update README.md

This commit is contained in:
orianelou 2023-12-11 11:12:32 +02:00 committed by GitHub
parent c2d3bfc849
commit 18f8cc9552
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -13,11 +13,11 @@ An attachment gets HTTP data (URL, Header, Body, Response) from a hosting proces
To deal with potential issues where the HTTP Transaction handler process is not responding, the Attachment implements a retry mechanism and configurable fail-open/fail-close mechanism. To deal with potential issues where the HTTP Transaction handler process is not responding, the Attachment implements a retry mechanism and configurable fail-open/fail-close mechanism.
This repository will host Attachment for different platforms. The first one is the open-appsec attachment for NGINX, implemented as a standard NGINX dynamically loadable module (plugin). This repository will host Attachments for different platforms. The first one is the open-appsec attachment for NGINX, implemented as a standard NGINX dynamically loadable module (plugin).
## open-appsec NGINX attachment compilation instructions ## open-appsec NGINX / Kong attachment compilation instructions
*We Provide an Example for compilation instructions on alpine, the attachment can be complied on other environments that match the environment hosting nginx, yet compilation instructions could need adjustments* *We provide an example for compilation instructions on Alpine, the attachment can be comiplied on other environments that match the environment hosting nginx, yet compilation instructions could need adjustment*
The attachment can be compiled to support an existing nginx server or an nginx/ingress-nginxdocker. The attachment can be compiled to support an existing nginx server or an nginx/ingress-nginxdocker.
@ -37,7 +37,7 @@ Before compiling, ensure the latest development versions of the following librar
$ apk add pcre-dev libxml2-dev zlib-dev openssl-dev geoip-dev linux-headers python3 $ apk add pcre-dev libxml2-dev zlib-dev openssl-dev geoip-dev linux-headers python3
``` ```
### Compiling the attachment code for an existing nginx server ### Compiling the attachment code for an existing NGINX/Kong server
On your existing nginx server: On your existing nginx server:
1. Run command to extract nginx compilation flags to a file 1. Run command to extract nginx compilation flags to a file
@ -58,13 +58,14 @@ On your compilation environment:
$ ./attachments/nginx/ngx_module/nginx_version_configuration.sh --conf /tmp/nginx.ver build_out $ ./attachments/nginx/ngx_module/nginx_version_configuration.sh --conf /tmp/nginx.ver build_out
$ cmake -DCMAKE_INSTALL_PREFIX=build_out . $ cmake -DCMAKE_INSTALL_PREFIX=build_out .
$ make install $ make install
$ make package
``` ```
#### NGINX plugin associated libraries #### NGINX plugin-associated libraries
The NGINX plugin uses these libraries: shmem_ipc, compression_utils, and nginx_attachment_util. The NGINX plugin uses these libraries: shmem_ipc, compression_utils, and nginx_attachment_util.
They can be found under the `lib` directory in the `<output path>` given to the CMake. They can be found under the `lib` directory in the `<output path>` given to the CMake.
#### Deploying the attachment on an existing nginx server #### Deploying the attachment on an existing NGINX/Kong server
1. Copy the associated libraries to /usr/lib on your existing nginx server 1. Copy the associated libraries to /usr/lib on your existing nginx server
2. Copy the nginx attachment file lib/libngx_module.so to the following path on your existing nginx server: /usr/lib/nginx/modules/ 2. Copy the nginx attachment file lib/libngx_module.so to the following path on your existing nginx server: /usr/lib/nginx/modules/
@ -72,7 +73,7 @@ They can be found under the `lib` directory in the `<output path>` given to the
`load_module /usr/lib/nginx/modules/libngx_module.so;` `load_module /usr/lib/nginx/modules/libngx_module.so;`
4. Restart your nginx server. 4. Restart your nginx server.
### Compiling the attachment code and creating a docker image for an existing nginx/ingress-nginx docker ### Compiling the attachment code and creating a docker image for an existing kong/nginx/ingress-nginx docker
This step requires Docker to be installed on your compilation environment This step requires Docker to be installed on your compilation environment
@ -89,9 +90,9 @@ This step requires Docker to be installed on your compilation environment
$ make docker $ make docker
``` ```
Later on, you can push the image to your own registry and use it as needed. Later on, you can push the image to your registry and use it as needed.
For deployment on docker you can deploy it using the same docker command you used before with regular nginx container, just make sure to add the parameter `--ipc=host`. For deployment on docker you can deploy it using the same docker command you used before with a regular nginx container, just make sure to add the parameter `--ipc=host`.
## License ## License