Fixed NPE in user events tracking#5732
Merged
Merged
Conversation
devinsba
approved these changes
Aug 16, 2023
devinsba
left a comment
Contributor
There was a problem hiding this comment.
Assuming the JdbcUserDetailsManager has the same failure before this fix
| @DependsOn("dataSourceInitializer") | ||
| public UserDetailsManager userDetailsService() { | ||
| return new JdbcUserDetailsManager(dataSource); | ||
| UserDetailsManager userDetailsManager = new JdbcUserDetailsManager(dataSource); |
Contributor
There was a problem hiding this comment.
Just wanted to make sure because this is a different impl than the exception in the issue, the JdbcUserDetailsManager also fails the tests without the fix?
Contributor
Author
There was a problem hiding this comment.
I can confirm, the issue impacts all implementations, and fix will work for all of them.
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 62 cases. Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.20.0-SNAPSHOT~e74c44c1e7, baseline=1.20.0-SNAPSHOT~88fdf40003
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (985.475 ms) : 0, 985475
Total [baseline] (8.657 s) : 0, 8657314
Agent [candidate] (995.43 ms) : 0, 995430
Total [candidate] (8.677 s) : 0, 8677433
section appsec
Agent [baseline] (1.07 s) : 0, 1070157
Total [baseline] (8.699 s) : 0, 8698629
Agent [candidate] (1.073 s) : 0, 1072993
Total [candidate] (8.743 s) : 0, 8743423
section iast
Agent [baseline] (1.088 s) : 0, 1088398
Total [baseline] (9.175 s) : 0, 9175361
Agent [candidate] (1.095 s) : 0, 1094757
Total [candidate] (9.21 s) : 0, 9209645
section profiling
Agent [baseline] (1.167 s) : 0, 1166759
Total [baseline] (8.889 s) : 0, 8889167
Agent [candidate] (1.157 s) : 0, 1157286
Total [candidate] (8.898 s) : 0, 8897693
gantt
title insecure-bank - break down per module: candidate=1.20.0-SNAPSHOT~e74c44c1e7, baseline=1.20.0-SNAPSHOT~88fdf40003
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (611.289 ms) : 0, 611289
BytebuddyAgent [candidate] (616.57 ms) : 0, 616570
GlobalTracer [baseline] (283.856 ms) : 0, 283856
GlobalTracer [candidate] (287.616 ms) : 0, 287616
AppSec [baseline] (50.0 ms) : 0, 50000
AppSec [candidate] (50.471 ms) : 0, 50471
Remote Config [baseline] (662.058 µs) : 0, 662
Remote Config [candidate] (675.69 µs) : 0, 676
Telemetry [baseline] (5.379 ms) : 0, 5379
Telemetry [candidate] (5.431 ms) : 0, 5431
section appsec
BytebuddyAgent [baseline] (610.261 ms) : 0, 610261
BytebuddyAgent [candidate] (612.019 ms) : 0, 612019
GlobalTracer [baseline] (284.067 ms) : 0, 284067
GlobalTracer [candidate] (285.381 ms) : 0, 285381
AppSec [baseline] (135.65 ms) : 0, 135650
AppSec [candidate] (135.4 ms) : 0, 135400
Remote Config [baseline] (732.303 µs) : 0, 732
Remote Config [candidate] (720.97 µs) : 0, 721
Telemetry [baseline] (5.16 ms) : 0, 5160
Telemetry [candidate] (5.142 ms) : 0, 5142
section iast
BytebuddyAgent [baseline] (716.153 ms) : 0, 716153
BytebuddyAgent [candidate] (719.312 ms) : 0, 719312
GlobalTracer [baseline] (271.184 ms) : 0, 271184
GlobalTracer [candidate] (273.694 ms) : 0, 273694
AppSec [baseline] (46.531 ms) : 0, 46531
AppSec [candidate] (46.933 ms) : 0, 46933
Remote Config [baseline] (625.487 µs) : 0, 625
Remote Config [candidate] (612.075 µs) : 0, 612
Telemetry [baseline] (5.254 ms) : 0, 5254
Telemetry [candidate] (5.198 ms) : 0, 5198
IAST [baseline] (14.225 ms) : 0, 14225
IAST [candidate] (14.292 ms) : 0, 14292
section profiling
BytebuddyAgent [baseline] (629.179 ms) : 0, 629179
BytebuddyAgent [candidate] (623.22 ms) : 0, 623220
GlobalTracer [baseline] (351.953 ms) : 0, 351953
GlobalTracer [candidate] (349.58 ms) : 0, 349580
AppSec [baseline] (49.522 ms) : 0, 49522
AppSec [candidate] (49.222 ms) : 0, 49222
Remote Config [baseline] (666.714 µs) : 0, 667
Remote Config [candidate] (652.748 µs) : 0, 653
Telemetry [baseline] (5.432 ms) : 0, 5432
Telemetry [candidate] (5.36 ms) : 0, 5360
ProfilingAgent [baseline] (76.625 ms) : 0, 76625
ProfilingAgent [candidate] (76.271 ms) : 0, 76271
Profiling [baseline] (76.649 ms) : 0, 76649
Profiling [candidate] (76.295 ms) : 0, 76295
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.20.0-SNAPSHOT~e74c44c1e7, baseline=1.20.0-SNAPSHOT~88fdf40003
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (987.355 ms) : 0, 987355
Total [baseline] (9.182 s) : 0, 9182097
Agent [candidate] (989.567 ms) : 0, 989567
Total [candidate] (9.201 s) : 0, 9200797
section appsec
Agent [baseline] (1.072 s) : 0, 1072392
Total [baseline] (9.246 s) : 0, 9246146
Agent [candidate] (1.071 s) : 0, 1071500
Total [candidate] (9.286 s) : 0, 9286119
section iast
Agent [baseline] (1.087 s) : 0, 1087247
Total [baseline] (9.422 s) : 0, 9422402
Agent [candidate] (1.089 s) : 0, 1089205
Total [candidate] (9.472 s) : 0, 9471947
section profiling
Agent [baseline] (1.166 s) : 0, 1165913
Total [baseline] (9.52 s) : 0, 9519558
Agent [candidate] (1.16 s) : 0, 1160289
Total [candidate] (9.482 s) : 0, 9482069
gantt
title petclinic - break down per module: candidate=1.20.0-SNAPSHOT~e74c44c1e7, baseline=1.20.0-SNAPSHOT~88fdf40003
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (612.352 ms) : 0, 612352
BytebuddyAgent [candidate] (613.176 ms) : 0, 613176
GlobalTracer [baseline] (284.489 ms) : 0, 284489
GlobalTracer [candidate] (286.257 ms) : 0, 286257
AppSec [baseline] (50.075 ms) : 0, 50075
AppSec [candidate] (49.552 ms) : 0, 49552
Remote Config [baseline] (661.485 µs) : 0, 661
Remote Config [candidate] (664.848 µs) : 0, 665
Telemetry [baseline] (5.393 ms) : 0, 5393
Telemetry [candidate] (5.418 ms) : 0, 5418
section appsec
BytebuddyAgent [baseline] (612.459 ms) : 0, 612459
BytebuddyAgent [candidate] (611.982 ms) : 0, 611982
GlobalTracer [baseline] (283.959 ms) : 0, 283959
GlobalTracer [candidate] (284.445 ms) : 0, 284445
AppSec [baseline] (135.788 ms) : 0, 135788
AppSec [candidate] (135.011 ms) : 0, 135011
Remote Config [baseline] (724.521 µs) : 0, 725
Remote Config [candidate] (727.597 µs) : 0, 728
Telemetry [baseline] (5.172 ms) : 0, 5172
Telemetry [candidate] (5.124 ms) : 0, 5124
section iast
BytebuddyAgent [baseline] (714.848 ms) : 0, 714848
BytebuddyAgent [candidate] (715.247 ms) : 0, 715247
GlobalTracer [baseline] (271.37 ms) : 0, 271370
GlobalTracer [candidate] (272.571 ms) : 0, 272571
AppSec [baseline] (46.59 ms) : 0, 46590
AppSec [candidate] (46.83 ms) : 0, 46830
Remote Config [baseline] (618.526 µs) : 0, 619
Remote Config [candidate] (607.022 µs) : 0, 607
Telemetry [baseline] (5.288 ms) : 0, 5288
Telemetry [candidate] (5.197 ms) : 0, 5197
IAST [baseline] (14.33 ms) : 0, 14330
IAST [candidate] (14.285 ms) : 0, 14285
section profiling
BytebuddyAgent [baseline] (628.438 ms) : 0, 628438
BytebuddyAgent [candidate] (624.306 ms) : 0, 624306
GlobalTracer [baseline] (351.268 ms) : 0, 351268
GlobalTracer [candidate] (350.548 ms) : 0, 350548
AppSec [baseline] (49.548 ms) : 0, 49548
AppSec [candidate] (49.549 ms) : 0, 49549
Remote Config [baseline] (671.383 µs) : 0, 671
Remote Config [candidate] (655.586 µs) : 0, 656
Telemetry [baseline] (5.437 ms) : 0, 5437
Telemetry [candidate] (5.361 ms) : 0, 5361
ProfilingAgent [baseline] (77.35 ms) : 0, 77350
ProfilingAgent [candidate] (76.935 ms) : 0, 76935
Profiling [baseline] (77.375 ms) : 0, 77375
Profiling [candidate] (76.958 ms) : 0, 76958
LoadParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 24 cases. Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.20.0-SNAPSHOT~e74c44c1e7, baseline=1.20.0-SNAPSHOT~88fdf40003
dateFormat X
axisFormat %s
section baseline
no_agent (362.941 µs) : 342, 384
. : milestone, 363,
appsec (673.167 µs) : 652, 694
. : milestone, 673,
iast (468.493 µs) : 448, 489
. : milestone, 468,
iast_FULL (530.378 µs) : 510, 551
. : milestone, 530,
iast_INACTIVE (441.726 µs) : 421, 463
. : milestone, 442,
profiling (448.922 µs) : 428, 470
. : milestone, 449,
tracing (436.379 µs) : 416, 457
. : milestone, 436,
section candidate
no_agent (364.646 µs) : 343, 386
. : milestone, 365,
appsec (663.083 µs) : 642, 684
. : milestone, 663,
iast (474.876 µs) : 454, 496
. : milestone, 475,
iast_FULL (528.867 µs) : 508, 550
. : milestone, 529,
iast_INACTIVE (437.262 µs) : 417, 458
. : milestone, 437,
profiling (440.011 µs) : 419, 461
. : milestone, 440,
tracing (431.568 µs) : 411, 452
. : milestone, 432,
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.20.0-SNAPSHOT~e74c44c1e7, baseline=1.20.0-SNAPSHOT~88fdf40003
dateFormat X
axisFormat %s
section baseline
no_agent (1.336 ms) : 1318, 1355
. : milestone, 1336,
appsec (1.661 ms) : 1637, 1686
. : milestone, 1661,
iast (1.473 ms) : 1449, 1497
. : milestone, 1473,
profiling (1.469 ms) : 1444, 1493
. : milestone, 1469,
tracing (1.454 ms) : 1430, 1478
. : milestone, 1454,
section candidate
no_agent (1.338 ms) : 1319, 1357
. : milestone, 1338,
appsec (1.686 ms) : 1662, 1710
. : milestone, 1686,
iast (1.472 ms) : 1448, 1496
. : milestone, 1472,
profiling (1.465 ms) : 1440, 1490
. : milestone, 1465,
tracing (1.489 ms) : 1465, 1514
. : milestone, 1489,
|
smola
approved these changes
Aug 17, 2023
smola
pushed a commit
that referenced
this pull request
Aug 23, 2023
* Fixed SpringSecurity NullPointerException when user creation happens outside request. * Spotless
smola
added a commit
that referenced
this pull request
Aug 23, 2023
* Fixed Spring Security NullPointerException when user creation happens outside request. Co-authored-by: Valentin Zakharov <[email protected]>
This file contains hidden or 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
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
Fixed SpringSecurity NullPointerException when user creation happens outside request context.
Motivation
Reported exception message in debug log: