-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
117 additions
and
229 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,5 @@ | |
*.out | ||
vendor/ | ||
|
||
# local files | ||
config.yaml | ||
logs/ | ||
rules/ | ||
# Build output | ||
build/ |
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Copyright 2023 The OWASP Coraza contributors | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
FROM golang:1.21 as build | ||
|
||
WORKDIR /go/src/app | ||
COPY . . | ||
|
||
RUN go mod download | ||
RUN go vet -v ./... | ||
|
||
RUN CGO_ENABLED=0 go build -o /go/bin/coraza-spoa | ||
|
||
FROM gcr.io/distroless/static-debian11 | ||
|
||
LABEL org.opencontainers.image.authors="The OWASP Coraza contributors" \ | ||
org.opencontainers.image.description="OWASP Coraza WAF (Haproxy SPOA)" \ | ||
org.opencontainers.image.documentation="https://coraza.io/connectors/coraza-spoa/" \ | ||
org.opencontainers.image.licenses="Apache-2.0" \ | ||
org.opencontainers.image.source="https://github.com/corazawaf/coraza-spoa" \ | ||
org.opencontainers.image.title="coraza-spoa" | ||
|
||
COPY --from=build /go/bin/coraza-spoa / | ||
COPY ./example/coraza-spoa.yaml /config.yaml | ||
|
||
CMD ["/coraza-spoa", "--config", "/config.yaml"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
version: "3.9" | ||
services: | ||
httpbin: | ||
image: mccutchen/go-httpbin:v2.13.4 | ||
environment: | ||
- MAX_BODY_SIZE=15728640 # 15 MiB | ||
command: [ "/bin/go-httpbin", "-port", "8081" ] | ||
ports: | ||
- "8081:8081" | ||
|
||
coraza-spoa: | ||
restart: unless-stopped | ||
build: | ||
context: .. | ||
dockerfile: ./example/Dockerfile | ||
ports: | ||
- "9000:9000" | ||
|
||
haproxy: | ||
restart: unless-stopped | ||
image: haproxy:2.7-alpine | ||
ports: [ "8080:80", "8443:443", "8082:8082"] | ||
depends_on: | ||
- httpbin | ||
links: | ||
- "coraza-spoa:coraza-spoa" | ||
- "httpbin:httpbin" | ||
volumes: | ||
- type: bind | ||
source: ./haproxy/ | ||
target: /usr/local/etc/haproxy | ||
environment: | ||
- BACKEND_HOST=httpbin:8081 | ||
- CORAZA_SPOA_HOST=coraza-spoa |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.