-
Notifications
You must be signed in to change notification settings - Fork 323
Analyze okhttp client redirections as separated request #10252
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
Analyze okhttp client redirections as separated request #10252
Conversation
jandro996
left a comment
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!
|
There are codenarc issues :)
|
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 56 metrics, 9 unstable metrics. Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.58.0-SNAPSHOT~f87a45c04e, baseline=1.59.0-SNAPSHOT~a227cb175c
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.081 s) : 0, 1081341
Total [baseline] (8.706 s) : 0, 8706266
Agent [candidate] (1.084 s) : 0, 1083657
Total [candidate] (8.735 s) : 0, 8734810
section iast
Agent [baseline] (1.221 s) : 0, 1220729
Total [baseline] (9.306 s) : 0, 9306171
Agent [candidate] (1.223 s) : 0, 1222590
Total [candidate] (9.313 s) : 0, 9312587
gantt
title insecure-bank - break down per module: candidate=1.58.0-SNAPSHOT~f87a45c04e, baseline=1.59.0-SNAPSHOT~a227cb175c
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.181 ms) : 0, 1181
crashtracking [candidate] (1.184 ms) : 0, 1184
BytebuddyAgent [baseline] (649.971 ms) : 0, 649971
BytebuddyAgent [candidate] (651.586 ms) : 0, 651586
GlobalTracer [baseline] (281.884 ms) : 0, 281884
GlobalTracer [candidate] (282.391 ms) : 0, 282391
AppSec [baseline] (32.533 ms) : 0, 32533
AppSec [candidate] (32.568 ms) : 0, 32568
Debugger [baseline] (67.034 ms) : 0, 67034
Debugger [candidate] (67.121 ms) : 0, 67121
Remote Config [baseline] (649.545 µs) : 0, 650
Remote Config [candidate] (621.242 µs) : 0, 621
Telemetry [baseline] (8.918 ms) : 0, 8918
Telemetry [candidate] (8.994 ms) : 0, 8994
Flare Poller [baseline] (3.72 ms) : 0, 3720
Flare Poller [candidate] (3.72 ms) : 0, 3720
section iast
crashtracking [baseline] (1.189 ms) : 0, 1189
crashtracking [candidate] (1.174 ms) : 0, 1174
BytebuddyAgent [baseline] (789.916 ms) : 0, 789916
BytebuddyAgent [candidate] (791.644 ms) : 0, 791644
GlobalTracer [baseline] (255.605 ms) : 0, 255605
GlobalTracer [candidate] (256.018 ms) : 0, 256018
AppSec [baseline] (33.498 ms) : 0, 33498
AppSec [candidate] (34.276 ms) : 0, 34276
Debugger [baseline] (65.597 ms) : 0, 65597
Debugger [candidate] (64.31 ms) : 0, 64310
Remote Config [baseline] (609.073 µs) : 0, 609
Remote Config [candidate] (602.055 µs) : 0, 602
Telemetry [baseline] (8.483 ms) : 0, 8483
Telemetry [candidate] (8.532 ms) : 0, 8532
Flare Poller [baseline] (3.585 ms) : 0, 3585
Flare Poller [candidate] (3.554 ms) : 0, 3554
IAST [baseline] (26.848 ms) : 0, 26848
IAST [candidate] (27.054 ms) : 0, 27054
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.58.0-SNAPSHOT~f87a45c04e, baseline=1.59.0-SNAPSHOT~a227cb175c
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.085 s) : 0, 1085117
Total [baseline] (10.814 s) : 0, 10813860
Agent [candidate] (1.089 s) : 0, 1089296
Total [candidate] (10.813 s) : 0, 10812975
section appsec
Agent [baseline] (1.273 s) : 0, 1272530
Total [baseline] (10.925 s) : 0, 10925020
Agent [candidate] (1.272 s) : 0, 1271586
Total [candidate] (10.917 s) : 0, 10916786
section iast
Agent [baseline] (1.232 s) : 0, 1231889
Total [baseline] (11.127 s) : 0, 11127127
Agent [candidate] (1.223 s) : 0, 1223072
Total [candidate] (11.177 s) : 0, 11177308
section profiling
Agent [baseline] (1.22 s) : 0, 1219979
Total [baseline] (10.961 s) : 0, 10960964
Agent [candidate] (1.218 s) : 0, 1218227
Total [candidate] (11.004 s) : 0, 11003773
gantt
title petclinic - break down per module: candidate=1.58.0-SNAPSHOT~f87a45c04e, baseline=1.59.0-SNAPSHOT~a227cb175c
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.18 ms) : 0, 1180
crashtracking [candidate] (1.183 ms) : 0, 1183
BytebuddyAgent [baseline] (651.469 ms) : 0, 651469
BytebuddyAgent [candidate] (654.16 ms) : 0, 654160
GlobalTracer [baseline] (282.339 ms) : 0, 282339
GlobalTracer [candidate] (283.804 ms) : 0, 283804
AppSec [baseline] (32.604 ms) : 0, 32604
AppSec [candidate] (32.878 ms) : 0, 32878
Debugger [baseline] (68.582 ms) : 0, 68582
Debugger [candidate] (68.392 ms) : 0, 68392
Remote Config [baseline] (616.424 µs) : 0, 616
Remote Config [candidate] (616.312 µs) : 0, 616
Telemetry [baseline] (9.046 ms) : 0, 9046
Telemetry [candidate] (9.034 ms) : 0, 9034
Flare Poller [baseline] (3.775 ms) : 0, 3775
Flare Poller [candidate] (3.752 ms) : 0, 3752
section appsec
crashtracking [baseline] (1.185 ms) : 0, 1185
crashtracking [candidate] (1.194 ms) : 0, 1194
BytebuddyAgent [baseline] (695.903 ms) : 0, 695903
BytebuddyAgent [candidate] (696.9 ms) : 0, 696900
GlobalTracer [baseline] (259.684 ms) : 0, 259684
GlobalTracer [candidate] (258.485 ms) : 0, 258485
AppSec [baseline] (174.468 ms) : 0, 174468
AppSec [candidate] (171.214 ms) : 0, 171214
Debugger [baseline] (67.16 ms) : 0, 67160
Debugger [candidate] (69.484 ms) : 0, 69484
Remote Config [baseline] (731.213 µs) : 0, 731
Remote Config [candidate] (756.638 µs) : 0, 757
Telemetry [baseline] (9.33 ms) : 0, 9330
Telemetry [candidate] (9.411 ms) : 0, 9411
Flare Poller [baseline] (3.757 ms) : 0, 3757
Flare Poller [candidate] (3.869 ms) : 0, 3869
IAST [baseline] (24.837 ms) : 0, 24837
IAST [candidate] (24.631 ms) : 0, 24631
section iast
crashtracking [baseline] (1.184 ms) : 0, 1184
crashtracking [candidate] (1.171 ms) : 0, 1171
BytebuddyAgent [baseline] (797.157 ms) : 0, 797157
BytebuddyAgent [candidate] (791.561 ms) : 0, 791561
GlobalTracer [baseline] (257.588 ms) : 0, 257588
GlobalTracer [candidate] (255.605 ms) : 0, 255605
AppSec [baseline] (32.797 ms) : 0, 32797
AppSec [candidate] (34.923 ms) : 0, 34923
Debugger [baseline] (67.77 ms) : 0, 67770
Debugger [candidate] (65.014 ms) : 0, 65014
Remote Config [baseline] (573.515 µs) : 0, 574
Remote Config [candidate] (554.26 µs) : 0, 554
Telemetry [baseline] (8.495 ms) : 0, 8495
Telemetry [candidate] (8.489 ms) : 0, 8489
Flare Poller [baseline] (3.658 ms) : 0, 3658
Flare Poller [candidate] (3.564 ms) : 0, 3564
IAST [baseline] (27.181 ms) : 0, 27181
IAST [candidate] (26.911 ms) : 0, 26911
section profiling
crashtracking [baseline] (1.227 ms) : 0, 1227
crashtracking [candidate] (1.223 ms) : 0, 1223
BytebuddyAgent [baseline] (712.633 ms) : 0, 712633
BytebuddyAgent [candidate] (710.921 ms) : 0, 710921
GlobalTracer [baseline] (222.616 ms) : 0, 222616
GlobalTracer [candidate] (223.313 ms) : 0, 223313
AppSec [baseline] (32.684 ms) : 0, 32684
AppSec [candidate] (32.852 ms) : 0, 32852
Debugger [baseline] (68.761 ms) : 0, 68761
Debugger [candidate] (68.329 ms) : 0, 68329
Remote Config [baseline] (657.252 µs) : 0, 657
Remote Config [candidate] (645.404 µs) : 0, 645
Telemetry [baseline] (8.899 ms) : 0, 8899
Telemetry [candidate] (8.889 ms) : 0, 8889
Flare Poller [baseline] (3.736 ms) : 0, 3736
Flare Poller [candidate] (3.756 ms) : 0, 3756
ProfilingAgent [baseline] (98.188 ms) : 0, 98188
ProfilingAgent [candidate] (98.158 ms) : 0, 98158
Profiling [baseline] (98.779 ms) : 0, 98779
Profiling [candidate] (98.743 ms) : 0, 98743
LoadParameters
See matching parameters
SummaryFound 2 performance improvements and 2 performance regressions! Performance is the same for 17 metrics, 15 unstable metrics.
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.58.0-SNAPSHOT~f87a45c04e, baseline=1.59.0-SNAPSHOT~a227cb175c
dateFormat X
axisFormat %s
section baseline
no_agent (18.228 ms) : 18040, 18416
. : milestone, 18228,
appsec (18.54 ms) : 18353, 18727
. : milestone, 18540,
code_origins (17.686 ms) : 17510, 17863
. : milestone, 17686,
iast (17.631 ms) : 17457, 17805
. : milestone, 17631,
profiling (18.613 ms) : 18424, 18802
. : milestone, 18613,
tracing (17.649 ms) : 17472, 17825
. : milestone, 17649,
section candidate
no_agent (17.037 ms) : 16871, 17202
. : milestone, 17037,
appsec (19.947 ms) : 19745, 20149
. : milestone, 19947,
code_origins (17.878 ms) : 17704, 18053
. : milestone, 17878,
iast (17.764 ms) : 17587, 17940
. : milestone, 17764,
profiling (18.764 ms) : 18573, 18956
. : milestone, 18764,
tracing (18.362 ms) : 18176, 18548
. : milestone, 18362,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.58.0-SNAPSHOT~f87a45c04e, baseline=1.59.0-SNAPSHOT~a227cb175c
dateFormat X
axisFormat %s
section baseline
no_agent (1.181 ms) : 1169, 1192
. : milestone, 1181,
iast (3.247 ms) : 3204, 3290
. : milestone, 3247,
iast_FULL (5.647 ms) : 5591, 5703
. : milestone, 5647,
iast_GLOBAL (3.596 ms) : 3543, 3649
. : milestone, 3596,
profiling (2.03 ms) : 2012, 2048
. : milestone, 2030,
tracing (1.802 ms) : 1787, 1817
. : milestone, 1802,
section candidate
no_agent (1.214 ms) : 1202, 1227
. : milestone, 1214,
iast (3.082 ms) : 3043, 3121
. : milestone, 3082,
iast_FULL (5.495 ms) : 5441, 5548
. : milestone, 5495,
iast_GLOBAL (3.666 ms) : 3608, 3725
. : milestone, 3666,
profiling (1.939 ms) : 1922, 1955
. : milestone, 1939,
tracing (1.859 ms) : 1842, 1876
. : milestone, 1859,
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 biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.58.0-SNAPSHOT~f87a45c04e, baseline=1.59.0-SNAPSHOT~a227cb175c
dateFormat X
axisFormat %s
section baseline
no_agent (15.119 s) : 15119000, 15119000
. : milestone, 15119000,
appsec (14.311 s) : 14311000, 14311000
. : milestone, 14311000,
iast (17.555 s) : 17555000, 17555000
. : milestone, 17555000,
iast_GLOBAL (17.174 s) : 17174000, 17174000
. : milestone, 17174000,
profiling (14.671 s) : 14671000, 14671000
. : milestone, 14671000,
tracing (14.118 s) : 14118000, 14118000
. : milestone, 14118000,
section candidate
no_agent (14.616 s) : 14616000, 14616000
. : milestone, 14616000,
appsec (14.32 s) : 14320000, 14320000
. : milestone, 14320000,
iast (17.46 s) : 17460000, 17460000
. : milestone, 17460000,
iast_GLOBAL (17.303 s) : 17303000, 17303000
. : milestone, 17303000,
profiling (14.227 s) : 14227000, 14227000
. : milestone, 14227000,
tracing (14.075 s) : 14075000, 14075000
. : milestone, 14075000,
Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.58.0-SNAPSHOT~f87a45c04e, baseline=1.59.0-SNAPSHOT~a227cb175c
dateFormat X
axisFormat %s
section baseline
no_agent (1.487 ms) : 1475, 1499
. : milestone, 1487,
appsec (4.092 ms) : 3844, 4341
. : milestone, 4092,
iast (2.586 ms) : 2484, 2688
. : milestone, 2586,
iast_GLOBAL (2.622 ms) : 2520, 2724
. : milestone, 2622,
profiling (2.417 ms) : 2329, 2506
. : milestone, 2417,
tracing (2.379 ms) : 2296, 2463
. : milestone, 2379,
section candidate
no_agent (1.48 ms) : 1468, 1492
. : milestone, 1480,
appsec (4.182 ms) : 3929, 4434
. : milestone, 4182,
iast (2.578 ms) : 2476, 2680
. : milestone, 2578,
iast_GLOBAL (2.627 ms) : 2524, 2729
. : milestone, 2627,
profiling (2.425 ms) : 2337, 2514
. : milestone, 2425,
tracing (2.374 ms) : 2291, 2458
. : milestone, 2374,
|
|
Updating PR title for the changelog now it was approved :) |
What Does This Do
This PR extends AppSec HTTP client analysis to cover okhttp redirect chains.
For okhttp 2 and 3 clients, each redirect is now reported to the WAF as an individual downstream request/response pair instead of being folded into a single call.
Motivation
For API Security, we want visibility into all HTTP interactions a client performs, not only the final response.
Redirects can change the effective URL, host, and path being called, and may introduce additional hops that should be analyzed by the WAF (e.g. redirects to different domains or endpoints).
Additional Notes
Contributor Checklist
type:and (comp:orinst:) labels in addition to any useful labelsclose,fixor any linking keywords when referencing an issue.Use
solvesinstead, and assign the PR milestone to the issueJira ticket: APPSEC-58613