-
Notifications
You must be signed in to change notification settings - Fork 300
Enabling baggage cache to support limits and non-ascii characters #8713
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 5 performance improvements and 5 performance regressions! Performance is the same for 49 metrics, 12 unstable metrics.
Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.49.0-SNAPSHOT~03d4b1c252, baseline=1.49.0-SNAPSHOT~de593cc116
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.066 s) : 0, 1066461
Total [baseline] (8.714 s) : 0, 8713782
Agent [candidate] (1.065 s) : 0, 1064807
Total [candidate] (8.68 s) : 0, 8679573
section iast
Agent [baseline] (1.189 s) : 0, 1188872
Total [baseline] (9.264 s) : 0, 9264045
Agent [candidate] (1.199 s) : 0, 1198872
Total [candidate] (9.258 s) : 0, 9258099
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.19 s) : 0, 1189610
Total [baseline] (9.217 s) : 0, 9216878
Agent [candidate] (1.189 s) : 0, 1188569
Total [candidate] (9.204 s) : 0, 9203541
section iast_TELEMETRY_OFF
Agent [baseline] (1.185 s) : 0, 1185317
Total [baseline] (9.198 s) : 0, 9197505
Agent [candidate] (1.181 s) : 0, 1180772
Total [candidate] (9.245 s) : 0, 9245028
gantt
title insecure-bank - break down per module: candidate=1.49.0-SNAPSHOT~03d4b1c252, baseline=1.49.0-SNAPSHOT~de593cc116
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (727.238 ms) : 0, 727238
BytebuddyAgent [candidate] (726.093 ms) : 0, 726093
GlobalTracer [baseline] (241.075 ms) : 0, 241075
GlobalTracer [candidate] (240.815 ms) : 0, 240815
AppSec [baseline] (56.329 ms) : 0, 56329
AppSec [candidate] (55.281 ms) : 0, 55281
Debugger [baseline] (8.378 ms) : 0, 8378
Debugger [candidate] (5.069 ms) : 0, 5069
Remote Config [baseline] (699.102 µs) : 0, 699
Remote Config [candidate] (1.81 ms) : 0, 1810
Telemetry [baseline] (9.17 ms) : 0, 9170
Telemetry [candidate] (12.161 ms) : 0, 12161
section iast
BytebuddyAgent [baseline] (842.428 ms) : 0, 842428
BytebuddyAgent [candidate] (849.457 ms) : 0, 849457
GlobalTracer [baseline] (229.962 ms) : 0, 229962
GlobalTracer [candidate] (232.224 ms) : 0, 232224
AppSec [baseline] (52.916 ms) : 0, 52916
AppSec [candidate] (55.763 ms) : 0, 55763
Debugger [baseline] (5.912 ms) : 0, 5912
Debugger [candidate] (4.274 ms) : 0, 4274
Remote Config [baseline] (599.693 µs) : 0, 600
Remote Config [candidate] (612.414 µs) : 0, 612
Telemetry [baseline] (7.926 ms) : 0, 7926
Telemetry [candidate] (8.825 ms) : 0, 8825
IAST [baseline] (23.43 ms) : 0, 23430
IAST [candidate] (24.029 ms) : 0, 24029
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (842.373 ms) : 0, 842373
BytebuddyAgent [candidate] (842.294 ms) : 0, 842294
GlobalTracer [baseline] (230.364 ms) : 0, 230364
GlobalTracer [candidate] (229.903 ms) : 0, 229903
AppSec [baseline] (52.108 ms) : 0, 52108
AppSec [candidate] (56.377 ms) : 0, 56377
Debugger [baseline] (5.917 ms) : 0, 5917
Debugger [candidate] (4.265 ms) : 0, 4265
Remote Config [baseline] (596.398 µs) : 0, 596
Remote Config [candidate] (611.49 µs) : 0, 611
Telemetry [baseline] (7.966 ms) : 0, 7966
Telemetry [candidate] (8.703 ms) : 0, 8703
IAST [baseline] (25.307 ms) : 0, 25307
IAST [candidate] (22.947 ms) : 0, 22947
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (839.397 ms) : 0, 839397
BytebuddyAgent [candidate] (836.492 ms) : 0, 836492
GlobalTracer [baseline] (229.663 ms) : 0, 229663
GlobalTracer [candidate] (229.585 ms) : 0, 229585
AppSec [baseline] (56.149 ms) : 0, 56149
AppSec [candidate] (55.839 ms) : 0, 55839
Debugger [baseline] (5.896 ms) : 0, 5896
Debugger [candidate] (4.156 ms) : 0, 4156
Remote Config [baseline] (615.509 µs) : 0, 616
Remote Config [candidate] (612.677 µs) : 0, 613
Telemetry [baseline] (7.74 ms) : 0, 7740
Telemetry [candidate] (8.585 ms) : 0, 8585
IAST [baseline] (22.436 ms) : 0, 22436
IAST [candidate] (22.155 ms) : 0, 22155
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.49.0-SNAPSHOT~03d4b1c252, baseline=1.49.0-SNAPSHOT~de593cc116
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.06 s) : 0, 1059833
Total [baseline] (10.521 s) : 0, 10520988
Agent [candidate] (1.058 s) : 0, 1058475
Total [candidate] (10.584 s) : 0, 10584301
section appsec
Agent [baseline] (1.204 s) : 0, 1203730
Total [baseline] (10.689 s) : 0, 10689295
Agent [candidate] (1.198 s) : 0, 1198334
Total [candidate] (10.752 s) : 0, 10752385
section iast
Agent [baseline] (1.19 s) : 0, 1189740
Total [baseline] (10.923 s) : 0, 10922505
Agent [candidate] (1.19 s) : 0, 1189951
Total [candidate] (11.056 s) : 0, 11055893
section profiling
Agent [baseline] (1.313 s) : 0, 1312742
Total [baseline] (10.757 s) : 0, 10757266
Agent [candidate] (1.308 s) : 0, 1308460
Total [candidate] (10.907 s) : 0, 10906764
gantt
title petclinic - break down per module: candidate=1.49.0-SNAPSHOT~03d4b1c252, baseline=1.49.0-SNAPSHOT~de593cc116
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (723.233 ms) : 0, 723233
BytebuddyAgent [candidate] (721.958 ms) : 0, 721958
GlobalTracer [baseline] (239.215 ms) : 0, 239215
GlobalTracer [candidate] (239.189 ms) : 0, 239189
AppSec [baseline] (54.238 ms) : 0, 54238
AppSec [candidate] (55.962 ms) : 0, 55962
Debugger [baseline] (9.809 ms) : 0, 9809
Debugger [candidate] (4.356 ms) : 0, 4356
Remote Config [baseline] (679.527 µs) : 0, 680
Remote Config [candidate] (691.242 µs) : 0, 691
Telemetry [baseline] (9.046 ms) : 0, 9046
Telemetry [candidate] (12.947 ms) : 0, 12947
section appsec
BytebuddyAgent [baseline] (742.93 ms) : 0, 742930
BytebuddyAgent [candidate] (739.014 ms) : 0, 739014
GlobalTracer [baseline] (236.557 ms) : 0, 236557
GlobalTracer [candidate] (236.494 ms) : 0, 236494
AppSec [baseline] (174.885 ms) : 0, 174885
AppSec [candidate] (175.389 ms) : 0, 175389
Debugger [baseline] (6.341 ms) : 0, 6341
Debugger [candidate] (4.21 ms) : 0, 4210
Remote Config [baseline] (628.031 µs) : 0, 628
Remote Config [candidate] (635.206 µs) : 0, 635
Telemetry [baseline] (7.79 ms) : 0, 7790
Telemetry [candidate] (8.167 ms) : 0, 8167
IAST [baseline] (21.944 ms) : 0, 21944
IAST [candidate] (21.967 ms) : 0, 21967
section iast
BytebuddyAgent [baseline] (843.206 ms) : 0, 843206
BytebuddyAgent [candidate] (842.581 ms) : 0, 842581
GlobalTracer [baseline] (229.559 ms) : 0, 229559
GlobalTracer [candidate] (230.801 ms) : 0, 230801
AppSec [baseline] (54.792 ms) : 0, 54792
AppSec [candidate] (56.416 ms) : 0, 56416
Debugger [baseline] (5.959 ms) : 0, 5959
Debugger [candidate] (4.269 ms) : 0, 4269
Remote Config [baseline] (595.42 µs) : 0, 595
Remote Config [candidate] (614.185 µs) : 0, 614
Telemetry [baseline] (7.786 ms) : 0, 7786
Telemetry [candidate] (8.764 ms) : 0, 8764
IAST [baseline] (22.807 ms) : 0, 22807
IAST [candidate] (23.004 ms) : 0, 23004
section profiling
BytebuddyAgent [baseline] (714.189 ms) : 0, 714189
BytebuddyAgent [candidate] (712.74 ms) : 0, 712740
GlobalTracer [baseline] (376.767 ms) : 0, 376767
GlobalTracer [candidate] (376.01 ms) : 0, 376010
AppSec [baseline] (53.972 ms) : 0, 53972
AppSec [candidate] (53.312 ms) : 0, 53312
Debugger [baseline] (6.152 ms) : 0, 6152
Debugger [candidate] (4.381 ms) : 0, 4381
Remote Config [baseline] (652.526 µs) : 0, 653
Remote Config [candidate] (647.222 µs) : 0, 647
Telemetry [baseline] (8.067 ms) : 0, 8067
Telemetry [candidate] (8.905 ms) : 0, 8905
ProfilingAgent [baseline] (102.598 ms) : 0, 102598
ProfilingAgent [candidate] (102.175 ms) : 0, 102175
Profiling [baseline] (102.622 ms) : 0, 102622
Profiling [candidate] (102.201 ms) : 0, 102201
LoadParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 12 metrics, 18 unstable metrics. Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.49.0-SNAPSHOT~03d4b1c252, baseline=1.49.0-SNAPSHOT~de593cc116
dateFormat X
axisFormat %s
section baseline
no_agent (385.945 µs) : 366, 406
. : milestone, 386,
iast (520.849 µs) : 499, 543
. : milestone, 521,
iast_FULL (732.141 µs) : 709, 756
. : milestone, 732,
iast_GLOBAL (557.13 µs) : 534, 580
. : milestone, 557,
iast_HARDCODED_SECRET_DISABLED (521.29 µs) : 498, 545
. : milestone, 521,
iast_INACTIVE (469.939 µs) : 447, 493
. : milestone, 470,
iast_TELEMETRY_OFF (513.188 µs) : 490, 536
. : milestone, 513,
tracing (449.37 µs) : 429, 470
. : milestone, 449,
section candidate
no_agent (380.916 µs) : 360, 402
. : milestone, 381,
iast (509.655 µs) : 488, 532
. : milestone, 510,
iast_FULL (731.786 µs) : 710, 754
. : milestone, 732,
iast_GLOBAL (556.772 µs) : 535, 579
. : milestone, 557,
iast_HARDCODED_SECRET_DISABLED (513.336 µs) : 491, 535
. : milestone, 513,
iast_INACTIVE (468.315 µs) : 447, 490
. : milestone, 468,
iast_TELEMETRY_OFF (495.407 µs) : 474, 517
. : milestone, 495,
tracing (454.561 µs) : 433, 476
. : milestone, 455,
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.49.0-SNAPSHOT~03d4b1c252, baseline=1.49.0-SNAPSHOT~de593cc116
dateFormat X
axisFormat %s
section baseline
no_agent (1.345 ms) : 1326, 1365
. : milestone, 1345,
appsec (1.755 ms) : 1731, 1779
. : milestone, 1755,
appsec_no_iast (1.716 ms) : 1692, 1740
. : milestone, 1716,
code_origins (1.688 ms) : 1660, 1715
. : milestone, 1688,
iast (1.493 ms) : 1469, 1517
. : milestone, 1493,
profiling (1.506 ms) : 1483, 1529
. : milestone, 1506,
tracing (1.491 ms) : 1467, 1516
. : milestone, 1491,
section candidate
no_agent (1.349 ms) : 1329, 1368
. : milestone, 1349,
appsec (1.742 ms) : 1718, 1765
. : milestone, 1742,
appsec_no_iast (1.716 ms) : 1692, 1740
. : milestone, 1716,
code_origins (1.693 ms) : 1666, 1720
. : milestone, 1693,
iast (1.521 ms) : 1496, 1545
. : milestone, 1521,
profiling (1.508 ms) : 1484, 1531
. : milestone, 1508,
tracing (1.492 ms) : 1467, 1517
. : milestone, 1492,
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 tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.49.0-SNAPSHOT~03d4b1c252, baseline=1.49.0-SNAPSHOT~de593cc116
dateFormat X
axisFormat %s
section baseline
no_agent (1.478 ms) : 1467, 1490
. : milestone, 1478,
appsec (2.376 ms) : 2330, 2422
. : milestone, 2376,
iast (2.161 ms) : 2103, 2220
. : milestone, 2161,
iast_GLOBAL (2.2 ms) : 2141, 2259
. : milestone, 2200,
profiling (2.003 ms) : 1957, 2050
. : milestone, 2003,
tracing (1.991 ms) : 1946, 2036
. : milestone, 1991,
section candidate
no_agent (1.476 ms) : 1464, 1487
. : milestone, 1476,
appsec (2.388 ms) : 2342, 2435
. : milestone, 2388,
iast (2.17 ms) : 2111, 2229
. : milestone, 2170,
iast_GLOBAL (2.207 ms) : 2148, 2266
. : milestone, 2207,
profiling (2.037 ms) : 1989, 2086
. : milestone, 2037,
tracing (1.994 ms) : 1949, 2039
. : milestone, 1994,
Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.49.0-SNAPSHOT~03d4b1c252, baseline=1.49.0-SNAPSHOT~de593cc116
dateFormat X
axisFormat %s
section baseline
no_agent (14.858 s) : 14858000, 14858000
. : milestone, 14858000,
appsec (14.935 s) : 14935000, 14935000
. : milestone, 14935000,
iast (19.284 s) : 19284000, 19284000
. : milestone, 19284000,
iast_GLOBAL (18.15 s) : 18150000, 18150000
. : milestone, 18150000,
profiling (15.006 s) : 15006000, 15006000
. : milestone, 15006000,
tracing (14.921 s) : 14921000, 14921000
. : milestone, 14921000,
section candidate
no_agent (15.229 s) : 15229000, 15229000
. : milestone, 15229000,
appsec (15.233 s) : 15233000, 15233000
. : milestone, 15233000,
iast (18.829 s) : 18829000, 18829000
. : milestone, 18829000,
iast_GLOBAL (17.917 s) : 17917000, 17917000
. : milestone, 17917000,
profiling (15.118 s) : 15118000, 15118000
. : milestone, 15118000,
tracing (15.104 s) : 15104000, 15104000
. : milestone, 15104000,
|
Hi! 👋 Thanks for your pull request! 🎉 To help us review it, please make sure to:
If you need help, please check our contributing guidelines. |
public boolean keyNeedsEncoding(String key) { | ||
int slen = key.length(); | ||
for (int index = 0; index < slen; index++) { | ||
char c = key.charAt(index); | ||
if (needsEncoding(c, unsafeKeyOctets)) { | ||
return true; | ||
} | ||
} | ||
return false; | ||
} | ||
|
||
public boolean valNeedsEncoding(String val) { |
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.
I included both of these to avoid checking which unsafe characters to use for each string we decode. Let me know if that is preferred for code-conciseness
I had a quick look Today but will complete the review Tomorrow. |
No I have not, I will look into that today! |
Temporarily, the baggage propagator benchmarks are included here! |
What Does This Do
Previously, the Baggage Cache implemented injected incoming headers if no modification to baggage was made while ignoring limits. In order to be in compliance with limits, this PR adds support to truncate the baggage cache if limits are violated. Furthermore, Java does not support sending non-ascii characters in http headers. This PR also forcefully builds a outgoing baggage header if the incoming header includes non-encoded non-ascii characters by disabling the cache when extracting such headers.
Motivation
Additional Notes
Verified through unit tests and system-tests in
test_baggage.py
.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: [PROJ-IDENT]