-
Notifications
You must be signed in to change notification settings - Fork 303
Extended appsec request/response headers collection #8724
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
Conversation
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 57 metrics, 14 unstable metrics. Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.50.0-SNAPSHOT~1989174a13, baseline=1.50.0-SNAPSHOT~0f42e0a463
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.021 s) : 0, 1021283
Total [baseline] (10.563 s) : 0, 10562812
Agent [candidate] (1.019 s) : 0, 1018591
Total [candidate] (10.542 s) : 0, 10542307
section appsec
Agent [baseline] (1.164 s) : 0, 1164055
Total [baseline] (10.701 s) : 0, 10700529
Agent [candidate] (1.164 s) : 0, 1164330
Total [candidate] (10.703 s) : 0, 10703045
section iast
Agent [baseline] (1.15 s) : 0, 1150020
Total [baseline] (10.908 s) : 0, 10908235
Agent [candidate] (1.151 s) : 0, 1150743
Total [candidate] (10.882 s) : 0, 10882471
section profiling
Agent [baseline] (1.277 s) : 0, 1276635
Total [baseline] (10.847 s) : 0, 10847246
Agent [candidate] (1.28 s) : 0, 1280174
Total [candidate] (10.831 s) : 0, 10831204
gantt
title petclinic - break down per module: candidate=1.50.0-SNAPSHOT~1989174a13, baseline=1.50.0-SNAPSHOT~0f42e0a463
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (682.145 ms) : 0, 682145
BytebuddyAgent [candidate] (682.614 ms) : 0, 682614
GlobalTracer [baseline] (240.494 ms) : 0, 240494
GlobalTracer [candidate] (239.899 ms) : 0, 239899
AppSec [baseline] (55.268 ms) : 0, 55268
AppSec [candidate] (54.169 ms) : 0, 54169
Debugger [baseline] (8.3 ms) : 0, 8300
Debugger [candidate] (6.162 ms) : 0, 6162
Remote Config [baseline] (714.598 µs) : 0, 715
Remote Config [candidate] (698.767 µs) : 0, 699
Telemetry [baseline] (10.796 ms) : 0, 10796
Telemetry [candidate] (11.46 ms) : 0, 11460
section appsec
BytebuddyAgent [baseline] (703.478 ms) : 0, 703478
BytebuddyAgent [candidate] (702.704 ms) : 0, 702704
GlobalTracer [baseline] (236.65 ms) : 0, 236650
GlobalTracer [candidate] (236.654 ms) : 0, 236654
AppSec [baseline] (175.53 ms) : 0, 175530
AppSec [candidate] (176.477 ms) : 0, 176477
Debugger [baseline] (5.949 ms) : 0, 5949
Debugger [candidate] (5.964 ms) : 0, 5964
Remote Config [baseline] (627.355 µs) : 0, 627
Remote Config [candidate] (625.072 µs) : 0, 625
Telemetry [baseline] (7.401 ms) : 0, 7401
Telemetry [candidate] (7.42 ms) : 0, 7420
IAST [baseline] (21.583 ms) : 0, 21583
IAST [candidate] (21.726 ms) : 0, 21726
section iast
BytebuddyAgent [baseline] (802.714 ms) : 0, 802714
BytebuddyAgent [candidate] (803.712 ms) : 0, 803712
GlobalTracer [baseline] (230.807 ms) : 0, 230807
GlobalTracer [candidate] (230.577 ms) : 0, 230577
AppSec [baseline] (48.516 ms) : 0, 48516
AppSec [candidate] (53.623 ms) : 0, 53623
Debugger [baseline] (5.91 ms) : 0, 5910
Debugger [candidate] (5.874 ms) : 0, 5874
Remote Config [baseline] (589.857 µs) : 0, 590
Remote Config [candidate] (584.968 µs) : 0, 585
Telemetry [baseline] (7.892 ms) : 0, 7892
Telemetry [candidate] (7.887 ms) : 0, 7887
IAST [baseline] (29.334 ms) : 0, 29334
IAST [candidate] (24.98 ms) : 0, 24980
section profiling
BytebuddyAgent [baseline] (672.36 ms) : 0, 672360
BytebuddyAgent [candidate] (674.436 ms) : 0, 674436
GlobalTracer [baseline] (374.151 ms) : 0, 374151
GlobalTracer [candidate] (374.241 ms) : 0, 374241
AppSec [baseline] (61.694 ms) : 0, 61694
AppSec [candidate] (62.036 ms) : 0, 62036
Debugger [baseline] (6.223 ms) : 0, 6223
Debugger [candidate] (6.295 ms) : 0, 6295
Remote Config [baseline] (649.033 µs) : 0, 649
Remote Config [candidate] (671.533 µs) : 0, 672
Telemetry [baseline] (8.122 ms) : 0, 8122
Telemetry [candidate] (8.205 ms) : 0, 8205
ProfilingAgent [baseline] (102.487 ms) : 0, 102487
ProfilingAgent [candidate] (103.396 ms) : 0, 103396
Profiling [baseline] (102.511 ms) : 0, 102511
Profiling [candidate] (103.42 ms) : 0, 103420
Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.50.0-SNAPSHOT~1989174a13, baseline=1.50.0-SNAPSHOT~0f42e0a463
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.03 s) : 0, 1030253
Total [baseline] (8.675 s) : 0, 8675163
Agent [candidate] (1.042 s) : 0, 1041855
Total [candidate] (8.735 s) : 0, 8734881
section iast
Agent [baseline] (1.158 s) : 0, 1157835
Total [baseline] (9.258 s) : 0, 9257838
Agent [candidate] (1.149 s) : 0, 1148850
Total [candidate] (9.247 s) : 0, 9246672
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.148 s) : 0, 1147822
Total [baseline] (9.216 s) : 0, 9215585
Agent [candidate] (1.153 s) : 0, 1153215
Total [candidate] (9.27 s) : 0, 9270282
section iast_TELEMETRY_OFF
Agent [baseline] (1.146 s) : 0, 1146490
Total [baseline] (9.239 s) : 0, 9239125
Agent [candidate] (1.144 s) : 0, 1144447
Total [candidate] (9.245 s) : 0, 9245190
gantt
title insecure-bank - break down per module: candidate=1.50.0-SNAPSHOT~1989174a13, baseline=1.50.0-SNAPSHOT~0f42e0a463
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (689.11 ms) : 0, 689110
BytebuddyAgent [candidate] (697.372 ms) : 0, 697372
GlobalTracer [baseline] (241.958 ms) : 0, 241958
GlobalTracer [candidate] (244.725 ms) : 0, 244725
AppSec [baseline] (55.04 ms) : 0, 55040
AppSec [candidate] (56.721 ms) : 0, 56721
Debugger [baseline] (10.595 ms) : 0, 10595
Debugger [candidate] (8.455 ms) : 0, 8455
Remote Config [baseline] (720.123 µs) : 0, 720
Remote Config [candidate] (707.471 µs) : 0, 707
Telemetry [baseline] (9.144 ms) : 0, 9144
Telemetry [candidate] (9.885 ms) : 0, 9885
section iast
BytebuddyAgent [baseline] (808.491 ms) : 0, 808491
BytebuddyAgent [candidate] (802.005 ms) : 0, 802005
GlobalTracer [baseline] (231.938 ms) : 0, 231938
GlobalTracer [candidate] (230.558 ms) : 0, 230558
IAST [baseline] (29.12 ms) : 0, 29120
IAST [candidate] (26.013 ms) : 0, 26013
AppSec [baseline] (50.069 ms) : 0, 50069
AppSec [candidate] (49.36 ms) : 0, 49360
Debugger [baseline] (5.949 ms) : 0, 5949
Debugger [candidate] (5.886 ms) : 0, 5886
Remote Config [baseline] (598.922 µs) : 0, 599
Remote Config [candidate] (580.772 µs) : 0, 581
Telemetry [baseline] (7.97 ms) : 0, 7970
Telemetry [candidate] (7.842 ms) : 0, 7842
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (800.515 ms) : 0, 800515
BytebuddyAgent [candidate] (803.867 ms) : 0, 803867
GlobalTracer [baseline] (230.196 ms) : 0, 230196
GlobalTracer [candidate] (232.233 ms) : 0, 232233
IAST [baseline] (27.75 ms) : 0, 27750
IAST [candidate] (29.364 ms) : 0, 29364
AppSec [baseline] (51.359 ms) : 0, 51359
AppSec [candidate] (49.78 ms) : 0, 49780
Debugger [baseline] (5.962 ms) : 0, 5962
Debugger [candidate] (5.905 ms) : 0, 5905
Remote Config [baseline] (603.347 µs) : 0, 603
Remote Config [candidate] (583.409 µs) : 0, 583
Telemetry [baseline] (7.965 ms) : 0, 7965
Telemetry [candidate] (7.925 ms) : 0, 7925
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (800.717 ms) : 0, 800717
BytebuddyAgent [candidate] (798.121 ms) : 0, 798121
GlobalTracer [baseline] (229.643 ms) : 0, 229643
GlobalTracer [candidate] (230.312 ms) : 0, 230312
IAST [baseline] (23.219 ms) : 0, 23219
IAST [candidate] (23.083 ms) : 0, 23083
AppSec [baseline] (55.162 ms) : 0, 55162
AppSec [candidate] (55.064 ms) : 0, 55064
Debugger [baseline] (5.946 ms) : 0, 5946
Debugger [candidate] (5.929 ms) : 0, 5929
Remote Config [baseline] (602.284 µs) : 0, 602
Remote Config [candidate] (621.468 µs) : 0, 621
Telemetry [baseline] (7.707 ms) : 0, 7707
Telemetry [candidate] (7.799 ms) : 0, 7799
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.50.0-SNAPSHOT~1989174a13, baseline=1.50.0-SNAPSHOT~0f42e0a463
dateFormat X
axisFormat %s
section baseline
no_agent (393.345 µs) : 374, 413
. : milestone, 393,
iast (532.94 µs) : 510, 556
. : milestone, 533,
iast_FULL (746.185 µs) : 723, 770
. : milestone, 746,
iast_GLOBAL (566.998 µs) : 545, 589
. : milestone, 567,
iast_HARDCODED_SECRET_DISABLED (532.141 µs) : 510, 555
. : milestone, 532,
iast_INACTIVE (466.234 µs) : 444, 489
. : milestone, 466,
iast_TELEMETRY_OFF (510.858 µs) : 487, 535
. : milestone, 511,
tracing (468.226 µs) : 446, 490
. : milestone, 468,
section candidate
no_agent (392.924 µs) : 373, 413
. : milestone, 393,
iast (537.83 µs) : 516, 560
. : milestone, 538,
iast_FULL (737.709 µs) : 716, 760
. : milestone, 738,
iast_GLOBAL (573.006 µs) : 551, 595
. : milestone, 573,
iast_HARDCODED_SECRET_DISABLED (535.9 µs) : 513, 558
. : milestone, 536,
iast_INACTIVE (469.47 µs) : 448, 491
. : milestone, 469,
iast_TELEMETRY_OFF (512.81 µs) : 490, 536
. : milestone, 513,
tracing (462.919 µs) : 441, 485
. : milestone, 463,
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.50.0-SNAPSHOT~1989174a13, baseline=1.50.0-SNAPSHOT~0f42e0a463
dateFormat X
axisFormat %s
section baseline
no_agent (1.366 ms) : 1346, 1386
. : milestone, 1366,
appsec (1.746 ms) : 1721, 1770
. : milestone, 1746,
appsec_no_iast (1.731 ms) : 1708, 1754
. : milestone, 1731,
code_origins (1.691 ms) : 1664, 1718
. : milestone, 1691,
iast (1.521 ms) : 1496, 1546
. : milestone, 1521,
profiling (1.53 ms) : 1505, 1554
. : milestone, 1530,
tracing (1.51 ms) : 1488, 1533
. : milestone, 1510,
section candidate
no_agent (1.364 ms) : 1343, 1384
. : milestone, 1364,
appsec (1.746 ms) : 1722, 1769
. : milestone, 1746,
appsec_no_iast (1.746 ms) : 1723, 1769
. : milestone, 1746,
code_origins (1.682 ms) : 1656, 1709
. : milestone, 1682,
iast (1.533 ms) : 1509, 1557
. : milestone, 1533,
profiling (1.522 ms) : 1499, 1546
. : milestone, 1522,
tracing (1.498 ms) : 1473, 1523
. : milestone, 1498,
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.50.0-SNAPSHOT~1989174a13, baseline=1.50.0-SNAPSHOT~0f42e0a463
dateFormat X
axisFormat %s
section baseline
no_agent (1.473 ms) : 1461, 1484
. : milestone, 1473,
appsec (2.428 ms) : 2376, 2480
. : milestone, 2428,
iast (2.214 ms) : 2149, 2280
. : milestone, 2214,
iast_GLOBAL (2.266 ms) : 2200, 2332
. : milestone, 2266,
profiling (2.535 ms) : 2353, 2717
. : milestone, 2535,
tracing (2.027 ms) : 1976, 2078
. : milestone, 2027,
section candidate
no_agent (1.472 ms) : 1461, 1484
. : milestone, 1472,
appsec (2.438 ms) : 2386, 2490
. : milestone, 2438,
iast (2.218 ms) : 2152, 2283
. : milestone, 2218,
iast_GLOBAL (2.263 ms) : 2197, 2329
. : milestone, 2263,
profiling (2.063 ms) : 2010, 2116
. : milestone, 2063,
tracing (2.037 ms) : 1986, 2088
. : milestone, 2037,
Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.50.0-SNAPSHOT~1989174a13, baseline=1.50.0-SNAPSHOT~0f42e0a463
dateFormat X
axisFormat %s
section baseline
no_agent (14.954 s) : 14954000, 14954000
. : milestone, 14954000,
appsec (15.309 s) : 15309000, 15309000
. : milestone, 15309000,
iast (19.133 s) : 19133000, 19133000
. : milestone, 19133000,
iast_GLOBAL (18.18 s) : 18180000, 18180000
. : milestone, 18180000,
profiling (14.91 s) : 14910000, 14910000
. : milestone, 14910000,
tracing (15.037 s) : 15037000, 15037000
. : milestone, 15037000,
section candidate
no_agent (15.606 s) : 15606000, 15606000
. : milestone, 15606000,
appsec (15.156 s) : 15156000, 15156000
. : milestone, 15156000,
iast (18.624 s) : 18624000, 18624000
. : milestone, 18624000,
iast_GLOBAL (18.289 s) : 18289000, 18289000
. : milestone, 18289000,
profiling (15.429 s) : 15429000, 15429000
. : milestone, 15429000,
tracing (14.879 s) : 14879000, 14879000
. : milestone, 14879000,
|
dc48fa1
to
761eade
Compare
c117ce0
to
09b77c3
Compare
writeRequestHeaders(traceSeg, REQUEST_HEADERS_ALLOW_LIST, ctx.getRequestHeaders()); | ||
writeResponseHeaders(traceSeg, RESPONSE_HEADERS_ALLOW_LIST, ctx.getResponseHeaders()); | ||
boolean collectAll = | ||
Config.get().isAppSecCollectAllHeaders() |
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.
Adds the DD_APPSEC_HEADER_COLLECTION_REDACTION_ENABLED flag, which enabled header redaction. This feature is true by deafult. (The redaction is out of the scope, right now we only want to collect the headers without redaction)
So can we also clarify in the PR description that, right now, if redaction is enabled, we do not collect headers at all?
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.
Yes! I'm going to clarify this. Until a new RFC establish how to deal with redaction on those cases we prefer to avoid collection of potential sensitive data. So long story sort to enable this feature we need DD_APPSEC_COLLECT_ALL_HEADERS
= true and DD_APPSEC_HEADER_COLLECTION_REDACTION_ENABLED
= false
…ig.java Co-authored-by: Santiago M. Mola <[email protected]>
…ig.java Co-authored-by: Santiago M. Mola <[email protected]>
…ig.java Co-authored-by: Santiago M. Mola <[email protected]>
What Does This Do
Adds the
DD_APPSEC_COLLECT_ALL_HEADERS
flag, which enables collection of all request and response headers. This feature is disabled by default.Adds the
DD_APPSEC_HEADER_COLLECTION_REDACTION_ENABLED
flag, which enabled header redaction. This feature is true by deafult. (The redaction is out of the scope, right now we only want to collect the headers without redaction)To enable this feature we need
DD_APPSEC_COLLECT_ALL_HEADERS
= true andDD_APPSEC_HEADER_COLLECTION_REDACTION_ENABLED
= false ( a future RFC should establish how to deal with redaction)Introduces the
DD_APPSEC_MAX_COLLECTED_HEADERS
setting to limit the maximum number of headers collected.Updates the writeHeaders logic to collect all headers when
DD_APPSEC_COLLECT_ALL_HEADERS
is enabled. Allowed headers are prioritized and must be collected if present.If the number of headers exceeds
DD_APPSEC_MAX_COLLECTED_HEADERS
, the following tags are added to the span indicating the number of discarded headers:dd.appsec.request.header_collection.discarded
dd.appsec.response.header_collection.discarded
Motivation
Additional Notes
RFC
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-57269