Safeguard
Security Guides•

Should the Actuator health endpoint show details?

The health endpoint hides details by default. When to use never, when-authorized or always, and how roles decide who sees component status.

Safeguard Security Team
3 min read

Keep the Spring Boot health endpoint at its default of never for public traffic. Details such as database and disk status help operators but also describe your infrastructure to outsiders. Use when-authorized with a named role for internal views, and use always only when the endpoint is not reachable by untrusted users.

What the property does

The Spring Boot docs say the information exposed by the health endpoint depends on management.endpoint.health.show-details and management.endpoint.health.show-components. Each takes one of three values.

ValueMeaningGood for
neverDetails are never shown (default)Public load balancer probes
when-authorizedShown only to authorized usersOperators signed in with a role
alwaysShown to all usersPrivate networks only

A user is authorized when they hold one or more of the endpoint's roles. If no roles are configured, which is the default, all authenticated users are considered authorized. The roles are set with management.endpoint.health.roles.

Why details matter to an attacker

Component status can reveal which databases, message brokers or caches an application uses, and when one is failing. That helps someone plan an attack or time one. It is low severity alone, but it is free reconnaissance.

A practical setup

  1. Leave show-details as never for the main port.
  2. Move Actuator to a management port that is only reachable from your monitoring network, if your platform allows it.
  3. Set when-authorized and a dedicated role such as an ops role for human operators.
  4. For orchestrator probes, rely on the liveness and readiness groups, which the docs say are enabled automatically and can be turned off with a property.
  5. If you do choose always, the docs warn that your security configuration must permit access to health for both authenticated and unauthenticated users, so check that rule exists on purpose.

Mistakes to watch for

Safeguard scans dependencies, produces SBOMs and uses reachability analysis to show which findings your code can actually reach. You can run a free scan at gold.safeguard.sh/scan.

Quick check

What is the default for show-details?

The default value is never, so the health endpoint reports status without component details.

Do I need always for Kubernetes probes?

Not necessarily. The docs describe liveness and readiness health groups that serve that purpose.

Sources

Last reviewed: 19 October 2026.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.