Commit Graph

23607 Commits

Author SHA1 Message Date
Andy Wilkinson 3b51bcc912 Upgrade to Kafka 3.6.1
Closes gh-38806
2023-12-14 17:08:05 +00:00
Andy Wilkinson 86599a5062 Upgrade to Jetty 12.0.4
Closes gh-38805
2023-12-14 17:08:00 +00:00
Andy Wilkinson 853aaeb818 Upgrade to Jersey 3.1.5
Closes gh-38804
2023-12-14 17:07:55 +00:00
Andy Wilkinson d2d303d5aa Upgrade to Jaybird 5.0.3.java11
Closes gh-38803
2023-12-14 17:07:50 +00:00
Andy Wilkinson da7cb2ad1b Upgrade to Janino 3.1.11
Closes gh-38802
2023-12-14 17:07:46 +00:00
Andy Wilkinson 8deae8275e Upgrade to HttpCore5 5.2.4
Closes gh-38801
2023-12-14 17:07:41 +00:00
Andy Wilkinson f320188023 Upgrade to HttpClient5 5.2.3
Closes gh-38800
2023-12-14 17:07:36 +00:00
Andy Wilkinson b20ed7c577 Upgrade to Groovy 4.0.16
Closes gh-38799
2023-12-14 17:07:31 +00:00
Andy Wilkinson 06068894a4 Upgrade to Dropwizard Metrics 4.2.23
Closes gh-38798
2023-12-14 17:07:27 +00:00
Andy Wilkinson 2e43819e8d Upgrade to AspectJ 1.9.21
Closes gh-38797
2023-12-14 17:07:22 +00:00
Andy Wilkinson b62b6d56c1 Merge branch '3.1.x'
Closes gh-38794
2023-12-14 14:46:44 +00:00
Andy Wilkinson 54fb25d931 Prohibit upgrade to Netty 4.1.103.Final
Closes gh-38789
2023-12-14 14:46:28 +00:00
Moritz Halbritter 2fd89803a2 Merge branch '3.1.x' 2023-12-14 11:53:08 +01:00
Moritz Halbritter 5a385a40e9 Fix typo 2023-12-14 11:52:55 +01:00
Brian Clozel e44e0c8f1e Remove ErrorAttributes.ERROR_ATTRIBUTE
This commit removes the now defunkt `ErrorAttributes.ERROR_ATTRIBUTE`
that was introduce to register handled errors as metrics. This has been
replaced since 3.0 by a direct support in Spring Framework and had no
effect whatsoever since that release.

This also updates the documentation to point to the Framework mechanism
that replaced it.

Fixes gh-33731
2023-12-14 11:26:45 +01:00
Andy Wilkinson 8c5b7a87ae Adapt to latest changes in the locking model for context close
See gh-38666
2023-12-14 10:21:48 +00:00
Andy Wilkinson 60ebb32e8a Upgrade to Reactor Bom 2023.0.1
Closes gh-38695
2023-12-14 09:41:57 +00:00
Andy Wilkinson 96f1a46fef Upgrade to Micrometer Tracing 1.2.1
Closes gh-38694
2023-12-14 09:41:55 +00:00
Andy Wilkinson 0dedccc1a1 Upgrade to Micrometer 1.12.1
Closes gh-38693
2023-12-14 09:41:52 +00:00
Andy Wilkinson 8d5175b68d Upgrade to Reactor Bom 2022.0.14
Closes gh-38677
2023-12-14 09:25:50 +00:00
Andy Wilkinson c3e3245bb3 Upgrade to Micrometer Tracing 1.1.8
Closes gh-38676
2023-12-14 09:25:49 +00:00
Andy Wilkinson 5f51083005 Upgrade to Micrometer 1.11.7
Closes gh-38675
2023-12-14 09:25:48 +00:00
Phillip Webb a9efa96d8a Merge branch '3.1.x'
Closes gh-38770
2023-12-13 16:53:20 -08:00
Phillip Webb da31137596 Ensure that StaticResourceJars does not close cached jars
Update `StaticResourceJars` so that jars obtained via a
`JarURLConnection` are only closed when caches are not being used.

Fixes gh-38766
2023-12-13 16:51:02 -08:00
Phillip Webb b4a4e91238 Update ZipString to deal with reads that do not return all data
Refine the logic in `ZipString.hash` and `ZipString.compare` to deal
with the fact a read operation may not return all available bytes.

Fixes gh-38751
2023-12-13 13:29:37 -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 3ac9c44942 Merge branch '3.1.x' 2023-12-13 11:19:44 +01:00
Moritz Halbritter 82bc9a6280 Polish 2023-12-13 11:19:40 +01:00
Moritz Halbritter 2197e36d91 Merge branch '3.1.x'
Closes gh-38764
2023-12-13 11:18:19 +01:00
Moritz Halbritter d1badfe63a Document minimum supported Docker Compose version
Closes gh-38760
2023-12-13 11:18:09 +01:00
Moritz Halbritter c50172d5c7 Undeprecate 'management.metrics.tags'
Closes gh-38583
2023-12-13 08:26:11 +01:00
Moritz Halbritter e81d1226fe Prevent integer overflow when checking disk space 2023-12-12 16:26:58 +01: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 612bf95b05 Adapt to changes in the locking model for closing an app context
See gh-38666
2023-12-12 14:51:06 +00:00
Moritz Halbritter a242bd81e2 Merge branch '3.1.x'
Closes gh-38747
2023-12-12 13:55:44 +01:00
Yanming Zhou 3c65fdfa12 Use idiomatic AssertJ assertions
See gh-38702
2023-12-12 13:53:20 +01:00
Moritz Halbritter 198dbb4a45 Auto-configure observatibility beans in sliced tests
If @AutoConfigureObservability is applied to a sliced test, it
auto-configures:

- An in-memory MeterRegistry
- A no-op Tracer
- An ObservationRegistry

Closes gh-38568
2023-12-12 11:29:43 +01:00
Moritz Halbritter ff82b8d1c1 Add auto-configuration for a no-op tracer
This auto-configuration ensures, if Micrometer Tracing is on the
classpath, that there is always a tracer. It backs off if there is
already a tracer, for example contributed by the Brave or the Otel
auto-configurations, which are run before.

See gh-38568
2023-12-12 11:29:43 +01:00
Phillip Webb ea87787279 Merge branch '3.1.x'
Closes gh-38741
2023-12-11 20:37:45 -08:00
Phillip Webb 39bc7c8582 Support getPermissions() call on Gradle 8.6-milestone-1
The `getPermissions` method is now part of the private
`ParentDirectoryStub` class so we now need to call
`setAccessible(true)`.

Fixes gh-38718
2023-12-11 20:35:06 -08:00
Phillip Webb 0fe7d78732 Restore support for custom bind converters in collections
Update the `beansConverterService` introduced in commit f4e05c91c7
so that it can also handle collection based conversions.

Fixes gh-38734
2023-12-11 17:05:27 -08: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 6330190913 Merge branch '3.1.x'
Closes gh-38728
2023-12-11 09:44:19 +01:00
Yanming Zhou ebfbc0ef05 Cleanup kotlin sources
1. remove unused imports
2. remove redundant semicolon
3. remove empty class body
4. remove redundant 'constructor' keyword
5. remove redundant 'Unit' return type
6. use non-null type if possible

See gh-38708
2023-12-11 09:23:42 +01: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
Moritz Halbritter ad586078a7 Merge branch '3.1.x'
Closes gh-38725
2023-12-11 08:18:43 +01:00
Georg Pirklbauer a8d706f485 Update Dynatrace documentation links
See gh-38706
2023-12-11 08:13:56 +01:00