1
votes

There's a difference in implementation between two versions of Spring Boot Actuator (1.2.5 and 1.3.0) in HealthMvcEndpoint, isUnrestricted() method ( && and || ). I understand that this is to preserve these restrictions

http://docs.spring.io/spring-boot/docs/current-SNAPSHOT/reference/htmlsingle/#production-ready-health-access-restrictions

But is there any solution now to enable only one endpoint (e.g. Health) unrestricted with full content, without exposing all the others? Disabling management.security.enabled is just making all the endpoints accessible without authentication (?) - it doesn't look like it's taking endpoint sensitivity with it.

2
Do you want to disable all but one endpoint, or do you want to have them all enabled but allow unrestricted access to a single endpoint? - Andy Wilkinson
I was wondering if it's possible to preserve original behaviour of the endpoints and to make a single one of them available in unrestricted access. I can just override HealthMvcEndpoint, but that won't be the point. - Sus

2 Answers

1
votes

I managed to partially solve this by making all the endpoints disabled in the first place by endpoints.enabled = false with disabling their security management.security.enabled = false
and enabled the ones I wanted without security - like the Health endpoint endpoints.health.enabled = true and endpoints.health.sensitive = false.

1
votes

With actuator 2 these properties have been changed

To disable all the actuator endpoints use

management.endpoints.enabled-by-default=false

To enable specific endpoint use management.endpoint.<id>.enabled property. The following example enables the shutdown endpoint:

management.endpoint.shutdown.enabled=true

Official Documentation

https://docs.spring.io/spring-boot/docs/current/reference/html/production-ready-features.html