-
Notifications
You must be signed in to change notification settings - Fork 291
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
Fix HandleVisitor instrumentation for jetty >= 11.16.0 (avoids logged error) #7100
Merged
manuel-alvarez-alvarez
merged 2 commits into
master
from
malvarez/waf-fix-blocking-jetty-11
Jun 3, 2024
Merged
Fix HandleVisitor instrumentation for jetty >= 11.16.0 (avoids logged error) #7100
manuel-alvarez-alvarez
merged 2 commits into
master
from
malvarez/waf-fix-blocking-jetty-11
Jun 3, 2024
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
manuel-alvarez-alvarez
added
the
comp: asm waf
Application Security Management (WAF)
label
May 30, 2024
manuel-alvarez-alvarez
requested review from
a team,
smola,
jandro996 and
cataphract
May 30, 2024 16:17
This comment was marked as resolved.
This comment was marked as resolved.
smola
changed the title
Fix jetty HandleVisitor for jetty >= 11.16.0
Fix request blocking for jetty >= 11.16.0 (HandleVisitor)
May 30, 2024
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 49 metrics, 14 unstable metrics. Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.35.0-SNAPSHOT~f9498381d8, baseline=1.35.0-SNAPSHOT~f6c5dd3681
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.063 s) : 0, 1062749
Total [baseline] (8.537 s) : 0, 8537232
Agent [candidate] (1.057 s) : 0, 1056580
Total [candidate] (8.528 s) : 0, 8527778
section iast
Agent [baseline] (1.164 s) : 0, 1164273
Total [baseline] (8.988 s) : 0, 8987768
Agent [candidate] (1.166 s) : 0, 1166222
Total [candidate] (9.013 s) : 0, 9013286
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.176 s) : 0, 1175921
Total [baseline] (8.973 s) : 0, 8973148
Agent [candidate] (1.17 s) : 0, 1169573
Total [candidate] (9.01 s) : 0, 9010138
section iast_TELEMETRY_OFF
Agent [baseline] (1.16 s) : 0, 1160189
Total [baseline] (8.972 s) : 0, 8972060
Agent [candidate] (1.163 s) : 0, 1163435
Total [candidate] (8.982 s) : 0, 8981828
gantt
title insecure-bank - break down per module: candidate=1.35.0-SNAPSHOT~f9498381d8, baseline=1.35.0-SNAPSHOT~f6c5dd3681
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (655.832 ms) : 0, 655832
BytebuddyAgent [candidate] (652.14 ms) : 0, 652140
GlobalTracer [baseline] (313.709 ms) : 0, 313709
GlobalTracer [candidate] (311.879 ms) : 0, 311879
AppSec [baseline] (50.26 ms) : 0, 50260
AppSec [candidate] (49.86 ms) : 0, 49860
Remote Config [baseline] (666.989 µs) : 0, 667
Remote Config [candidate] (659.524 µs) : 0, 660
Telemetry [baseline] (7.551 ms) : 0, 7551
Telemetry [candidate] (7.518 ms) : 0, 7518
section iast
BytebuddyAgent [baseline] (777.579 ms) : 0, 777579
BytebuddyAgent [candidate] (778.594 ms) : 0, 778594
GlobalTracer [baseline] (291.547 ms) : 0, 291547
GlobalTracer [candidate] (291.79 ms) : 0, 291790
AppSec [baseline] (48.769 ms) : 0, 48769
AppSec [candidate] (46.365 ms) : 0, 46365
IAST [baseline] (24.079 ms) : 0, 24079
IAST [candidate] (26.474 ms) : 0, 26474
Remote Config [baseline] (612.132 µs) : 0, 612
Remote Config [candidate] (587.098 µs) : 0, 587
Telemetry [baseline] (8.431 ms) : 0, 8431
Telemetry [candidate] (9.103 ms) : 0, 9103
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (785.217 ms) : 0, 785217
BytebuddyAgent [candidate] (779.981 ms) : 0, 779981
GlobalTracer [baseline] (294.282 ms) : 0, 294282
GlobalTracer [candidate] (292.615 ms) : 0, 292615
AppSec [baseline] (47.872 ms) : 0, 47872
AppSec [candidate] (47.768 ms) : 0, 47768
IAST [baseline] (26.794 ms) : 0, 26794
IAST [candidate] (27.694 ms) : 0, 27694
Remote Config [baseline] (607.015 µs) : 0, 607
Remote Config [candidate] (583.117 µs) : 0, 583
Telemetry [baseline] (7.727 ms) : 0, 7727
Telemetry [candidate] (7.576 ms) : 0, 7576
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (774.421 ms) : 0, 774421
BytebuddyAgent [candidate] (776.462 ms) : 0, 776462
GlobalTracer [baseline] (291.039 ms) : 0, 291039
GlobalTracer [candidate] (291.845 ms) : 0, 291845
AppSec [baseline] (48.946 ms) : 0, 48946
AppSec [candidate] (48.22 ms) : 0, 48220
IAST [baseline] (23.667 ms) : 0, 23667
IAST [candidate] (23.826 ms) : 0, 23826
Remote Config [baseline] (637.607 µs) : 0, 638
Remote Config [candidate] (619.397 µs) : 0, 619
Telemetry [baseline] (8.235 ms) : 0, 8235
Telemetry [candidate] (9.127 ms) : 0, 9127
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.35.0-SNAPSHOT~f9498381d8, baseline=1.35.0-SNAPSHOT~f6c5dd3681
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.058 s) : 0, 1057884
Total [baseline] (10.329 s) : 0, 10328780
Agent [candidate] (1.059 s) : 0, 1058921
Total [candidate] (10.262 s) : 0, 10262047
section appsec
Agent [baseline] (1.188 s) : 0, 1188430
Total [baseline] (10.559 s) : 0, 10558542
Agent [candidate] (1.173 s) : 0, 1173442
Total [candidate] (10.493 s) : 0, 10493222
section iast
Agent [baseline] (1.167 s) : 0, 1167012
Total [baseline] (10.759 s) : 0, 10758781
Agent [candidate] (1.163 s) : 0, 1162877
Total [candidate] (10.688 s) : 0, 10688265
section profiling
Agent [baseline] (1.264 s) : 0, 1263698
Total [baseline] (10.626 s) : 0, 10625883
Agent [candidate] (1.267 s) : 0, 1266943
Total [candidate] (10.612 s) : 0, 10611504
gantt
title petclinic - break down per module: candidate=1.35.0-SNAPSHOT~f9498381d8, baseline=1.35.0-SNAPSHOT~f6c5dd3681
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (652.822 ms) : 0, 652822
BytebuddyAgent [candidate] (653.742 ms) : 0, 653742
GlobalTracer [baseline] (312.519 ms) : 0, 312519
GlobalTracer [candidate] (312.475 ms) : 0, 312475
AppSec [baseline] (49.877 ms) : 0, 49877
AppSec [candidate] (49.809 ms) : 0, 49809
Remote Config [baseline] (663.865 µs) : 0, 664
Remote Config [candidate] (659.797 µs) : 0, 660
Telemetry [baseline] (7.487 ms) : 0, 7487
Telemetry [candidate] (7.523 ms) : 0, 7523
section appsec
BytebuddyAgent [baseline] (683.567 ms) : 0, 683567
BytebuddyAgent [candidate] (673.687 ms) : 0, 673687
GlobalTracer [baseline] (298.775 ms) : 0, 298775
GlobalTracer [candidate] (295.178 ms) : 0, 295178
AppSec [baseline] (153.255 ms) : 0, 153255
AppSec [candidate] (152.508 ms) : 0, 152508
Remote Config [baseline] (618.019 µs) : 0, 618
Remote Config [candidate] (616.061 µs) : 0, 616
Telemetry [baseline] (7.819 ms) : 0, 7819
Telemetry [candidate] (7.713 ms) : 0, 7713
IAST [baseline] (18.957 ms) : 0, 18957
IAST [candidate] (18.711 ms) : 0, 18711
section iast
BytebuddyAgent [baseline] (780.061 ms) : 0, 780061
BytebuddyAgent [candidate] (776.54 ms) : 0, 776540
GlobalTracer [baseline] (292.279 ms) : 0, 292279
GlobalTracer [candidate] (290.753 ms) : 0, 290753
AppSec [baseline] (49.684 ms) : 0, 49684
AppSec [candidate] (47.871 ms) : 0, 47871
Remote Config [baseline] (608.882 µs) : 0, 609
Remote Config [candidate] (600.845 µs) : 0, 601
Telemetry [baseline] (7.757 ms) : 0, 7757
Telemetry [candidate] (7.59 ms) : 0, 7590
IAST [baseline] (23.347 ms) : 0, 23347
IAST [candidate] (26.32 ms) : 0, 26320
section profiling
BytebuddyAgent [baseline] (665.56 ms) : 0, 665560
BytebuddyAgent [candidate] (666.042 ms) : 0, 666042
GlobalTracer [baseline] (386.512 ms) : 0, 386512
GlobalTracer [candidate] (387.372 ms) : 0, 387372
AppSec [baseline] (50.688 ms) : 0, 50688
AppSec [candidate] (51.155 ms) : 0, 51155
Remote Config [baseline] (836.807 µs) : 0, 837
Remote Config [candidate] (864.777 µs) : 0, 865
Telemetry [baseline] (7.38 ms) : 0, 7380
Telemetry [candidate] (7.528 ms) : 0, 7528
ProfilingAgent [baseline] (95.804 ms) : 0, 95804
ProfilingAgent [candidate] (96.795 ms) : 0, 96795
Profiling [baseline] (95.829 ms) : 0, 95829
Profiling [candidate] (96.819 ms) : 0, 96819
LoadParameters
See matching parameters
SummaryFound 0 performance improvements and 1 performance regressions! Performance is the same for 10 metrics, 17 unstable metrics.
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.35.0-SNAPSHOT~f9498381d8, baseline=1.35.0-SNAPSHOT~f6c5dd3681
dateFormat X
axisFormat %s
section baseline
no_agent (1.343 ms) : 1324, 1362
. : milestone, 1343,
appsec (1.728 ms) : 1704, 1752
. : milestone, 1728,
appsec_no_iast (1.728 ms) : 1703, 1752
. : milestone, 1728,
iast (1.502 ms) : 1479, 1525
. : milestone, 1502,
profiling (1.48 ms) : 1456, 1504
. : milestone, 1480,
tracing (1.462 ms) : 1439, 1486
. : milestone, 1462,
section candidate
no_agent (1.342 ms) : 1321, 1362
. : milestone, 1342,
appsec (1.725 ms) : 1702, 1749
. : milestone, 1725,
appsec_no_iast (1.698 ms) : 1674, 1723
. : milestone, 1698,
iast (1.487 ms) : 1464, 1509
. : milestone, 1487,
profiling (1.55 ms) : 1517, 1583
. : milestone, 1550,
tracing (1.475 ms) : 1450, 1500
. : milestone, 1475,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.35.0-SNAPSHOT~f9498381d8, baseline=1.35.0-SNAPSHOT~f6c5dd3681
dateFormat X
axisFormat %s
section baseline
no_agent (366.936 µs) : 347, 386
. : milestone, 367,
iast (483.394 µs) : 462, 504
. : milestone, 483,
iast_FULL (551.287 µs) : 530, 572
. : milestone, 551,
iast_GLOBAL (515.361 µs) : 494, 537
. : milestone, 515,
iast_HARDCODED_SECRET_DISABLED (481.482 µs) : 461, 502
. : milestone, 481,
iast_INACTIVE (450.269 µs) : 429, 471
. : milestone, 450,
iast_TELEMETRY_OFF (467.054 µs) : 446, 488
. : milestone, 467,
tracing (439.44 µs) : 419, 460
. : milestone, 439,
section candidate
no_agent (369.773 µs) : 350, 389
. : milestone, 370,
iast (481.08 µs) : 460, 502
. : milestone, 481,
iast_FULL (551.031 µs) : 530, 572
. : milestone, 551,
iast_GLOBAL (506.926 µs) : 486, 528
. : milestone, 507,
iast_HARDCODED_SECRET_DISABLED (480.463 µs) : 459, 502
. : milestone, 480,
iast_INACTIVE (454.779 µs) : 433, 476
. : milestone, 455,
iast_TELEMETRY_OFF (472.235 µs) : 451, 493
. : milestone, 472,
tracing (444.182 µs) : 424, 465
. : milestone, 444,
DacapoParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 11 metrics, 1 unstable metrics. Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.35.0-SNAPSHOT~f9498381d8, baseline=1.35.0-SNAPSHOT~f6c5dd3681
dateFormat X
axisFormat %s
section baseline
no_agent (1.455 ms) : 1444, 1466
. : milestone, 1455,
appsec (2.181 ms) : 2148, 2214
. : milestone, 2181,
iast (1.956 ms) : 1915, 1996
. : milestone, 1956,
iast_GLOBAL (1.995 ms) : 1954, 2036
. : milestone, 1995,
profiling (1.845 ms) : 1813, 1878
. : milestone, 1845,
tracing (1.826 ms) : 1793, 1858
. : milestone, 1826,
section candidate
no_agent (1.46 ms) : 1448, 1471
. : milestone, 1460,
appsec (2.193 ms) : 2159, 2228
. : milestone, 2193,
iast (1.95 ms) : 1909, 1990
. : milestone, 1950,
iast_GLOBAL (1.991 ms) : 1951, 2032
. : milestone, 1991,
profiling (2.314 ms) : 2135, 2493
. : milestone, 2314,
tracing (1.819 ms) : 1787, 1850
. : milestone, 1819,
Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.35.0-SNAPSHOT~f9498381d8, baseline=1.35.0-SNAPSHOT~f6c5dd3681
dateFormat X
axisFormat %s
section baseline
no_agent (15.013 s) : 15013000, 15013000
. : milestone, 15013000,
appsec (15.001 s) : 15001000, 15001000
. : milestone, 15001000,
iast (18.593 s) : 18593000, 18593000
. : milestone, 18593000,
iast_GLOBAL (17.917 s) : 17917000, 17917000
. : milestone, 17917000,
profiling (15.254 s) : 15254000, 15254000
. : milestone, 15254000,
tracing (15.022 s) : 15022000, 15022000
. : milestone, 15022000,
section candidate
no_agent (15.077 s) : 15077000, 15077000
. : milestone, 15077000,
appsec (15.122 s) : 15122000, 15122000
. : milestone, 15122000,
iast (18.927 s) : 18927000, 18927000
. : milestone, 18927000,
iast_GLOBAL (17.644 s) : 17644000, 17644000
. : milestone, 17644000,
profiling (15.855 s) : 15855000, 15855000
. : milestone, 15855000,
tracing (15.214 s) : 15214000, 15214000
. : milestone, 15214000,
|
smola
changed the title
Fix request blocking for jetty >= 11.16.0 (HandleVisitor)
Fix HandleVisitor instrumentation for jetty >= 11.16.0 (avoids logged error)
May 31, 2024
smola
approved these changes
May 31, 2024
cataphract
approved these changes
May 31, 2024
manuel-alvarez-alvarez
force-pushed
the
malvarez/waf-fix-blocking-jetty-11
branch
3 times, most recently
from
June 3, 2024 09:05
175eeac
to
f949838
Compare
manuel-alvarez-alvarez
force-pushed
the
malvarez/waf-fix-blocking-jetty-11
branch
from
June 3, 2024 15:02
f949838
to
e29f846
Compare
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.
What Does This Do
Updates
HandleVisitor
used to instrumentHttpChannel
for blocking purposes in jetty, after version 11.16.0 the original code slightly changed causing a failure in the visitor and a warning message. Blocking was still working thanks of the instrumentation done inDispatchableInstrumentation
, this just effectively removes the logger error and allows to block the request earlier.Motivation
The instrumentation done by
HandleVisitor
is required to provide blocking capabilities in jetty.Additional Notes
jetty/jetty.project@9e16d81
Jira ticket: APPSEC-52394