Commit Graph

1805 Commits (5e35a34cbab77ccc6a696adbde6773b7b7364a19)

Author SHA1 Message Date
Stephane Nicoll 9d88e477f3 Fix Solr health indicator
This commit changes the solr health indicator to request the status of
all available cores, rather than invoking a generic ping on the admin
handler.

Recent versions of Solr now have a ping handler per core and the general
admin handler is gone, leading to incorrect health status. For backward
compatible reason the `solrStatus` attribute is kept to `OK` if all cores
are running properly (that's actually `0` behind the scenes).

Closes gh-8463
8 years ago
Andy Wilkinson 7a4b87be6b Merge branch '1.5.x' 8 years ago
Andy Wilkinson c74f0a70ca Merge branch '1.4.x' into 1.5.x 8 years ago
Andy Wilkinson 5dad7182db Address deprecation warnings 8 years ago
Vedran Pavic 2667b7f51c Upgrade to Hazelcast 3.8
Closes gh-8808
8 years ago
Phillip Webb 2de7e9c310 Merge branch '1.5.x' 8 years ago
Phillip Webb ad38776de3 Polish 8 years ago
Phillip Webb ddcb5ee328 Polish 8 years ago
Madhura Bhave 8bfd42e3f1 Add v2 content type to actuator endpoints
Closes gh-7968
8 years ago
dreis 5d85733378 Replace empty string concatenation with String.valueOf()
Closes gh-8686
8 years ago
Madhura Bhave 20f201b57a Flip default for management.add-application-context-header
Closes gh-8656
8 years ago
Madhura Bhave 6ad46db944 Merge branch '1.5.x' 8 years ago
Madhura Bhave cb38546d8a Document default trace includes
Closes gh-8654
8 years ago
Andy Wilkinson 87ebec6838 Upgrade to Jackson 2.9.0.pr2
As part of the upgrade, this commit removes the use of any API that
has been deprecated in 2.9. This includes the config props endpoint's
use of SerializationFeature.WRITE_NULL_MAP_VALUES. This has been
replaced with configuring serialization inclusion to only include
properties with non-null values. This means that all null-valued
properties will no longer be serialized, not just those that are an
entry in a map.

Closes gh-8604
Closes gh-8537
Closes gh-7695
8 years ago
Andy Wilkinson 937681af65 Avoid problem caused by new mime mappings in Framework snapshots 8 years ago
Madhura Bhave 52d992701d Merge branch '1.5.x' 8 years ago
Madhura Bhave 8ac22fc2fd Add elapsed time to the Trace Actuator output
Closes gh-8654
8 years ago
Phillip Webb 34de119eba Polish 8 years ago
Andy Wilkinson 1893fdab0d Revert "Upgrade to Jackson 2.9.0.pr1"
This reverts commit 10ae5e8f3f. Health
serialization fails with Jackson 2.9.0 (gh-7695).

See gh-8537
8 years ago
Andy Wilkinson 10ae5e8f3f Upgrade to Jackson 2.9.0.pr1
As part of the upgrade, this commit removes the use of any API that
has been deprecated in 2.9.0.pr1. This includes the config props
endpoint's use of SerializationFeature.WRITE_NULL_MAP_VALUES. This
has been replaced with configuring serialization inclusion to only
include properties with non-null values. This means that all
null-valued properties will no longer be serialized, not just those
that are an entry in a map.

Closes gh-8604
Closes gh-8537
8 years ago
Stephane Nicoll 1b395ddd9d Merge branch '1.5.x' 8 years ago
Stephane Nicoll cd8684499d Polish
See gh-8621
8 years ago
Phillip Webb b76ca0bf8f Restructure web auto-configuration
Restructure `org.springframework.boot.autoconfigure.web` to better align
with the new package structure in `spring-boot`.

Auto-configuration is now split into client, servlet and reactive
sub-packages. In addition a new `http` package now handles common
HTTP concerns.

Fixes gh-8616
8 years ago
Phillip Webb 099e188f9f Unify WebServerFactoryCustomizers
Replace `ReactiveWebServerCustomizer` and `WebServerFactoryCustomizer`
with a unified `WebServerFactoryCustomizer`.

Fixes gh-8558
8 years ago
Madhura Bhave bfae0d7739 Merge branch '1.5.x' 8 years ago
Madhura Bhave 0dcebdaf7c Merge branch '1.4.x' into 1.5.x 8 years ago
Madhura Bhave 19da8d8271 Fix UnsupportedOperationException
Fixes gh-8602
8 years ago
Phillip Webb 67556ba8ea Restructure embedded web server packages
Rework `org.springframework.boot.context.embedded` to relocate classes
to `org.springframework.boot.web`. Packages are now organized around
the following areas:

Packages for shared concerns, for example the `WebServer` interface
to start/stop a server and the common configuration elements:
- org.springframework.boot.web.context
- org.springframework.boot.web.server

Servlet specific packages:
- org.springframework.boot.web.servlet.server
- org.springframework.boot.web.servlet.context
- org.springframework.boot.web.servlet.filter

Reactive specific packages:
- org.springframework.boot.web.reactive.context
- org.springframework.boot.web.reactive.server

Embedded server implementations (both reactive and servlet):
- org.springframework.boot.web.embedded

In addition:

- Rename `EmbeddedServletContainerFactory` to `ServletWebServerFactory`
  to align with the `ReactiveWebServerFactory`.
- Rename `EmbeddedWebApplicationContext` to
  `ServletWebServerApplicationContext` and
- Rename `EmbeddedReactiveWebApplicationContext` to
  `ReactiveWebServerApplicationContext`.
- Add checkstyle rules to restrict imports.
- Fixup all affected code to use the correct imports and local names.

Fixes gh-8532
8 years ago
Madhura Bhave f72c5b70c6 Merge branch '1.5.x' 8 years ago
Madhura Bhave 7da70a52fd Mask sensitive placeholders in env endpoint
Closes gh-8282
8 years ago
Madhura Bhave 8f903987da Merge branch '1.5.x' 8 years ago
Madhura Bhave 703b7d9268 Merge branch '1.4.x' into 1.5.x 8 years ago
Madhura Bhave 67068fc83d Ignore unresolvable nested placeholders
The NamePatternEnvironmentFilter used to throw an exception if
placeholders in property values could not be resolved.

Fixes gh-8510
8 years ago
Phillip Webb 2136a39004 Fix checkstyle errors 8 years ago
Phillip Webb d8f827d224 Cleanup and format code 8 years ago
Phillip Webb 425dbc3e52 Update copyright header for edited files 8 years ago
Phillip Webb 2a592103f0 Polish formatting 8 years ago
Phillip Webb 91a7bf92e6 Merge branch '1.5.x' 8 years ago
Phillip Webb fedd7b9506 Polish 8 years ago
Spring Buildmaster d23fa24340 Next Development Version 8 years ago
Spring Buildmaster 2a83e80a9b Next Development Version 8 years ago
Madhura Bhave 8f26dc09b7 Merge branch '1.5.x' 8 years ago
Madhura Bhave d4b52a3538 Expose Health details if user has authority
If the Princial is a Spring Security Authentication object and the
request doesn't have the right roles, check the authorities.

Fixes gh-8471
8 years ago
Stephane Nicoll cb40ea485b Merge branch '1.5.x' 8 years ago
Stephane Nicoll 5cc569fc91 Improve execution speed of `CacheAutoConfigurationTests`
As of Hazelcast 3.7, the bootstrap is pretty slow by default due to the
networking discovery. This commit disables both TCP/IP and multicast
discoveries.
8 years ago
Phillip Webb 58ac67eb27 Merge branch '1.5.x' 8 years ago
Phillip Webb 3ee7dae09b Merge branch '1.4.x' into 1.5.x 8 years ago
Phillip Webb f1012c104a Polish 8 years ago
Phillip Webb c06a9771c2 Support list based role properties
Update `HealthMvcEndpoint` to respect `ManagementServerProperties`
roles. Prior to this commit the `HealthMvcEndpoint` directly loaded
roles rather than using bound properties. This meant that list values
from yaml were not respected.

Fixes gh-8314
8 years ago
Madhura Bhave 94a14dbcd8 Merge branch '1.5.x' 8 years ago
Madhura Bhave 031c9bf191 Validate authorities in MvcSecurityInterceptor
If Spring Security is on the classpath and `isUserInRole` returns false,
check if user has the authority to access the actuator endpoints.

Fixes gh-8255
8 years ago
Madhura Bhave e5e1f24d1f Revert "Skip MvcSecurityInterceptor if Spring Security present"
Instead of entirely skipping the interceptor, we will be additionally
checking for authorities.
8 years ago
Madhura Bhave ad5cb8a3cd Skip MvcSecurityInterceptor if Spring Security present
If Spring Security is on the classpath, the role check can be done
as part of the ManagementWebSecurityConfigurerAdapter.

Fixes gh-8255
8 years ago
Phillip Webb a4bcd20b64 Merge branch '1.5.x' 8 years ago
Phillip Webb ca1540cefe Update header copyright for changed files 8 years ago
Phillip Webb 5867cd6175 Polish 8 years ago
Phillip Webb 47fd5f4fac Merge branch '1.4.x' into 1.5.x 8 years ago
Phillip Webb 47b00c086c Polish 8 years ago
Andy Wilkinson 3164330139 Correct HAL Browser location to reflect version of web jar
See gh-8382
8 years ago
Stephane Nicoll 3c956441b5 Merge branch '1.5.x' 8 years ago
Stephane Nicoll 121ab0a71e Merge branch '1.4.x' into 1.5.x 8 years ago
Vedran Pavic 1c8f1c709c Fix audit events related documentation
Closes gh-8319
8 years ago
Brian Clozel a5bdbd0dc2 Introduce EmbeddedWebServerInitializedEvent
This commit adds `EmbeddedWebServerInitializedEvent`, which holds the
`EmbeddedWebServer` information when the application context starts.
The `EmbeddedServletContainerInitializedEvent` now inherits from that
type and holds additional information, the
`EmbeddedWebApplicationContext`.

Closes gh-8208
8 years ago
Andy Wilkinson 54b95973bb Merge branch '1.5.x' 8 years ago
Andy Wilkinson e2a12e77b7 Merge branch '1.4.x' into 1.5.x 8 years ago
Andy Wilkinson bbe9394228 Tests that lists of lists are sanitized correctly
See gh-8263
8 years ago
Johnny Lim 88afc43d44 Ensure that entries in a list of lists are not lost during sanitization
Closes gh-8263
See gh-8197
8 years ago
Madhura Bhave ffd35aaf5f Merge branch '1.5.x' 8 years ago
Madhura Bhave 77e5c585f4 Validate kid in Cloud Foundry token header
Instead of validating the signature against all the public keys,
we can validate it only against the public key with the kid that
matches the one in the token header.

Closes gh-8126
8 years ago
Andy Wilkinson 16b7bf7f73 Merge branch '1.5.x' 8 years ago
Andy Wilkinson df08863641 Make ServletRegistrationBean and FilterRegistration bean generic
Closes gh-7666
8 years ago
Andy Wilkinson 1efa700713 Merge branch '1.5.x' 8 years ago
Andy Wilkinson 25982ecf69 Merge branch '1.4.x' into 1.5.x 8 years ago
Andy Wilkinson 04c8b912ee Fall back to standard LiveBeansView behaviour when MBean is in use
Closes gh-8146
8 years ago
Andy Wilkinson a19ad3211b Merge branch '1.5.x' 8 years ago
Andy Wilkinson d02a9c1058 Merge branch '1.4.x' into 1.5.x 8 years ago
Andy Wilkinson f27bb39af9 Sanitize configuration properties that are nested beneath a List
Closes gh-8197
8 years ago
Brian Clozel aeef41c977 Separate container customization from ServerProperties
This commit creates a separate
`ServerPropertiesServletContainerCustomizer` that holds the servlet
container customization code, separating that concern from the server
configuration keys.

See gh-8066
8 years ago
Brian Clozel 12d883f6b9 Introduce "server.servlet" configuration prefix
This commit refactors the `ServerProperties` property keys and
introduces a separate "server.servlet" namespace to isolate
servlet-specific properties from the rest.

Closes gh-8066
8 years ago
Stephane Nicoll f41801ee8c Narrow down ConditionalOnWebApplication
Use the new `type` attribute of `@ConditionalOnWebApplication` for the
configurations that have a hard dependency on the Servlet/MVC API.

See gh-8118
8 years ago
Brian Clozel 8619d6a229 Rename EmbeddedServletContainer -> EmbeddedWebServer
This contract is not specific to servlet containers and should be
reused by all web server implementations (including reactive variants).

Fixes gh-8208
8 years ago
Stephane Nicoll 6af6e8e31b Remove auto-configuration for ServerProperties
This commit removes `ServerProperties` and `ManagementServerProperties`
auto-configurations. Those properties objects are now created using
`@EnableConfigurationProperties` only.

Closes gh-8108
8 years ago
Stephane Nicoll cfdc75d384 Merge branch '1.5.x' 8 years ago
Johnny Lim 0adab8a2be Use logical 'and' instead of bitwise 'and'
Closes gh-8198
8 years ago
Stephane Nicoll fb19b36595 Merge branch '1.5.x' 8 years ago
Stephane Nicoll dc75f13754 Remove deprecated metadata for spring.pidfile 8 years ago
Stephane Nicoll 3d1f8aa8d7 Merge branch '1.4.x' into 1.5.x 8 years ago
Stephane Nicoll a30461c5c7 Polish pid metadata
This commit moves the `spring.pid.*` metadata to the relevant project. It
also updates the doc to refer to the new `ApplicationPidFileWriter`
rather than the one in its deprecatred form.

Closes gh-8196
8 years ago
Tommy Ludwig 653366d664 Remove HikariCP-java6 dependency management
Dependency management for the `HikariCP-java6` dependency is no longer
needed since Java 6 is no longer supported by Spring Boot.

The HikariDriverConfigurationFailureAnalyzer has been updated with the
current message thrown by HikariCP in this failure scenario.

Closes gh-8147
8 years ago
Phillip Webb 36c1db0223 Merge branch '1.5.x' 8 years ago
Phillip Webb 21234b36de Ensure `JmxEndpoint` beans get context object IDs
Update `EndpointMBeanExporter` to ensure that `JmxEndpoint` as well
as regular `Endpoint` beans are considered when searching the parent
context.

Prior to this commit if the same `JmxEndpoint` was registered in the
both the child and parent context then the `context=` element of the
name wasn't added.

Fixes gh-8152
8 years ago
Brian Clozel 7f39d5a865 Remove usage of Assert.notNull(Object)
This commit updates the Spring Boot codebase to adapt to the removal of
`Assert.notNull(Object)` in SPR-15196.

See gh-8140
8 years ago
Andy Wilkinson 95f659f4f9 Add new WebApplicationType enum to pave the way for Web Flux support
Closes gh-8077
8 years ago
Spring Buildmaster 5c12500366 Next Development Version 8 years ago
Spring Buildmaster a2696bf873 Next Development Version 8 years ago
Andy Wilkinson 31b0e81765 Add @FunctionalInterface to remaining public and protected interfaces
See gh-6857
8 years ago
Eddú Meléndez 3d52c86a21 Annotate interfaces with @FunctionaInterface
Closes gh-6857
8 years ago
Andy Wilkinson 6d70c061de Merge branch '1.5.x' 8 years ago
Andy Wilkinson 180ab2da8b Merge branch '1.4.x' into 1.5.x 8 years ago
Andy Wilkinson f3b9b14b8e Order ManagementContextConfiguration classes without loading them
Previously, ManagementContextConfiguration classes were loaded to
allow them to be ordered based on either @Order or implementing
Ordered. This had the unwanted side-effect of possibly logging
unwanted INFO messages if the reflection-based annotation
introspection failed. One cause of this was @ConditionalOnClass when
the referenced class was not on the classpath.

This commit uses the ASM-based annotation metadata reading to
determine the order of a management context configuration class based
on the @Order annotation. The classes are then sorted using a standard
OrderComparator. Note that Ordering via implemented Ordered is not
supported as it cannot be determine without loading the class.
8 years ago
Spring Buildmaster ed1ce140c0 Next Development Version 8 years ago
Stephane Nicoll 1df3fb6ecb Merge branch '1.5.x' 8 years ago
Stephane Nicoll b575be339e Fix endpoint id
See gh-7579
8 years ago
Andy Wilkinson 4993f32da8 Merge branch '1.5.x' 8 years ago
Andy Wilkinson f823599d1f Replace @PostConstruct validation with setter validation
Closes gh-7579
8 years ago
Stephane Nicoll 661fd848eb Merge branch '1.5.x' 8 years ago
dreis d58f38f6f6 Use String.replace() with single char if possible
See gh-8089
8 years ago
Stephane Nicoll 551bfb2c60 Polish contribution
Closes gh-8103
8 years ago
Johnny Lim 32f9e90de5 Replace 'String.length() == 0' with 'String.isEmpty()'
See gh-8103
8 years ago
Dave Syer 50c1e363ad Merge remote-tracking branch 'origin/1.5.x' 8 years ago
Dave Syer 98a4c72c50 Clarify PublicMetrics (uniqueness of metric names)
See gh-6404
8 years ago
Stephane Nicoll d67ce78e8b Merge branch '1.5.x' 8 years ago
Johnny Lim e0de28a1f7 Polish
Closes gh-8076
8 years ago
Phillip Webb 8ffaa54e74 Merge branch '1.5.x' 8 years ago
Madhura Bhave ca435512c0 Introduce spring-boot-autoconfigure-processor
Add an annotation processor that generates properties files for certain
auto-configuration class annotations. Currently attribute values from
@AutoConfigureOrder, @AutoConfigureBefore, @AutoConfigureAfter and
@ConditionalOnClass annotations are stored.

The properties file will allow optimizations to be added in the
`spring-boot-autoconfigure` project. Primarily by removing the need
to ASM parse as many `.class` files.

See gh-7573
8 years ago
Phillip Webb 2c89d9918f Relocate AutoConfigurations from root package
Move PropertyPlaceholder and MessageSource auto-configuration from the
root package to the `context` subpackage.

Fixes gh-8071
8 years ago
Phillip Webb 3893383cbe Merge branch '1.5.x' 8 years ago
Phillip Webb 5703fb1515 Polish 8 years ago
Andy Wilkinson d4c4bc35fd Start building against Spring Data Kay snapshots
See gh-7461
8 years ago
Andy Wilkinson 65fe405f19 Merge branch '1.5.x' 8 years ago
Andy Wilkinson b900a3efc8 Update Actuator endpoints to use custom media type
Previously, the actuator's endpoints produced application/json and,
where appropriate, also consumed application/json. Without a custom,
versioned media type, it's impossible for us to make changes to the
endpoints without breaking clients.

This commit introduces a new media type,
application/spring-boot.actuator.v1+json, that is now produced by
default with application/json also being produced if requested.
Endpoints that consume JSON will now also accept content the uses
the new media type in addition to application/json.

Closes gh-7967
8 years ago
Phillip Webb 89f7ec054f Merge branch '1.5.x' 8 years ago
Phillip Webb f3cd0ad22c Polish 8 years ago
Madhura Bhave e73c6bb2e2 Exclude authorization header from trace by default
Closes gh-7974
8 years ago
Andy Wilkinson e7ed7efb56 Merge branch '1.5.x' 8 years ago
Andy Wilkinson 3e88c366ec Polish "Avoid property name collisions when serializing AuditEvent to JSON"
See gh-7990
8 years ago
Johannes Edmeier fcf36ed091 Avoid property name collisions when serializing AuditEvent to JSON
Previously, in case the data for the audit event contained an entry
with the key "type", the member `type` from the AuditEvent would be
overwritten when rendering to JSON due to the use of @JsonAnyGetter on
the data property.

This commit removes @JsonAnyGetter so that the data map is rendered as
a separate property in the JSON.

Closes gh-7990
8 years ago
Stephane Nicoll c54070d142 Merge branch '1.5.x' 8 years ago
Stephane Nicoll c41ff17dd7 Provide relevant default values for Enums
This commits adds manual metadata for enums that have a default value
since the annotation processor is not able to detect that yet.

Closes gh-7890
8 years ago
Phillip Webb 5502fa2936 Merge branch '1.5.x' 8 years ago
Phillip Webb f42ebe428c Remove JSR-330 configuration annotations
Replace JSR-330 validation annotations from all internal
`@ConfigurationProperties` classes with standard Asserts.

Prior to this commit validation of our own configuration properties
would only occur when the user happens to have compliant JSR-330
implementation on their classpath.

See gh-7579
8 years ago
Phillip Webb 0a6456a748 Always use `prefix` config annotation attribute
Update use of `@ConfigurationProperties` to prefer the more explicit
`prefix` attribute, rather than `value`.

See gh-7579
8 years ago
Phillip Webb 43d432a527 Polish 8 years ago
Andy Wilkinson f7f764ffe1 Merge branch '1.5.x' 8 years ago
Andy Wilkinson 5c9aa41c07 Update InMemoryRichGaugeRepository to support increments
Closes gh-2902
8 years ago
Andy Wilkinson 14e24462f2 Merge branch '1.5.x' 8 years ago
Andy Wilkinson 7fa33cddd7 Merge branch '1.4.x' into 1.5.x 8 years ago
Andy Wilkinson a02c2d4155 Improve the documentation of Health.Status constants
Closes gh-7784
8 years ago
Stephane Nicoll f4f5a70cb2 Merge branch '1.5.x' 8 years ago
Johnny Lim acc36c076d Polish
See gh-8004
8 years ago
Andy Wilkinson 9a4b6a90ae Merge branch '1.5.x' 8 years ago
Andy Wilkinson f72799186e Merge branch '1.4.x' into 1.5.x 8 years ago
Andy Wilkinson a72365e1a2 Expose context hierarchy in beans endpoint
Previously, the beans endpoint would only expose the context that
contained the endpoint. This commit updates the endpoint so that
the context that contains the endpoint and all of its ancestors are
exposed.

In a context hierarhcy, the relation ship is child -> parent and there
is no way to navigate from a parent to a child. As a result, any
contexts that are descendants of the context containing the endpoint
are not exposed.

Closes gh-5188
8 years ago
Stephane Nicoll a9399639a0 Merge branch '1.5.x' 8 years ago
Stephane Nicoll 8bef0a1e60 Polish contribution
Closes gh-7905
8 years ago
Eddú Meléndez b2250f4ad8 Add LDAP health actuator
Provide specific health actuator endpoint to verify if LDAP connection
is valid.

See gh-7905
8 years ago
Stephane Nicoll e4876eb666 Merge branch '1.5.x' 8 years ago
Stephane Nicoll f21c767356 Polish contribution
Closes gh-7914
8 years ago
Kazuki Shimizu a6756c9ed3 Allow lowercase logger level on MVC endpoint
See gh-7914
8 years ago
Andy Wilkinson ae3434ba4c Merge branch '1.4.x' into 1.5.x 8 years ago
Andy Wilkinson d2201d5284 Correct copyright dates and enforce that starting year is 2012
Closes gh-7923
8 years ago
Andy Wilkinson 3c35066ed5 Merge branch '1.5.x' 8 years ago
Andy Wilkinson 426435f4af Merge branch '1.4.x' into 1.5.x 8 years ago
Andy Wilkinson 1afb050061 Correct copyright dates and enforce that starting year is 2012
Closes gh-7923
8 years ago
Andy Wilkinson 78a06c3278 Merge branch '1.5.x' 8 years ago
Phillip Webb 9159c87bf9 Polish 8 years ago
Stephane Nicoll a2d55428ef Merge branch '1.5.x' 8 years ago
Stephane Nicoll fefc66625f Merge branch '1.4.x' into 1.5.x 8 years ago
Eddú Meléndez f896ff9a10 Fix incomplete assertions
Closes gh-7907
8 years ago
Phillip Webb c35454e5f4 Merge branch '1.5.x' 8 years ago
Madhura Bhave 4ea47220e9 Match nested paths for insensitive actuators
Update `ManagementWebSecurityAutoConfiguration` to match nested path
for insensitive actuators.

Prior to this commit, when Spring Security was on the classpath
nested paths were considered sensitive (even if the actuator
endpoint was not sensitive). i.e. when setting
`endpoints.env.sensitive=false` `/env` could be accessed without
authentication but `/env/user` could not.

Fixes gh-7868
Closes gh-7881
8 years ago
Phillip Webb 77f9bb09ca Further Polish Mockito 2 support
See gh-7770
8 years ago
Phillip Webb 0cc313f224 Polish 8 years ago
Stephane Nicoll c28ff4314c Upgrade to Mockito 2
Closes gh-7770
8 years ago
Stephane Nicoll 506f6497c0 Merge branch '1.5.x' 8 years ago
Johnny Lim f915ae197a Polish 8 years ago
Phillip Webb 24f5125a8b Merge branch '1.5.x' 8 years ago
Madhura Bhave 530c3cd3be Simplify HealthMvcEndpoint security
Expose full health details if management security is disabled or
management role is present.

Fixes gh-7604
Closes gh-7852
8 years ago
Phillip Webb 2fe4d60b47 Add `management.cloudfoundry.*` meta-data
Update configuration meta-data and appendix to include
`management.cloudfoundry.*` meta-data.

See gh-7108
8 years ago
Phillip Webb b1cb8bb3d9 Merge branch '1.5.x' 8 years ago
Phillip Webb 8ccd4db513 Merge branch '1.4.x' into 1.5.x 8 years ago
Phillip Webb 732011987d Fix ManagementContextConfiguration @Order support
Update `ManagementContextConfigurationsImportSelector` to instantiate
classes so that order annotations are respected.

Fixes gh-7814
8 years ago
Phillip Webb b4b8370632 Fix AuditEventsJmxEndpoint bean name
See gh-6579
8 years ago
Phillip Webb 8a9a61b64f Prevent duplicate JmxEndpoint MBean registration
Update JmxEndpoint support so that the `@ManagedResource` annotation
is no longer required. This prevents both `EndpointMBeanExporter` and
the regular `AnnotationMBeanExporter` from both registering the bean.

Fixes gh-7813
See gh-6579
8 years ago
Phillip Webb 4026fa563f Merge branch '1.5.x' 8 years ago
Phillip Webb 51762642b2 Polish audit event endpoint support
Closes gh-6579
8 years ago
Phillip Webb 5b40eb48e0 Improve MBean without backing Endpoint support
Improve support for MBeans without a backing endpoint by introducing
a `JmxEndpoint` interface. The `JmxEndpoint` is intentionally
similar in design to the `MvcEndpoint` from the `mvc` package and
allows for completely custom JMX beans that are not backed by any
real actuator `Endpoint`.

The `AuditEventsMBean` has been refactored to use the new interface and
has been renamed to `AuditEventsJmxEndpoint`.

See gh-6579
8 years ago
Vedran Pavic 2f1e4f0c02 Add MVC and JMX endpoints to retrieve audit events
Add MVC and JMX specific endpoints that allow audit events to be
retrieved.

See gh-6579
8 years ago
Vedran Pavic a6d18f714f Add JMX without backing `Endpoint` support
Decompose `EndpointMBean` to improve support for JMX endpoints without
a backing `Endpoint`.

See gh-6579
8 years ago
Phillip Webb e1eb48e8b4 Fix warnings 8 years ago
Phillip Webb 6496ea78d4 Merge branch '1.5.x' 8 years ago
Phillip Webb a167db7b37 Allow OPTIONS requests in interceptors
Update `MvcEndpointSecurityInterceptor` and
`CloudFoundrySecurityInterceptor` to allow OPTIONS requests to be
processed.

Fixes gh-7720
8 years ago
Phillip Webb 53f1df86a2 Merge branch '1.5.x' 8 years ago
Phillip Webb aacf5d660f Update copyright year for changed files 8 years ago
Phillip Webb 38271b7397 Merge branch '1.5.x' 8 years ago
Phillip Webb 367963f29f Polish 8 years ago
Phillip Webb 519f9c6c54 Merge branch '1.5.x' 8 years ago
Phillip Webb 8b69856fc9 Polish 8 years ago
Stephane Nicoll ee9d86cb1c Merge branch '1.5.x' 8 years ago
Stephane Nicoll 8b7055719f Move InMemoryMultiMetricRepository to a separate class
This commit moves the `MultiMetricRepository` implementation from
`InMemoryMetricRepository` to `InMemoryMultiMetricRepository`. Both
implementations can share the same underlying store (and are for backward
compatible reasons).

The side effect is that `reset` now works as expected for a group.

Closes gh-7687
8 years ago
Phillip Webb 49fa702708 Merge branch '1.5.x' 8 years ago
Phillip Webb 3af5ae2a26 Polish `ObjectProvider` names
Consistently use the simple name for ObjectProvider parameter and
field names. For example:

  `ObjectProvider<Something> something`

rather than

  `ObjectProvider<Something> somethingProvider`
8 years ago
Phillip Webb e0541d0f74 Polish 8 years ago
Stephane Nicoll 740813a1e8 Merge branch '1.5.x' 8 years ago
Stephane Nicoll 0d4ef3dbdb Fix formatting 8 years ago
Stephane Nicoll fb70097c4f Merge branch '1.5.x' 8 years ago
Stephane Nicoll d0fa72a169 Filter AbstractRoutingDataSource from health indicator
Closes gh-6806
8 years ago
Spring Buildmaster 9057f9ae1f Next development version 8 years ago
Stephane Nicoll 3cf54884d8 Fix merge issue
See gh-7718
8 years ago
Stephane Nicoll 3d78068c67 Merge branch '1.5.x' 8 years ago
Stephane Nicoll 5d909a969f Polish contribution
Closes gh-6613
8 years ago
Eddú Meléndez 53d25999f3 Add support for multiple beans in the Flyway and Liquibase endpoints
Closes gh-6610
See gh-6613
8 years ago
Phillip Webb 6e02fe59f7 Merge branch '1.5.x' 8 years ago
Phillip Webb b87e02dde0 Polish Spring Integration metrics support
See gh-7722
8 years ago
Artem Bilan d69e43b433 Refactor Spring Integration metrics support
Update Spring Integration metrics support since Spring Integration
`4.3.6`+ no longer needs `spring-integration-jmx` enable
`MessageChannel`, `MessageHandler` and `MessageSource` metrics.

- Add `IntegrationManagementConfiguration` conditional auto-configuration
  to provide `@EnableIntegrationManagement` when JMX is `enabled` or there
  is no `IntegrationManagementConfigurer.MANAGEMENT_CONFIGURER_NAME` bean.
  By default this bean doesn't exist and you explicitly should declare it
  (e.g. via `@EnableIntegrationManagement`) if you would like to collect
  metrics. At the same time Spring Integration enables it when JMX
  management is present (that is a purpose of that new
  `IntegrationManagementConfiguration`)

- Change `SpringIntegrationMetricReader` to read metrics from the
  `IntegrationManagementConfigurer`, not `IntegrationMBeanExporter`

- Change `PublicMetricsAutoConfiguration` to register
  `IntegrationManagementConfigurer.MANAGEMENT_CONFIGURER_NAME` bean if
  not present. Since we are here in `actuator`, therefore we are
  interested in the metrics for SI as well.

- Since we don't need JMX for the metrics any more, remove SI-JMX
  dependency from the `spring-boot-starter-integration`.

- Remove `IntegrationManagementConfiguration` modification from the
  `integrationMbeanExporter()`, since that looks like mutation of an
  external object, when end-user would prefer their own options.
  Therefore we don't need `ObjectProvider<IntegrationManagementConfigurer>`, too

- Add missed `MessageSourceMetrics` gathering for the
  `SpringIntegrationMetricReader`

Closes gh-7722
8 years ago
Johnny Lim e12b4a944f Polish 8 years ago
Phillip Webb 8b47561f7e Merge branch '1.5.x' 8 years ago
Phillip Webb 38f7389eab Polish loggers 8 years ago
Phillip Webb c76bd2d81e Refine error message from Endpoint MVC security
Update the error message to return less information to the client.
Details of how to disable security are now written to the log instead.

See gh-7605
See gh-7634
8 years ago
Madhura Bhave 38eeae2166 Send error with message from Endpoint MVC security
Update `MvcEndpointSecurityInterceptor` to that it sends an error in the
same way as Spring Security. Prior to this commit the `ErrorController`
would not handle endpoint security errors.

Fixes gh-7605
Closes gh-7634
8 years ago
Phillip Webb dba8ef2ba8 Polish CF management skip SSL opt-in
See gh-7629
See gh-7655
8 years ago
Madhura Bhave 34712cbf76 Switch CF management skip SSL to opt-in
Change CloudFoundryActuatorAutoConfiguration so that skipping of SSL
verification is now opt-in rather than enabled by default.

Fixes gh-7629
Closes gh-7655
8 years ago
Phillip Webb 06a7ab0cd5 Polish ReservoirFactory support
Polish Dropwizrd reservoir support including a refactor of
`ReservoirFactory` to allow reservoirs to be created based on a
metric name.

See gh-5199
See gh-7105
8 years ago
Lucas Saldanha 1fc2e87053 Enable custom Reservoir with Dropwizard metrics
Uses the ReservoirFactory to customize the implementation of
the Reservoir that will be used when creating Timer and Histogram
in the DropwizardMetricServices.

Fixes gh-5199
Closes gh-7105
8 years ago
Phillip Webb 1f417997f3 Merge branch '1.5.x' 8 years ago
Phillip Webb d15f3548be Polish 8 years ago
Phillip Webb 6121208cbb Polish formatting 8 years ago
Phillip Webb 4b9cba351b Merge branch '1.4.x' into 1.5.x 8 years ago
Phillip Webb bd74c3d327 Polish formatting 8 years ago
Stephane Nicoll ef9f57621d Merge branch '1.5.x' 8 years ago
Stephane Nicoll 684be0f048 Polish contribution
Closes gh-6852
8 years ago
Vedran Pavic 899f7aa8f0 Add constants for supported audit event types
See gh-6582
8 years ago
Stephane Nicoll 9f3fa648bc Merge branch '1.5.x' 8 years ago
Stephane Nicoll f560f338ab Polish contribution
Closes gh-7219
8 years ago
Vedran Pavic 60e054d0e4 Add `LoggersEndpointMBean`
See gh-7219
8 years ago
Stephane Nicoll a86678cc31 Merge branch '1.5.x' 8 years ago
Eddú Meléndez fc09a23991 Add missing actuator metadata
Health metadata for cassandra and couchbase is added.

See gh-7632
8 years ago
Johnny Lim 6d1b752ffe Polish
Closes gh-7552
8 years ago
Oscar Utbult 38713c473f Remove redundant array creation for calling varargs method
Closes gh-7551
8 years ago
Andy Wilkinson 5a4a7409c9 Merge branch '1.5.x' 8 years ago
Andy Wilkinson 595679bed4 Disable management security when testing Jolokia endpoint 8 years ago
Andy Wilkinson 133284c1c4 Merge branch '1.5.x' 8 years ago
Andy Wilkinson 391a760c3c Merge branch '1.4.x' into 1.5.x 8 years ago
Andy Wilkinson 4ec95b8308 Ensure that JolokiaMvcEndpoint destroys underlying controller
Closes gh-7606
8 years ago
Dave Syer 78b2931337 Merge branch '1.5.x' 8 years ago
Dave Syer 1baf3c63c4 Make the Spring Security part of CF autoconfig conditional
Otherwise you get a class not found exception at runtime in
CF when Spring Securtity is not on the classpath.
8 years ago
Dave Syer cc8ecb6ff5 Clear VCAP_APPLICATION after tests
So that other CF tests do not fail.
8 years ago
Madhura Bhave 6a1f3d2dab Merge branch '1.5.x' 8 years ago
Madhura Bhave 5d8e00cb56 Fix HealthMvcEndpointTests
See gh-7569
8 years ago
Madhura Bhave 1cd1054514 Merge branch '1.5.x' 8 years ago
Madhura Bhave 1be5812cf0 Require `ACTUATOR` role rather than `ADMIN`
Update management security to require an `ACTUATOR` role rather than
`ADMIN` by default. This should reduce the risk of users accidentally
exposing actuator endpoints because they happen to use a role named
`ADMIN`.

Fixes gh-7569
8 years ago
Madhura Bhave 95be208f0f Use IgnoredRequestCustomizer to ignore paths
Update `SpringBootWebSecurityConfiguration` to ignore requests by
delegating to `IgnoredRequestCustomizer` beans. This allows a single
Spring Boot `WebSecurityConfigurer<WebSecurity>` bean to be used which
prevents potential exceptions caused by duplicate `@Order` values.

Fixes gh-7106
8 years ago
Madhura Bhave d09aafacda Add a security interceptor for actuator endpoints
Update `AbstractEndpointHandlerMapping` to support a security
interceptor that can be used to enforce endpoint security.

Fixes gh-6889
8 years ago
Andy Wilkinson d0b1cad00f Merge branch '1.5.x' 8 years ago
Andy Wilkinson 967625db1e Replace field injection with constructor injection in config classes
Closes gh-7563
8 years ago
Andy Wilkinson 598eca7e0f Merge branch '1.5.x' 8 years ago
Andy Wilkinson 1464425d64 Remove use of @Component from classes that are not scanned
Closes gh-7549
8 years ago
Stephane Nicoll 816c236e5b Merge branch '1.5.x' 8 years ago
Stephane Nicoll ee72e788ed Rename `spring-boot-junit-runners` to `spring-boot-test-support`
Closes gh-7421
8 years ago
Stephane Nicoll 9c546a7efc Merge branch '1.5.x' 8 years ago
Stephane Nicoll 85de72c0d0 Merge branch '1.4.x' into 1.5.x 8 years ago
Stephane Nicoll 2a85a2557d Fix health indicator auto-configuration order
Previously, the health auto-configuration `AutoconfigureOrder` entry for
couchbase was referring to the standard couchbase auto-configuration that
is not responsible to configure the `CouchbaseOperations` bean. Yet, the
health indicator implementation was relying on the presence of such a
bean.

This commit fixes the `AutoconfigureOrder` entry so that it refers to
`CouchbaseDataAutoConfiguration` now.

Closes gh-7543
8 years ago
Andy Wilkinson 2608b331dd Merge branch '1.5.x' 8 years ago
Andy Wilkinson 9c20ada927 Merge branch '1.4.x' into 1.5.x 8 years ago
Andy Wilkinson 356edc725c Handle request mappings with regular expressions in MetricsFilter
Closes gh-7503
8 years ago
Andy Wilkinson 4870349438 Merge branch '1.5.x' 8 years ago
Andy Wilkinson 2be554456e Introduce SearchStrategy.ANCESTORS as a replacement for .PARENTS
Closes gh-6763
8 years ago
Andy Wilkinson e0d9352e80 Merge branch '1.5.x' 8 years ago
Andy Wilkinson dce1487424 Merge branch '1.4.x' into 1.5.x 8 years ago
Andy Wilkinson e19c6245ef Consider endpoints.sensitive when endpoints.health.sensitive is not set
Closes gh-7476
8 years ago
Andy Wilkinson 95a763d528 Merge branch '1.5.x' 8 years ago
Andy Wilkinson f5dd90815b Polishing: fix some compiler warnings 8 years ago
Phillip Webb 20d7dd5747 Merge branch '1.5.x' 8 years ago
Phillip Webb 1657120286 Move ModifiedClassPathRunner to its own module
Migrate `ModifiedClassPathRunner` from `spring-boot` test source to
its own module.

Fixes gh-7420
8 years ago
Phillip Webb c2c5611f77 Polish 8 years ago
Madhura Bhave 3a3228fc70 Add CORS interceptor for Cloud Foundry actuators
This interceptor processes the response with CORS headers
and apepars before the Cloud Foundry security interceptor.

See gh-7108
8 years ago
Andy Wilkinson 9273b1789b Merge branch '1.5.x' 8 years ago
Andy Wilkinson 1cd781b242 Make spring-boot-test compatible with Mockito 2.1 and 2.2
We use some internal Mockito classes and some  breaking API changes
have been made to them in Mockito 2. This commit introduces a utility
class, SpringBootMockUtil, to shield our code from these differences.
Mockito 1 is called directly and Mockito 2 is called via reflection.

To allow these changes to be tested, FilteredClassPathRunner has been
enhanced to also support overriding a dependency on the class path.
As a result it has been renamed to ModifiedClassPathRunner. The new
ClassPathOverrides annotation can be used to provide the Maven
coordinates of one or more dependencies that should be resolved and
added to the class path. Such additions are added to the start of
the class path so that they override any existing dependency that
contains the same classes.

Closes gh-6520
8 years ago
Andy Wilkinson 93612116c5 Merge branch '1.5.x' 8 years ago
Andy Wilkinson 5527e3fdad Fix SpringApplicationHierarchyTests following latest Neo4j changes
See gh-7391
8 years ago
Phillip Webb cb7c0b5031 Merge branch '1.5.x' 8 years ago
Johnny Lim 8038882d46 Polish
Closes gh-7403
8 years ago
Andy Wilkinson 4edab86ba2 Merge branch '1.5.x' 8 years ago
Andy Wilkinson 387a406aad Merge branch '1.4.x' into 1.5.x 8 years ago
Phillip Webb d8b7d6dfdc Merge branch '1.5.x' 8 years ago
Phillip Webb 449b42ffa0 Polish LinksEnhancer to use endpoint name
See gh-7164
See gh-7132
8 years ago
Madhura Bhave ada02232b9 Change LinksEnhancer to use endpoint name
Update `LinksEnhancer` to use NamedEndpoint names as rel names. If the
endpoint name is not available, fallback to endpoint path. Allow
multiple hrefs per rel if path is different.

Fixes gh-7132
Closes gh-7164
8 years ago
Madhura Bhave 0e3a3df6f4 Return log levels in `/loggers` endpoint payload
Update `LoggersEndpoint` to additionally return the log levels actually
supported by the system.

Fixes gh-7396
8 years ago
Phillip Webb 764f13453a Merge branch '1.4.x' into 1.5.x 8 years ago
Phillip Webb bacf0878af Polish 8 years ago
Andy Wilkinson 86c55dda16 Merge branch '1.5.x' 8 years ago
Andy Wilkinson 24cc5d5644 Give javac's type inferencing a helping hand 8 years ago
Andy Wilkinson e26a3e3766 Merge branch '1.5.x' 8 years ago
Andy Wilkinson 22e456a177 Merge branch '1.4.x' into 1.5.x 8 years ago
Madhura Bhave ed75ed3d93 Merge branch '1.5.x' 8 years ago
Madhura Bhave 2697bf2ba1 Add Content-Type to allowed headers for CloudFoundry actuators
See gh-7108
8 years ago
Madhura Bhave e1a216e34a Merge branch '1.5.x' 8 years ago
Madhura Bhave af61278213 Extend HealthMvcEndpoint for Cloud Foundry
The CloudFoundryHealthMvcEndpoint does not perform additional
security checks since security is handled by the interceptor.

See gh-7108
8 years ago
Madhura Bhave a3bcb2778f Add message to response body for Cloud Foundry security error
See gh-7108
8 years ago
Spring Buildmaster e712a9ba8c Next Development Version 8 years ago
Andy Wilkinson f3c2f55cbe Merge branch '1.5.x' 8 years ago
Andy Wilkinson 2e76687d17 Merge branch '1.4.x' into 1.5.x 8 years ago
Andy Wilkinson 5f44598d8b Remove use of static import that Checkstyle prohibits 8 years ago
Andy Wilkinson 04a869bbe7 Merge branch '1.5.x' 8 years ago
Andy Wilkinson 218d28f74c Merge branch '1.4.x' into 1.5.x 8 years ago
Andy Wilkinson 33dcd853fd Ensure that health endpoint remains insecure without Spring Security
The changes made in 6a2ac080 mean that getSecurity() on
ManagementServerProperties will no longer return null when Spring
Security is on the classpath. This had the unwanted side-effect of
causing the health endpoint to hide its details when Spring Security
was not on the classpath.

This commit reinstates the previous behaviour by only considering
the health endpoint to be secure if Spring Security is on the
classpath and management.security.enabled is true.

Closes gh-7345
8 years ago
Madhura Bhave 372cfb3dff Merge branch '1.5.x' 8 years ago
Madhura Bhave 82f89b4ac1 Add custom headers to allowed CORS headers for CF actuators
Update CORS configuration to support Authorization and X-Cf-App-Instance.

See gh-7108
8 years ago
Stephane Nicoll d32da0d692 Merge branch '1.5.x' 8 years ago
Stephane Nicoll 01e66ecbd5 Merge branch '1.4.x' into 1.5.x 8 years ago