Commit Graph

1441 Commits (6ba7849094ccbf3321e01f2369fb5c12a3756f21)

Author SHA1 Message Date
Stephane Nicoll cd8684499d Polish
See gh-8621
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
Madhura Bhave 7da70a52fd Mask sensitive placeholders in env endpoint
Closes gh-8282
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 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 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 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 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 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 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
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
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 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 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 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
Johnny Lim 0adab8a2be Use logical 'and' instead of bitwise 'and'
Closes gh-8198
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
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
Spring Buildmaster 5c12500366 Next Development Version 8 years ago
Spring Buildmaster a2696bf873 Next Development Version 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 b575be339e Fix endpoint id
See gh-7579
8 years ago
Andy Wilkinson f823599d1f Replace @PostConstruct validation with setter validation
Closes gh-7579
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 98a4c72c50 Clarify PublicMetrics (uniqueness of metric names)
See gh-6404
8 years ago
Johnny Lim e0de28a1f7 Polish
Closes gh-8076
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 5703fb1515 Polish 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 f3cd0ad22c Polish 8 years ago
Madhura Bhave e73c6bb2e2 Exclude authorization header from trace by default
Closes gh-7974
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 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 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 5c9aa41c07 Update InMemoryRichGaugeRepository to support increments
Closes gh-2902
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
Johnny Lim acc36c076d Polish
See gh-8004
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 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 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
Phillip Webb 9159c87bf9 Polish 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
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
Johnny Lim f915ae197a Polish 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 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 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 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 aacf5d660f Update copyright year for changed files 8 years ago
Phillip Webb 367963f29f Polish 8 years ago
Phillip Webb 8b69856fc9 Polish 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 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 0d4ef3dbdb Fix formatting 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 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