Commit Graph

4582 Commits

Author SHA1 Message Date
Brian Clozel
e58f65366c Auto-configure TypeDefinitionConfigurer beans
Prior to this commit, the GraphQL auto-configuration would consider many
bean types like `DataFetcherExceptionResolver` and
`SubscriptionExceptionResolver` to configure the `GraphQlSource`.
It would also configure a default `ConnectionTypeDefinitionConfigurer`.

This commit will detect all `TypeDefinitionConfigurer` beans defined in
the application and configure them in addition to the
`ConnectionTypeDefinitionConfigurer`.

Closes gh-39118
2024-01-15 18:22:37 +01:00
Moritz Halbritter
cff1b33f8e Configure virtual threads on Undertow if enabled
Closes gh-38819
2024-01-12 09:05:30 +01:00
Phillip Webb
653474fc46 Polish 2024-01-11 21:40:18 -08:00
teacmity
c6c7fbc15f Change log messages to use singular or plural instead of "noun(s)"
See gh-37017
2024-01-11 14:35:49 +00:00
Andy Wilkinson
5675d79243 Merge branch '3.2.x'
Closes gh-39104
2024-01-11 13:56:12 +00:00
Andy Wilkinson
a5d3fb588b Merge branch '3.1.x' into 3.2.x
Closes gh-39103
2024-01-11 13:55:34 +00:00
Andy Wilkinson
31936f036b Remove FlywayMigrationScriptMissingFailureAnalyzer from spring.factories
Closes gh-39102
2024-01-11 13:55:05 +00:00
BenchmarkingBuffalo
3928fac5ba Add clientId and subscriptionDurable to JmsProperties
See gh-38817
2024-01-11 14:46:24 +01:00
Kai Zander
ed039fcf7d Fix context runner assertions not being executed
See gh-39087
2024-01-11 14:17:00 +01:00
Moritz Halbritter
baf52214a2 Polish "Auto-configure a JwtAuthenticationConverter"
The JwtConverter bean is only supplied, if one of the following
properties is there:

* spring.security.oauth2.resourceserver.jwt.authority-prefix
* spring.security.oauth2.resourceserver.jwt.principal-claim-name
* spring.security.oauth2.resourceserver.jwt.authorities-claim-name

See gh-38105
2024-01-11 13:58:10 +01:00
Yan Kardziyaka
e9bce315ae Auto-configure a JwtAuthenticationConverter
See gh-38105
2024-01-11 13:58:10 +01:00
Andy Wilkinson
17e9f0cb8e Merge branch '3.2.x'
Closes gh-39093
2024-01-11 11:36:38 +00:00
Andy Wilkinson
7087897507 Merge branch '3.1.x' into 3.2.x
Closes gh-39091
2024-01-11 10:33:57 +00:00
Andy Wilkinson
45c32854a5 Fix Checkstyle upgrade
Closes gh-38746
2024-01-10 15:37:38 +00:00
Moritz Halbritter
f696190d83 Polish "Add support for Pulsar cluster-level failover"
See gh-38559
2024-01-10 13:28:33 +01:00
Swamy Mavuri
c3e3372336 Add support for Pulsar cluster-level failover
See gh-38559
2024-01-10 13:28:33 +01:00
Moritz Halbritter
e5b2ad9b8a Add possibility to configure a custom ExecutionContextSerializer in BatchAutoConfiguration
See gh-38328
2024-01-10 11:08:43 +01:00
John Niang
49c6bacd44 Support configuring maximum number of sessions for reactive server
Signed-off-by: John Niang <johnniang@foxmail.com>

See gh-38703
2024-01-10 11:03:55 +01:00
Yanming Zhou
0e53c0098f Add configuration property "spring.task.execution.pool.shutdown.accept-tasks-after-context-close"
ExecutorConfigurationSupport::setAcceptTasksAfterContextClose is
introduced since Spring Framework 6.1

See gh-38968
2024-01-10 10:37:15 +01:00
Moritz Halbritter
d610955b9d Merge branch '3.2.x'
Closes gh-39079
2024-01-10 09:58:24 +01:00
Moritz Halbritter
793801b9cb Merge branch '3.1.x' into 3.2.x
Closes gh-39078
2024-01-10 09:53:45 +01:00
BenchmarkingBuffalo
56f00c4c21 Move autoStartup property
Move the property 'autoStartup' from BaseContainer to AmqpContainer.

See gh-39072
2024-01-10 09:52:28 +01:00
Moritz Halbritter
ffe31cfe55 Merge branch '3.2.x'
Closes gh-39077
2024-01-10 09:49:54 +01:00
skcskitano
dc8b55c0ef Fix connection leak in SqlDialectLookup
See gh-38924
2024-01-10 09:46:39 +01:00
Christoph Dreis
b7c9c82180 Fix typos
See gh-38983
2024-01-10 09:06:45 +01:00
Moritz Halbritter
91d187ca38 Add property for max queue size for Tomcat
Co-authored-by: Ahmed A. Hussein <ahmedhussein411@gmail.com>

Closes gh-36087
2024-01-09 10:38:46 +01:00
Moritz Halbritter
2cce123bb5 Add property to control 'path' field inclusion in error responses
By default it is included.

Closes gh-38619
2024-01-09 09:33:00 +01:00
Moritz Halbritter
a7d88b69d4 Add RabbitMQ properties to enable observations
Observations can be enabled for the simple, direct and stream listener
and on the RabbitTemplate.

Closes gh-36451
2024-01-08 15:58:13 +01:00
Andy Wilkinson
4b89723861 Remove APIs that were deprecated for removal in 3.3.0
Closes gh-39039
2024-01-05 11:20:35 +00:00
Andy Wilkinson
6bd042e83b Upgrade to Commons DBCP2 2.11.0
Closes gh-39002
2024-01-04 17:26:37 +00:00
Andy Wilkinson
a1c7c0bccc Upgrade to AssertJ 3.25.1
Closes gh-38997
2024-01-04 17:26:35 +00:00
Phillip Webb
7216d2b031 Merge branch '3.1.x'
Closes gh-38916
2023-12-22 10:43:46 -08:00
Phillip Webb
95a8fa561c Correctly order @AutoConfigureAfter values when sorting
Update `AutoConfigurationSorter` so that `getClassesRequestedAfter()`
results are sorted to match the earlier name/order sorting. Prior to
this commit the order of items added via `@AutoConfigureAfter` was in
an undetermined order which could cause very subtle `@ConditionalOnBean`
bugs.

Thanks very much to Alexandre Baron for their help in diagnosing and
reproducing this issue.

Fixes gh-38904
2023-12-22 08:20:25 -08:00
Phillip Webb
15dd37095f Merge branch '3.1.x'
Closes gh-38880
2023-12-19 23:45:42 -08:00
Phillip Webb
b00d5fabe8 Auto-configure Hibernate JPA before DataSource TransactionManager
Fixes gh-38861
2023-12-19 23:44:48 -08:00
Phillip Webb
5354ad15b3 Merge branch '3.1.x'
Closes gh-38877
2023-12-19 22:51:48 -08:00
Yanming Zhou
ac18e3015c Use .isEmpty() where feasible
See gh-38739
2023-12-19 22:38:05 -08:00
Phillip Webb
2158f4cc43 Polish 'Use authParamString to configure Pulsar authentication'
See gh-38839
2023-12-16 22:23:37 -08:00
Chris Bono
4c0a19e8c0 Use authParamString to configure Pulsar authentication
Update `PulsarPropertiesMapper` to use JSON encoded parameters rather
than a `Map` since the `Map` method is deprecated in Pulsar. This
commit simply takes the auth params map and converts them to the
expected encoded JSON string of auth parameters.

See gh-38839
2023-12-16 22:19:45 -08:00
Phillip Webb
26dc14031e Update LoadedPemSslStore to use lazy loading
Update `LoadedPemSslStore` so that it loads content lazily. This
restores the behavior of Spring Boot 3.1 and allows bundles to be
defined with files that don't exist as long as they are never accessed.

Fixes gh-38659
2023-12-14 22:03:07 -08:00
Phillip Webb
1d10e51755 Adapt to upstream Spring Security changes 2023-12-14 20:33:09 -08:00
Andy Wilkinson
afad358047 Align reactive web security more closely with servlet web security
There are some notable differences in the behavior of Spring
Security's reactive and servlet-based web security. Notably,
Servlet-based web security (`@EnableWebSecurity`) works without
any authentication manager, rejecting requests as not authorized.
By contrast reactive-based web security (`@EnableWebFluxSecurity`)
fails to start up when there's no authentication manager, either
provided directly as a bean or derived from a
ReactiveUserDetailsService. There are also further differences at
runtime where empty Monos from all ReactiveAuthenticationManagers
results in an internal error and a 500 response whereas a similar
situation in the servlet implementation results in a 401.

Previously, to accommodate these differences in behavior, Spring
Boot's auto-configuration would behave differently. In the Servlet
case, web security would be enabled whenever the necessary
dependencies were on the classpath. In the reactive case, web
security would back off in the absence of an authentication manager
to prevent a start up failure. While this difference is rooted in
Spring Security, it is undesirable and something that we want to
avoid Spring Boot users being exposed to where possible.
Unfortunately, the situation is more likely to occur than before
as ReactiveUserDetailsServiceAutoConfiguration now backs off more
readily (gh-35338). This makes it more likely that the context will
contain neither a reactive authetication manager not a reactive
user details service.

This commit reworks the auto-configurations related to reactive
security. ReactiveSecurityAutoConfiguration will now auto-configure
an "empty" reactive authentication manager that denies access through
Mono.error in the absence of a ReactiveAuthenticationManager,
ReactiveUserDetailsService, or SecurityWebFilterChain. The last of
these is to allow for the situation where a filter chain has been
defined with an authentication manager configured directly on it.
This configuration of an authentication manager allows
`@EnableWebFluxSecurity` to be auto-configured more readily,
removing one of the differences between reactive- and Servlet-based
security.

Corresponding updates to the auto-configurations for reactive OAuth2
support have also been made. They no longer try to auto-configure
`@EnableWebFluxSecurity`, relying instead upon
ReactiveSecurityAutoConfiguration, which they are ordered before, to
do that instead.

Closes gh-38713
2023-12-13 12:44:04 +00:00
Andy Wilkinson
964ccbb000 Revert "Do not enable WebFlux security unless other configuration is active"
This reverts commit beba1f176a.

See gh-38713
2023-12-13 11:17:08 +00:00
Moritz Halbritter
01f59608ac Merge branch '3.1.x'
Closes gh-38752
2023-12-12 16:23:33 +01:00
Moritz Halbritter
b8021dbc65 Exclude Rabbit Stream when testing RabbitAutoConfiguration
The stream auto-configuration is tested in RabbitStreamConfigurationTests,
and excluding it prevents the creation of the "rabbitStreamEnvironment"
Environment bean, which delays the application context close by 1 second
because it has to wait for some Netty resources to gracefully shut down.

Closes gh-38750
2023-12-12 16:12:22 +01:00
Andy Wilkinson
beba1f176a Do not enable WebFlux security unless other configuration is active
Following the changes in gh-37504, the reactive resource server
auto-configuration could enable WebFlux security in situations where
it was otherwise in active. This could then result in an application
failing to start as no authentication manager is available.

This commit updates the configurations that enable WebFlux security
so that they fully back off unless their related configurations are
active. Previously, only the configuration of the
SecurityWebFilterChain would back off. This has been expanded to
cover `@EnableWebFluxSecurity` as well. This has required splitting
the configuration classes up so that the condition evaluation order
can be controlled more precisely. We need to ensure that the JWT
decoder bean or the opaque token introspector bean has been defined
before evaluation of the conditions for `@EnableWebFluxSecurity`.
Without this control, the import through `@EnableWebFluxSecurity` in
one location where the conditions do not matchcan prevent a
successful import in another where they do.

Fixes gh-38713
2023-12-11 12:46:29 +00:00
Moritz Halbritter
cc665dd529 Merge branch '3.1.x'
Closes gh-38727
2023-12-11 09:18:25 +01:00
Donghun Shin
f922b3de03 Rename local variable in BatchAutoConfiguration
See gh-38674
2023-12-11 08:25:39 +01:00
Andy Wilkinson
6dff3c5978 Adapt to change in Framework's disconnected client detection
See gh-38666
2023-12-06 14:18:40 +00:00
Moritz Halbritter
f9a1eb000e Merge branch '3.1.x'
Closes gh-38658
2023-12-05 11:51:03 +01:00