-
Notifications
You must be signed in to change notification settings - Fork 428
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
internal/appsec/waf: add WAF metrics #1225
Merged
Merged
Conversation
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
4667aa8
to
e6d5433
Compare
9ed3dac
to
a482cc0
Compare
e840845
to
e3ccfa0
Compare
- Add new common.go file holding code used by http and grpc - Add new structs used to compose Operation types for metrics/events - Update contribs to use the new factorized APIs, including grpc
e3ccfa0
to
9ebfe1d
Compare
9ebfe1d
to
a8dbd52
Compare
2825c15
to
583dbf4
Compare
Co-authored-by: Julio Guerra <julio@datadog.com>
0b9604e
to
89f9ef8
Compare
Julio-Guerra
requested changes
Apr 5, 2022
5aad370
to
67f7c7f
Compare
67f7c7f
to
2f5dda5
Compare
Julio-Guerra
reviewed
Apr 7, 2022
cc8235b
to
f7ee85c
Compare
Julio-Guerra
reviewed
Apr 7, 2022
Julio-Guerra
reviewed
Apr 7, 2022
Julio-Guerra
reviewed
Apr 7, 2022
Co-authored-by: Julio Guerra <julio@datadog.com>
5cfd271
to
06f0d21
Compare
Julio-Guerra
approved these changes
Apr 7, 2022
Hellzy
added a commit
that referenced
this pull request
Apr 8, 2022
… span tags (#1225) - Update libddwaf to 1.2.1 - Add WAF rule configuration and runtime metrics retrieval - Add WAF rule configuration and runtime metrics to spans - Update WAF bindings and add helper functions - Add WAF object decoder
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Sumary
This set of changes revolves around updating libddwaf to 1.21. The update introduces new WAF metrics which require
the library to implement WAF objects decoding in order to use them. These changes:
Changes
internal/appsec
internal/appsec/waf.go
: retrieve metrics using WAF bindings and store them in dyngo operationsinternal/appsec/dyngo/common.go
: add structures used for dyngo operation composition (metrics, security events...)internal/appsec/dyngo/instrumentation/grpcsec/grpc.go
: retrieve WAF metrics and store them in span tagsinternal/appsec/dyngo/instrumentation/grpcsec/grpc.go
: minor update due to function name changeinternal/appsec/dyngo/intstrumentation/httpsec/http.go
: retrieve WAF metrics and store them in span tagsinternal/appsec/waf/include/ddwafh
: update header to 1.21internal/appsec/waf/lib/*
: update libddwaf static library to 1.21internal/appsec/waf/waf.go
: implement WAF object decoder, update bindings to handle WAF metricsinternal/appsec/waf/waf_test.go
: add decoder and metrics testingcontrib
contrib/labstack/echo.v4/appsec.go
: store WAF metrics in span tagscontrib/gin-gonic/appsec.go
: store WAF metrics in span tagscontrib/google.golang.org/grpc/appsec.go
: store WAF metrics in span tags