-
Notifications
You must be signed in to change notification settings - Fork 306
Extract Vert.x json body response schemas #9001
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
base: master
Are you sure you want to change the base?
Conversation
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 47 metrics, 6 unstable metrics. Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.51.0-SNAPSHOT~3a7d412955, baseline=1.51.0-SNAPSHOT~d78bb4d2b2
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.004 s) : 0, 1003534
Total [baseline] (10.682 s) : 0, 10681812
Agent [candidate] (1.009 s) : 0, 1008753
Total [candidate] (10.747 s) : 0, 10747024
section appsec
Agent [baseline] (1.171 s) : 0, 1171268
Total [baseline] (10.727 s) : 0, 10727244
Agent [candidate] (1.174 s) : 0, 1174262
Total [candidate] (10.702 s) : 0, 10702499
section iast
Agent [baseline] (1.131 s) : 0, 1131361
Total [baseline] (10.815 s) : 0, 10815100
Agent [candidate] (1.133 s) : 0, 1132907
Total [candidate] (10.845 s) : 0, 10845368
section profiling
Agent [baseline] (1.242 s) : 0, 1242072
Total [baseline] (10.958 s) : 0, 10958389
Agent [candidate] (1.242 s) : 0, 1242119
Total [candidate] (11.107 s) : 0, 11106881
gantt
title petclinic - break down per module: candidate=1.51.0-SNAPSHOT~3a7d412955, baseline=1.51.0-SNAPSHOT~d78bb4d2b2
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (692.722 ms) : 0, 692722
BytebuddyAgent [candidate] (696.83 ms) : 0, 696830
GlobalTracer [baseline] (244.542 ms) : 0, 244542
GlobalTracer [candidate] (245.001 ms) : 0, 245001
AppSec [baseline] (30.265 ms) : 0, 30265
AppSec [candidate] (30.776 ms) : 0, 30776
Debugger [baseline] (6.105 ms) : 0, 6105
Debugger [candidate] (6.172 ms) : 0, 6172
Remote Config [baseline] (651.023 µs) : 0, 651
Remote Config [candidate] (665.524 µs) : 0, 666
Telemetry [baseline] (8.271 ms) : 0, 8271
Telemetry [candidate] (8.265 ms) : 0, 8265
section appsec
BytebuddyAgent [baseline] (708.491 ms) : 0, 708491
BytebuddyAgent [candidate] (711.269 ms) : 0, 711269
GlobalTracer [baseline] (236.005 ms) : 0, 236005
GlobalTracer [candidate] (236.313 ms) : 0, 236313
IAST [baseline] (21.872 ms) : 0, 21872
IAST [candidate] (21.916 ms) : 0, 21916
AppSec [baseline] (169.398 ms) : 0, 169398
AppSec [candidate] (169.269 ms) : 0, 169269
Debugger [baseline] (5.923 ms) : 0, 5923
Debugger [candidate] (5.818 ms) : 0, 5818
Remote Config [baseline] (604.809 µs) : 0, 605
Remote Config [candidate] (599.055 µs) : 0, 599
Telemetry [baseline] (8.158 ms) : 0, 8158
Telemetry [candidate] (8.243 ms) : 0, 8243
section iast
BytebuddyAgent [baseline] (808.399 ms) : 0, 808399
BytebuddyAgent [candidate] (809.135 ms) : 0, 809135
GlobalTracer [baseline] (232.861 ms) : 0, 232861
GlobalTracer [candidate] (233.351 ms) : 0, 233351
IAST [baseline] (25.218 ms) : 0, 25218
IAST [candidate] (27.644 ms) : 0, 27644
AppSec [baseline] (29.763 ms) : 0, 29763
AppSec [candidate] (27.602 ms) : 0, 27602
Debugger [baseline] (5.735 ms) : 0, 5735
Debugger [candidate] (5.805 ms) : 0, 5805
Remote Config [baseline] (594.076 µs) : 0, 594
Remote Config [candidate] (570.04 µs) : 0, 570
Telemetry [baseline] (7.875 ms) : 0, 7875
Telemetry [candidate] (7.945 ms) : 0, 7945
section profiling
BytebuddyAgent [baseline] (677.456 ms) : 0, 677456
BytebuddyAgent [candidate] (677.773 ms) : 0, 677773
GlobalTracer [baseline] (361.667 ms) : 0, 361667
GlobalTracer [candidate] (361.274 ms) : 0, 361274
AppSec [baseline] (30.239 ms) : 0, 30239
AppSec [candidate] (30.654 ms) : 0, 30654
Debugger [baseline] (11.241 ms) : 0, 11241
Debugger [candidate] (8.9 ms) : 0, 8900
Remote Config [baseline] (655.389 µs) : 0, 655
Remote Config [candidate] (656.119 µs) : 0, 656
Telemetry [baseline] (10.014 ms) : 0, 10014
Telemetry [candidate] (12.232 ms) : 0, 12232
ProfilingAgent [baseline] (102.137 ms) : 0, 102137
ProfilingAgent [candidate] (101.87 ms) : 0, 101870
Profiling [baseline] (102.162 ms) : 0, 102162
Profiling [candidate] (101.895 ms) : 0, 101895
Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.51.0-SNAPSHOT~3a7d412955, baseline=1.51.0-SNAPSHOT~d78bb4d2b2
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.003 s) : 0, 1003423
Total [baseline] (8.561 s) : 0, 8561049
Agent [candidate] (997.464 ms) : 0, 997464
Total [candidate] (8.578 s) : 0, 8577909
section iast
Agent [baseline] (1.13 s) : 0, 1129879
Total [baseline] (9.26 s) : 0, 9259667
Agent [candidate] (1.13 s) : 0, 1129899
Total [candidate] (9.301 s) : 0, 9300891
gantt
title insecure-bank - break down per module: candidate=1.51.0-SNAPSHOT~3a7d412955, baseline=1.51.0-SNAPSHOT~d78bb4d2b2
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (693.203 ms) : 0, 693203
BytebuddyAgent [candidate] (688.269 ms) : 0, 688269
GlobalTracer [baseline] (244.147 ms) : 0, 244147
GlobalTracer [candidate] (243.227 ms) : 0, 243227
AppSec [baseline] (30.113 ms) : 0, 30113
AppSec [candidate] (30.173 ms) : 0, 30173
Debugger [baseline] (6.065 ms) : 0, 6065
Debugger [candidate] (6.068 ms) : 0, 6068
Remote Config [baseline] (664.982 µs) : 0, 665
Remote Config [candidate] (654.517 µs) : 0, 655
Telemetry [baseline] (8.204 ms) : 0, 8204
Telemetry [candidate] (8.118 ms) : 0, 8118
section iast
BytebuddyAgent [baseline] (806.69 ms) : 0, 806690
BytebuddyAgent [candidate] (806.617 ms) : 0, 806617
GlobalTracer [baseline] (232.464 ms) : 0, 232464
GlobalTracer [candidate] (233.012 ms) : 0, 233012
IAST [baseline] (26.889 ms) : 0, 26889
IAST [candidate] (29.259 ms) : 0, 29259
AppSec [baseline] (28.592 ms) : 0, 28592
AppSec [candidate] (25.886 ms) : 0, 25886
Debugger [baseline] (5.834 ms) : 0, 5834
Debugger [candidate] (5.83 ms) : 0, 5830
Remote Config [baseline] (587.695 µs) : 0, 588
Remote Config [candidate] (576.32 µs) : 0, 576
Telemetry [baseline] (7.981 ms) : 0, 7981
Telemetry [candidate] (7.911 ms) : 0, 7911
LoadParameters
See matching parameters
SummaryFound 1 performance improvements and 3 performance regressions! Performance is the same for 8 metrics, 12 unstable metrics.
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.51.0-SNAPSHOT~3a7d412955, baseline=1.51.0-SNAPSHOT~d78bb4d2b2
dateFormat X
axisFormat %s
section baseline
no_agent (4.447 ms) : 4388, 4505
. : milestone, 4447,
iast (9.008 ms) : 8862, 9154
. : milestone, 9008,
iast_FULL (13.976 ms) : 13693, 14258
. : milestone, 13976,
iast_GLOBAL (9.87 ms) : 9701, 10039
. : milestone, 9870,
profiling (9.233 ms) : 9085, 9381
. : milestone, 9233,
tracing (7.819 ms) : 7702, 7937
. : milestone, 7819,
section candidate
no_agent (4.451 ms) : 4400, 4503
. : milestone, 4451,
iast (8.987 ms) : 8842, 9132
. : milestone, 8987,
iast_FULL (13.773 ms) : 13495, 14050
. : milestone, 13773,
iast_GLOBAL (9.855 ms) : 9684, 10026
. : milestone, 9855,
profiling (8.732 ms) : 8599, 8864
. : milestone, 8732,
tracing (7.876 ms) : 7763, 7990
. : milestone, 7876,
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.51.0-SNAPSHOT~3a7d412955, baseline=1.51.0-SNAPSHOT~d78bb4d2b2
dateFormat X
axisFormat %s
section baseline
no_agent (35.703 ms) : 35413, 35993
. : milestone, 35703,
appsec (45.17 ms) : 44778, 45561
. : milestone, 45170,
code_origins (44.741 ms) : 44388, 45094
. : milestone, 44741,
iast (44.004 ms) : 43619, 44390
. : milestone, 44004,
profiling (46.989 ms) : 46538, 47440
. : milestone, 46989,
tracing (42.83 ms) : 42493, 43167
. : milestone, 42830,
section candidate
no_agent (37.56 ms) : 37253, 37866
. : milestone, 37560,
appsec (48.146 ms) : 47720, 48571
. : milestone, 48146,
code_origins (45.796 ms) : 45408, 46184
. : milestone, 45796,
iast (43.633 ms) : 43256, 44010
. : milestone, 43633,
profiling (50.552 ms) : 50060, 51045
. : milestone, 50552,
tracing (43.919 ms) : 43544, 44293
. : milestone, 43919,
DacapoParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 12 metrics, 0 unstable metrics. Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.51.0-SNAPSHOT~3a7d412955, baseline=1.51.0-SNAPSHOT~d78bb4d2b2
dateFormat X
axisFormat %s
section baseline
no_agent (15.53 s) : 15530000, 15530000
. : milestone, 15530000,
appsec (14.922 s) : 14922000, 14922000
. : milestone, 14922000,
iast (18.289 s) : 18289000, 18289000
. : milestone, 18289000,
iast_GLOBAL (17.854 s) : 17854000, 17854000
. : milestone, 17854000,
profiling (15.139 s) : 15139000, 15139000
. : milestone, 15139000,
tracing (15.104 s) : 15104000, 15104000
. : milestone, 15104000,
section candidate
no_agent (15.231 s) : 15231000, 15231000
. : milestone, 15231000,
appsec (14.829 s) : 14829000, 14829000
. : milestone, 14829000,
iast (18.488 s) : 18488000, 18488000
. : milestone, 18488000,
iast_GLOBAL (18.038 s) : 18038000, 18038000
. : milestone, 18038000,
profiling (15.342 s) : 15342000, 15342000
. : milestone, 15342000,
tracing (15.139 s) : 15139000, 15139000
. : milestone, 15139000,
Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.51.0-SNAPSHOT~3a7d412955, baseline=1.51.0-SNAPSHOT~d78bb4d2b2
dateFormat X
axisFormat %s
section baseline
no_agent (1.471 ms) : 1460, 1483
. : milestone, 1471,
appsec (2.382 ms) : 2335, 2430
. : milestone, 2382,
iast (2.178 ms) : 2117, 2238
. : milestone, 2178,
iast_GLOBAL (2.223 ms) : 2161, 2284
. : milestone, 2223,
profiling (2.039 ms) : 1989, 2088
. : milestone, 2039,
tracing (2.001 ms) : 1954, 2048
. : milestone, 2001,
section candidate
no_agent (1.471 ms) : 1459, 1482
. : milestone, 1471,
appsec (2.386 ms) : 2338, 2434
. : milestone, 2386,
iast (2.167 ms) : 2106, 2227
. : milestone, 2167,
iast_GLOBAL (2.218 ms) : 2157, 2279
. : milestone, 2218,
profiling (2.038 ms) : 1988, 2088
. : milestone, 2038,
tracing (1.985 ms) : 1938, 2031
. : milestone, 1985,
|
e6d0da9
to
bf5e01e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct me if I'm wrong but I feel that we are missing this part of the RFC
DD_API_SECURITY_PARSE_RESPONSE_BODY: this is a configuration option which libraries with the ability to parse the response body must implement to allow the user to disable this feature. With a true, or equivalent value, response body parsing should be enabled. If implemented, the default value of this configuration option must be true.
There is also a system test that validates this
tests/appsec/api_security/test_schemas.py::Test_Schema_Response_Body_env_var::test_request_method
Yep, parsing the body is not going to be implemented in the library at the moment. |
5ae3d48
to
aac9883
Compare
37afc9b
to
3fabdcd
Compare
dd-java-agent/appsec/src/main/java/com/datadog/appsec/gateway/GatewayBridge.java
Outdated
Show resolved
Hide resolved
dd-java-agent/testing/src/main/groovy/datadog/trace/agent/test/base/HttpServerTest.groovy
Outdated
Show resolved
Hide resolved
internal-api/src/main/java/datadog/trace/api/gateway/Events.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! just a bunch of questions
3fabdcd
to
fe0c272
Compare
aac9883
to
ad5e01d
Compare
25ab23e
to
24b6231
Compare
ad5e01d
to
cf0f8aa
Compare
d9fd6aa
to
5194553
Compare
5194553
to
3a7d412
Compare
What Does This Do
Adds response body extraction for Vert.x JSON endpoints to enable automatic API schema discovery and protection by the Web Application Firewall (WAF). Support is for Vert.x >= 4.x (leverages new JSON response API introduced in v4.x)
Motivation
Additional Notes
Contributor Checklist
type:
and (comp:
orinst:
) labels in addition to any usefull labelsclose
,fix
or any linking keywords when referencing an issue.Use
solves
instead, and assign the PR milestone to the issueJira ticket: APPSEC-57920