Commit Graph

578 Commits

Author SHA1 Message Date
Phillip Webb
eb6b48fff0 Use side-effect free environment with tests rather than converting
Refine the logic introduced in 64270eca to use a side-effect free
Environment implementation rather than converting the Environment early.

Early conversion can cause condition evaluation issues if
`src/test/resources/application.properties` files are bound to the
`SpringApplication`. Specifically the `spring.main.web-application-type`
property can change the `Environment` type which must happen before
conditions are evaluated.

Fixes gh-29169
2022-01-12 14:21:52 -08:00
Phillip Webb
72696cdb0f Merge branch '2.5.x' into 2.6.x
Closes gh-29371
2022-01-12 14:07:31 -08:00
Phillip Webb
7c16668bf3 Log Docker output to aid debugging
Add an SLF4J logger so that we can see real time output of the
Docker container.

See gh-29370
2022-01-12 14:03:27 -08:00
Madhura Bhave
d9d161cd6b Allow previously authorized users to access the error page
Prior to this commit, the `ErrorPageSecurityFilter` verified if
access to the error page was allowed by invoking the
`WebInvocationPrivilegeEvaluator` with the Authentication from the
`SecurityContextHolder`.
This meant that access to the error page was denied for a `null` Authentication
 or `AnonymousAuthenticationToken` in cases where the error page required
authenticated access. This prevented authorized users from accessing the
error page in case the Authentication wasn't retrievable for the error dispatch,
which is the case for `@Transient` authentication or stateless session policy.

This commit updates the `ErrorPageSecurityFilter` to check access to the error page
only if the error is an authn or authz error in cases where an authentication object
is not found in the SecurityContextHolder. This makes the error response consistent
when bad credentials or no credentials are used while also allowing access to previously
authorized users.

Fixes gh-28953
2021-12-17 16:58:58 -08:00
Phillip Webb
f676602c96 Merge branch '2.5.x' into 2.6.x 2021-12-16 13:49:12 -08:00
Phillip Webb
783981ba98 Merge branch '2.4.x' into 2.5.x 2021-12-16 13:48:25 -08:00
Phillip Webb
d336a96b7f Update web.xml xsd references to for 3.1 version
See gh-29075
2021-12-16 13:45:12 -08:00
Phillip Webb
6e01c3edbe Merge branch '2.5.x' into 2.6.x
Closes gh-29077
2021-12-15 22:17:22 -08:00
Phillip Webb
17363d1b3a Merge branch '2.4.x' into 2.5.x
Closes gh-29076
2021-12-15 22:16:37 -08:00
Phillip Webb
1749c893dc Update web-app version to 3.1
Update the web-app version specified in `web.xml` to 3.1 in order to
make Eclipse happy.

Closes gh-29075
2021-12-15 22:14:52 -08:00
Andy Wilkinson
3b23c542a0 Test servlet 3.1 compatibility in deployment tests
Closes gh-28906
2021-12-09 12:24:43 +00:00
Phillip Webb
beb68671bb Update copyright year of changed files 2021-11-24 10:23:32 -08:00
Scott Frederick
4eed637481 Merge branch '2.5.x'
Closes gh-28789
2021-11-23 12:45:46 -06:00
Scott Frederick
12244a8edd Remove use of Thymeleaf from smoke tests
Closes gh-28788
2021-11-23 12:13:05 -06:00
Andy Wilkinson
015cf920da Name custom task inputs
Closes gh-28753
2021-11-19 15:35:39 +00:00
Phillip Webb
b6d0b44703 Fix @SuppressWarnings 2021-11-18 17:26:18 -08:00
Madhura Bhave
dd1d1482dc Deny unauthorized access to the error page
Fixes gh-26356

Co-authored-by Andy Wilkinson <wilkinsona@vmware.com>
2021-11-18 15:41:38 -08:00
Andy Wilkinson
7ed19a3b59 Merge branch '2.5.x'
Closes gh-28735
2021-11-18 12:21:11 +00:00
Andy Wilkinson
88457d9cfa Merge branch '2.4.x' into 2.5.x
Closes gh-28734
2021-11-18 12:20:50 +00:00
Andy Wilkinson
7d19ea4ca1 Limit log output produced by spring-boot-deployment-tests:intTest
Closes gh-28730
2021-11-18 12:18:34 +00:00
Madhura Bhave
6b79d2860f Merge branch '2.5.x' into main
Closes gh-28724
2021-11-17 16:41:23 -08:00
Madhura Bhave
64270eca51 Convert environment used by SpringBootTestContextLoader
This commit aligns `SpringBootTest`s to also use `ApplicationEnvironment`
instead of `StandardEnvironment`. This prevents the side-effect of active
profiles from `@ActiveProfiles` from being added to the environment when
doGetActiveProfiles is called. In this case, calling `addActiveProfiles()`
in the environment post processor would result in `@ActiveProfiles` being
added to the environment first, resulting in the wrong order.

The additional call to `setActiveProfiles()` is also not necessary when using
ApplicationEnvironment because that call was put in place to prevent the side-effect
which `ApplicationEnvironment` does not have.

Fixes gh-28530
2021-11-17 16:40:53 -08:00
Andy Wilkinson
2a342ef416 Merge branch '2.5.x'
Closes gh-28662
2021-11-12 23:40:35 +00:00
Andy Wilkinson
5e4a502b2d Merge branch '2.4.x' into 2.5.x
Closes gh-28661
2021-11-12 20:31:25 +00:00
Andy Wilkinson
2cec3971d7 Prohibit unwanted dependencies in all modules not just starters
Closes gh-28658
2021-11-12 20:04:35 +00:00
Andy Wilkinson
c80283b85f Merge branch '2.5.x'
Closes gh-28653
2021-11-12 13:05:42 +00:00
Andy Wilkinson
92fd3b79a5 Merge branch '2.4.x' into 2.5.x
Closes gh-28652
2021-11-12 13:05:14 +00:00
Andy Wilkinson
08aac25c00 Limit logging produced by spring-boot-loader-tests's intTest task
Closes gh-28651
2021-11-12 13:04:10 +00:00
Andy Wilkinson
c7a2d61aee Merge branch '2.4.x'
Closes gh-28485
2021-10-29 13:48:36 +01:00
Andy Wilkinson
7fe6f4887c Merge branch '2.4.x' into 2.5.x
Closes gh-28484
2021-10-29 13:48:23 +01:00
Andy Wilkinson
22d85e6d7b Allow tests to be run in parallel across multiple workers
Closes gh-19876
2021-10-29 12:48:45 +01:00
Andy Wilkinson
2541c0cbdc Disable on Windows tests that use embedded Kafka
Closes gh-28406
2021-10-21 10:46:50 +01:00
Madhura Bhave
42d21a8336 Remove parameterization of session smoke tests
There are dedicated smoke tests for Hazelcast, MongoDB and Redis
that run on CI.
This commit also polishes some of the other smoke tests related to
Spring Session
2021-10-19 16:47:53 -07:00
Madhura Bhave
2caa6cb227 Polish "Add smoke tests for Spring Session Redis/Mongo"
See gh-28362
2021-10-19 15:54:19 -07:00
Angel L. Villalain Garcia
9a16c246ec Add smoke tests for Spring Session Redis/Mongo
Add smoke tests that verify the correct behavior of the sessions
endpoint when using Spring Session with MongoDB and Redis.

See gh-28362
2021-10-19 15:53:59 -07:00
Stephane Nicoll
4ebac4cc66 Merge branch '2.5.x'
Closes gh-28279
2021-10-11 09:09:15 +02:00
Stephane Nicoll
0103eb123b Merge branch '2.4.x' into 2.5.x
Closes gh-28278
2021-10-11 09:09:08 +02:00
dreis2211
ae1167e026 Remove unused settings.xml in integration tests
See gh-28269
2021-10-11 09:08:29 +02:00
Madhura Bhave
b350eaee8a Fix checkstyle 2021-10-06 21:36:52 -07:00
Madhura Bhave
1ff900cce8 Merge pull request #28173 from kandulsh
* pr/28173:
  Polish "Add smoke test with Spring Session and Hazelcast"
  Add smoke test with Spring Session and Hazelcast

Closes gh-28173
2021-10-06 16:02:24 -07:00
Madhura Bhave
8dcf3e2c70 Polish "Add smoke test with Spring Session and Hazelcast"
See gh-28173
2021-10-06 16:02:14 -07:00
Susmitha
70dd655b60 Add smoke test with Spring Session and Hazelcast
See gh-28173
2021-10-06 16:00:27 -07:00
Andy Wilkinson
0b58d4858d Merge branch '2.5.x'
Closes gh-28200
2021-10-05 11:13:20 +01:00
Andy Wilkinson
322615d9c5 Merge branch '2.4.x' into 2.5.x
Closes gh-28199
2021-10-05 11:12:48 +01:00
Andy Wilkinson
8c3820f87e Fix up-to-date checking of syncAppSource tasks
Previously, the project version was used while filtering the apps
source during syncing but it was not considered as an input to
the task. This could result in the syncing being skipped even though
the project's version had changed.

This commit introduces a new custom task to make the configuration
more declarative and to allow the necessary input configuration to be
done in a single place.

Closes gh-28197
2021-10-05 11:08:22 +01:00
Andy Wilkinson
29637706a9 Merge branch '2.5.x'
Closes gh-28166
2021-10-01 14:16:33 +01:00
Andy Wilkinson
14a57adb53 Merge branch '2.4.x' into 2.5.x
Closes gh-28165
2021-10-01 14:16:20 +01:00
Andy Wilkinson
35b16ea04e Minimize dependencies of launch script test app
Closes gh-28164
2021-10-01 14:15:52 +01:00
Phillip Webb
55a1ec72cc Update copyright year of changed files 2021-09-21 11:25:50 -07:00
Phillip Webb
4c2c4ec16c Merge branch '2.5.x' 2021-09-21 11:25:36 -07:00
Phillip Webb
5ba69634c9 Merge branch '2.4.x' into 2.5.x 2021-09-21 11:17:55 -07:00
Phillip Webb
dfd36673f7 Update copyright year of changed files 2021-09-21 11:17:19 -07:00
dreis2211
cf0fcafd13 Polish
See gh-27940
2021-09-21 08:08:29 +02:00
Madhura Bhave
8fd9eb72d4 Allow part of a composite contributor in a health group
Closes gh-23027

Co-authored-by: Phillip Webb <pwebb@vmware.com>
2021-08-18 15:44:10 -07:00
Andy Wilkinson
fd2fbcb3c6 Merge branch '2.5.x'
Closes gh-27758
2021-08-18 18:28:34 +01:00
Andy Wilkinson
6d8ba3e8b1 Merge branch '2.4.x' into 2.5.x
Closes gh-27757
2021-08-18 17:56:32 +01:00
Andy Wilkinson
ffbd28b60a Polish "Polish access modifiers for test classes"
See gh-27736
2021-08-18 17:52:42 +01:00
izeye
8a425dedfd Polish access modifiers for test classes
See gh-27736
2021-08-18 17:38:40 +01:00
Andy Wilkinson
2dfdcf5e88 Merge branch '2.5.x'
Closes gh-27754
2021-08-18 13:52:23 +01:00
Andy Wilkinson
0d904b8868 Merge branch '2.4.x' into 2.5.x
Closes gh-27753
2021-08-18 13:51:49 +01:00
Andy Wilkinson
0b7994a679 Polish "Use 2012 for copyright beginning year"
See gh-27734
2021-08-18 13:48:29 +01:00
Andy Wilkinson
e737388f5c Merge branch '2.5.x'
Closes gh-27654
2021-08-12 18:09:04 +01:00
Andy Wilkinson
d6cf46acc5 Merge branch '2.4.x' into 2.5.x
Closes gh-27653
2021-08-12 18:08:37 +01:00
Andy Wilkinson
403dda7f0d Remove field inject and circular reference from Data Mongo smoke test
Closes gh-27651
2021-08-12 18:07:42 +01:00
Andy Wilkinson
e265825653 Merge branch '2.5.x'
Closes gh-27506
2021-07-27 11:03:00 +01:00
Andy Wilkinson
08e26c97aa Merge branch '2.4.x' into 2.5.x
Closes gh-27505
2021-07-27 11:02:20 +01:00
Andy Wilkinson
031a036c9f Customize security filter registration in separate management context
Fixes gh-27372
2021-07-27 10:57:38 +01:00
Scott Frederick
32bb6f6989 Move deployment tests to system tests pipeline
Closes gh-27499
2021-07-26 15:29:56 -05:00
Andy Wilkinson
14db8aec95 Skip server tests on Java 16 as Gradle Plugin is not available
See gh-27476
2021-07-23 19:44:29 +01:00
Andy Wilkinson
f830ce5e17 Merge branch '2.5.x' 2021-07-23 17:40:29 +01:00
Andy Wilkinson
27ae302905 Merge branch '2.4.x' into 2.5.x 2021-07-23 17:40:20 +01:00
Andy Wilkinson
931409cdd4 Update copyright header in changed files 2021-07-23 17:39:55 +01:00
Andy Wilkinson
fc9f38351a Merge branch '2.5.x'
Closes gh-27479
2021-07-23 17:34:55 +01:00
Andy Wilkinson
bd3aec4f80 Merge branch '2.4.x' into 2.5.x
Closes gh-27478
2021-07-23 17:30:27 +01:00
Andy Wilkinson
d9a24f32b4 Rework spring-boot-server-tests to avoid using Maven
Closes gh-27476
2021-07-23 17:30:07 +01:00
Phillip Webb
7e9ac39f0d Update copyright year of changed files 2021-07-22 09:50:37 -07:00
Andy Wilkinson
37f690323f Polish
Closes gh-27432
2021-07-21 11:55:38 +01:00
Andy Wilkinson
bb26b7bdf5 Polish
Closes gh-27431
2021-07-21 11:53:10 +01:00
izeye
734293d491 Polish
See gh-27418
2021-07-21 11:17:43 +01:00
Scott Frederick
9f001efa29 Adjust fat jar central directory to account for launch script
An upgrade to Apache Commons Compress allows the build plugins to write
the launch script to the fat jar as a proper preamble, making the file
compatible with more jar and zip tooling.

Fixes gh-22336
2021-07-19 15:02:42 -05:00
Andy Wilkinson
51fedd6528 Reinstate support for Hibernate < 5.5
See gh-27352
2021-07-19 13:52:40 +01:00
Andy Wilkinson
8259f15451 Fix deprecation warnings
See gh-27383
2021-07-19 11:53:58 +01:00
Andy Wilkinson
0d1d637c73 Merge branch '2.5.x'
Closes gh-27383
2021-07-19 11:07:58 +01:00
Andy Wilkinson
c9ccfcc25f Rework Jetty10Http2OverTlsTests so they compile with Java 8
Closes gh-27382
2021-07-19 11:06:58 +01:00
Andy Wilkinson
43f1b98864 Polish "Add @WebServiceServerTest slice test support"
See gh-27091
2021-07-16 11:28:39 +01:00
Andy Wilkinson
3e0baf1bfd Merge branch '2.5.x'
Closes gh-27353
2021-07-15 19:45:32 +01:00
Andy Wilkinson
c8c784bd5c Allow @SpyBean to be used to spy on a Spring Data repository
Fixes gh-7033
2021-07-15 19:44:52 +01:00
Andy Wilkinson
c00e885ac4 Work around compile warnings from Data Neo4j's use of API Guardian
See gh-27170
2021-07-14 18:28:24 +01:00
bono007
d16ecab24b Remove default spring.mongodb.embedded.version
See gh-27108
2021-07-13 10:13:54 +01:00
Stephane Nicoll
72f5995208 Polish 2021-07-13 09:56:45 +02:00
Andy Wilkinson
a7334deb54 Merge branch '2.4.x' into 2.5.x
Closes gh-27234
2021-07-10 12:05:40 +01:00
Andy Wilkinson
57d7ba0836 Switch s-b-server-tests from libs-snapshot to snapshot and milestone
Closes gh-27233
2021-07-10 12:04:55 +01:00
Andy Wilkinson
580b1b81ab Fix HTTP/2 over TLS with Jetty 10
Fixes gh-26988
2021-06-21 12:06:10 +01:00
Andy Wilkinson
4bf329e266 Correct directory names in Jetty 10 smoke tests
See gh-26847
2021-06-16 19:59:50 +01:00
Andy Wilkinson
bc7004d9c6 Fix WebSocket support with Jetty 10.0.x
Fixes gh-26847
2021-06-16 12:38:33 +01:00
Phillip Webb
f798f26596 Merge branch '2.4.x' 2021-06-08 18:05:50 -07:00
Phillip Webb
4d62e47c5d Merge branch '2.3.x' into 2.4.x 2021-06-08 18:05:12 -07:00
Phillip Webb
9e1c78da99 Update copyright year of changed files 2021-06-08 18:03:46 -07:00
Phillip Webb
6ab2df5698 Order DataSourceScriptDatabaseInitializer last
Change the order of `DataSourceScriptDatabaseInitializerDetector` so
that it always runs last. This update allows script initialization to
be combined with a high-level migration tool such as Flyway.

Closes gh-26692
2021-06-08 14:10:59 -07:00
Madhura Bhave
a28072bab4 Merge branch '2.4.x' into main
Closes gh-26614
2021-05-19 16:17:34 -07:00