Open sfc-gh-msathe opened 9 months ago
Initially we had issues with JSON and I think disabled JSON audit logging here but TinyGo and our own JSON infrastructure has improved a lot so we can probably look into enabling it.
Though either way with the native formatter and that configuration, I think full logs are supposed to be printed so we should doublecheck what could be going wrong.
Oh yeah now I remember, currently audit logs are disabled
https://github.com/corazawaf/coraza/blob/main/internal/auditlog/init_tinygo.go
I think we were hoping for https://github.com/proxy-wasm/spec/pull/38 to land someday but I guess it won't. In the meantime, we should probably implement audit logging anyways printing to the normal envoy logs as a start.
The modsecurity documentation says I should be able to get audit logs in JSON format with
SecAuditLogFormat json
.Is this supposed to work with proxy-wasm? I still get logs in the native format when this option is set. Also, How do I get the logs to print the request headers and bodies? I have
SecAuditLogParts ABIJDEFHZ
but it seems to emit very limited logs like the following:Just checking if there's anything super obvious I am missing. If it's supposed to work, I can dig deeper.