skip to content

Actuator Endpoints & Exposure

The Actuator endpoint surface: what ships built in, the loggers and diagnostics endpoints, exposure control over web and JMX, writing your own, securing them, audit events and the info endpoint. Interviewers ask about exposure first, because a public /actuator/env leaks configuration.

part ofSpring Frameworkoverview, primer and where to startread it →
on this pageshow

explore

questions

page 2 of 2

How does the Actuator loggers endpoint actually change the level of a running app, and why does the same endpoint work across Logback, Log4j2, and JUL?

level: seniorimportance: should knowfreq 32%

basics

~20 s

The endpoint doesn't touch Logback directly. It calls Spring Boot's LoggingSystem abstraction, which has implementations for Logback, Log4j2, and JUL. Boot picks the right one from the classpath, so the endpoint mutates whatever backend is present through one uniform API.

open as a page

How does Spring Boot prevent /env and /configprops from leaking secrets, and how do you control value masking?

level: seniorimportance: should knowfreq 55%

basics

~20 s

Even for authorized users, /env and /configprops mask sensitive values. By default keys like password, secret, key, token and credentials are shown as '******', and since Boot 3 all values are hidden unless you set show-values to ALWAYS or WHEN_AUTHORIZED. You can add custom SanitizingFunction beans.

open as a page

What are the security benefits and pitfalls of running Actuator on a separate management port?

level: seniorimportance: should knowfreq 42%

basics

~20 s

Setting management.server.port to a different port than the app moves /actuator off the public port. Bind it to an internal address (management.server.address=127.0.0.1 or a private interface) so only ops/monitoring on the internal network can reach it, adding network-level isolation on top of Spring Security.

open as a page

How would you use the auditevents endpoint safely and effectively for a production, multi-instance service?

level: principalimportance: should knowfreq 16%

basics

~20 s

Treat the endpoint as sensitive: expose it only behind admin auth (ideally a separate management port), don't rely on the volatile per-node in-memory store for compliance, forward audit events to a durable central store/SIEM, scrub secrets from the data map, and set retention policies.

open as a page

Explain the composite structure behind /actuator/health: how the overall status is aggregated, how health groups and readiness/liveness probes fit in, and what edge cases you must handle.

level: principalimportance: should knowfreq 28%

basics

~20 s

The health endpoint composes many HealthIndicator/HealthContributor beans into a tree. A StatusAggregator reduces their statuses to one overall status (by default the worst wins, e.g. any DOWN → overall DOWN). Health groups (like readiness, liveness) expose subsets at /actuator/health/{group} for Kubernetes probes.

open as a page

How are custom Actuator endpoints discovered and registered, and what are the exposure/security implications of adding a @WriteOperation endpoint in production?

level: principalimportance: should knowfreq 18%

basics

~20 s

Actuator scans @Endpoint-annotated beans via EndpointDiscoverers and registers them per technology (web/JMX). A @WriteOperation is a POST that mutates state, so you must both restrict web exposure (not *) and secure it — require an ADMIN role for /actuator/**, and treat it like any mutating API.

open as a page

How would you safely expose these diagnostic endpoints in production, given heapdump/threaddump can leak sensitive data?

level: principalimportance: should knowfreq 35%

basics

~10 s

Don't expose them publicly. Keep only health public, put diagnostic endpoints behind authentication/authorization, ideally on a separate internal management port, and restrict access to operators. Treat any heap dump as a secret.

open as a page

What are the security and exposure considerations when publishing /actuator/info, and how would you govern them?

level: principalimportance: should knowfreq 30%

basics

~20 s

The info endpoint can leak build/git details, environment metadata, and (in git full mode) remote URLs and committer emails. Control exposure with management.endpoints.web.exposure.include, protect Actuator with authentication, keep git.mode=simple, and never place secrets in info.* or custom contributors.

open as a page

The loggers endpoint can change log levels at runtime. What are the security and operational risks of exposing it in production, and how would you govern it?

level: principalimportance: should knowfreq 26%

basics

~20 s

It is a state-changing endpoint: anyone who can POST can flip logging to TRACE, causing log floods, performance hits, disk exhaustion, and possible leakage of sensitive data in verbose logs. Protect it behind authentication/authorization, don't expose it publicly, and audit changes.

open as a page

Design a production-grade defense-in-depth strategy for locking down Actuator across exposure, authorization, data masking, and network.

level: principalimportance: should knowfreq 30%

basics

~20 s

Combine independent layers: expose only needed endpoints, guard them with a SecurityFilterChain requiring an admin role via EndpointRequest.toAnyEndpoint(), keep /env and /configprops values masked (show-values NEVER or WHEN_AUTHORIZED), disable dangerous ones like /shutdown, and isolate the management port to an internal network.

open as a page

What are logger groups in Spring Boot, and how do they interact with the loggers endpoint?

level: middleimportance: nice to knowfreq 18%

basics

~20 s

A logger group is a named alias for several loggers, defined with logging.group.<name>=pkg1,pkg2. You can then POST a level to that group name via the loggers endpoint and it changes all members at once. Spring predefines web and sql groups.

open as a page

Web and JMX exposure are configured separately. Discuss the design rationale and how you'd harden exposure for a production service.

level: principalimportance: nice to knowfreq 33%

basics

~20 s

Web and JMX each have their own include/exclude sets so you can surface an endpoint on one transport but not the other. In prod, keep web to a minimal allow-list (or a separate internal port), avoid *, and layer Spring Security on top.

open as a page

showing 31–42 of 42