{"id":812,"date":"2026-11-20T15:37:49","date_gmt":"2026-11-20T07:37:49","guid":{"rendered":"http:\/\/www.koolkooks.com\/blog\/?p=812"},"modified":"2026-11-20T15:37:49","modified_gmt":"2026-11-20T07:37:49","slug":"how-to-expose-actuator-endpoints-over-http-4b69-dc7edf","status":"publish","type":"post","link":"http:\/\/www.koolkooks.com\/blog\/2026\/11\/20\/how-to-expose-actuator-endpoints-over-http-4b69-dc7edf\/","title":{"rendered":"How to expose Actuator endpoints over HTTP?"},"content":{"rendered":"<p>If you run a microservices architecture, you already know that keeping track of your application\u2019s inner workings\u2014performance metrics, health status, and configuration details\u2014isn\u2019t just a nice-to-have; it\u2019s how you prevent outages and deliver reliable services. That\u2019s where Spring Boot Actuator comes in: it\u2019s the tool that gives you those critical insights. But a common question I hear from developers and ops teams is, \u201cHow do I expose Actuator endpoints over HTTP?\u201d As someone who\u2019s spent years building and supporting Actuator integrations for businesses large and small, I\u2019ve worked through every edge case, from basic setup to securing sensitive data, and I\u2019m here to share what I\u2019ve learned. <a href=\"https:\/\/www.pynosvalves.com\/actuator\/\">Actuator<\/a><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.pynosvalves.com\/uploads\/44511\/small\/slide-gate-valvee2b30.jpg\"><\/p>\n<p>First, let\u2019s cut through the noise. Exposing Actuator endpoints over HTTP sounds straightforward, but it\u2019s easy to make mistakes that leave your system vulnerable or incomplete. I\u2019ve seen teams either expose too many endpoints (opening the door to breaches) or too few (blind to what\u2019s going wrong) because they skipped a few key steps. Whether you\u2019re new to Actuator or looking to refine your current setup, this guide will walk through every part of the process, including common pitfalls and how to avoid them.<\/p>\n<h3>Starting with the Basics: What Are Actuator Endpoints?<\/h3>\n<p>Before we dive into exposing them, let\u2019s make sure we\u2019re on the same page. Actuator endpoints are RESTful resources that let you interact with and gather data about your Spring Boot application. Some, like <code>\/actuator\/health<\/code>, are built to be public\u2014they show if your app is running without revealing sensitive details. Others, like <code>\/actuator\/env<\/code> or <code>\/actuator\/beans<\/code>, give access to configuration and internal beans, which are definitely not something you want to broadcast to the entire internet.<\/p>\n<p>When you first add Actuator to a Spring Boot project, not all endpoints are enabled by default. By default, only the health endpoint is exposed over JMX (Java Management Extensions) and HTTP. That means if you just add the Actuator dependency and try to hit <code>\/actuator\/health<\/code> in your browser, it won\u2019t work\u2014at least not until you adjust the configuration. That\u2019s where most developers start: they add the dependency, test, and get a 404, and that\u2019s where confusion sets in.<\/p>\n<h3>Step 1: Add the Necessary Dependencies<\/h3>\n<p>The first step is making sure Actuator is included in your project. If you\u2019re using Maven, you\u2019ll add this to your <code>pom.xml<\/code>:<\/p>\n<pre><code class=\"language-xml\">&lt;dependency&gt;\n    &lt;groupId&gt;org.springframework.boot&lt;\/groupId&gt;\n    &lt;artifactId&gt;spring-boot-starter-actuator&lt;\/artifactId&gt;\n&lt;\/dependency&gt;\n<\/code><\/pre>\n<p>If you\u2019re using Gradle, it looks like this:<\/p>\n<pre><code class=\"language-groovy\">implementation 'org.springframework.boot:spring-boot-starter-actuator'\n<\/code><\/pre>\n<p>This pulls in the core Actuator libraries, but to work with HTTP, you\u2019ll also need the Spring Web starter (which you probably already have if your app is a web service). Spring Web handles the HTTP layer that exposes Actuator endpoints to external requests. Without Spring Web, Actuator can\u2019t serve endpoints over HTTP\u2014so if you\u2019re building a non-web app, you\u2019ll need to add <code>spring-boot-starter-web<\/code> even if you don\u2019t have a traditional web UI.<\/p>\n<p>I\u2019ve had more than a few clients come to me saying their endpoints won\u2019t load, and nine times out of ten, it\u2019s because they forgot to include the Web starter. It\u2019s a small detail, but it\u2019s the foundation of exposing endpoints over HTTP, so don\u2019t skip it.<\/p>\n<h3>Step 2: Configure Endpoint Exposure Over HTTP<\/h3>\n<p>Once the dependencies are in place, the next step is to tell Spring Boot which endpoints you want to expose over HTTP. This is where the <code>application.properties<\/code> or <code>application.yml<\/code> file comes in. The key properties here are <code>management.endpoints.web.exposure.include<\/code> and <code>management.endpoints.web.exposure.exclude<\/code>.<\/p>\n<p>Let\u2019s break that down. The <code>include<\/code> property lets you list the endpoints you want to make public, and the <code>exclude<\/code> property lets you remove ones you don\u2019t need. You can use specific endpoint IDs, or shorthand like <code>*<\/code> to include all endpoints\u2014though I almost never recommend using <code>*<\/code> in production. Too many endpoints expose sensitive data, and the last thing you want is a bad actor pulling your environment variables or listing all your application\u2019s beans.<\/p>\n<p>For example, if you want to expose only the health and info endpoints over HTTP, your <code>application.properties<\/code> would look like this:<\/p>\n<pre><code class=\"language-properties\">management.endpoints.web.exposure.include=health,info\n<\/code><\/pre>\n<p>If you\u2019re using YAML, it\u2019s:<\/p>\n<pre><code class=\"language-yaml\">management:\n  endpoints:\n    web:\n      exposure:\n        include: &quot;health,info&quot;\n<\/code><\/pre>\n<p>What if you need more endpoints, like metrics to track application performance or a shutdown endpoint to gracefully stop the app? You can add those, but be intentional. For example, to expose health, info, and metrics:<\/p>\n<pre><code class=\"language-properties\">management.endpoints.web.exposure.include=health,info,metrics\n<\/code><\/pre>\n<p>Now, a common question: what if you want to include most endpoints but exclude a few sensitive ones? That\u2019s where <code>exclude<\/code> comes in. Let\u2019s say you want everything except the env and configprops endpoints:<\/p>\n<pre><code class=\"language-properties\">management.endpoints.web.exposure.include=*\nmanagement.endpoints.web.exposure.exclude=env,configprops\n<\/code><\/pre>\n<p>This is a middle ground that works well for many teams. It gives you visibility into most of your app\u2019s state without giving away your configuration details, which often contain database credentials or API keys.<\/p>\n<p>Another point to note: endpoints have different levels of sensitivity. The shutdown endpoint, for example, lets you stop the application. If you expose that over HTTP without securing it, anyone can trigger a shutdown. That\u2019s a disaster waiting to happen, so make sure you never expose sensitive endpoints in public environments unless you have strict security controls in place.<\/p>\n<h3>Step 3: Customize the Endpoint Path<\/h3>\n<p>By default, Actuator endpoints live under <code>\/actuator<\/code>, so the health endpoint is at <code>\/actuator\/health<\/code>. But some teams prefer to change this path to avoid conflicts with other routes, or to make it less obvious that you\u2019re using Actuator. That\u2019s easy to adjust with the <code>management.endpoints.web.base-path<\/code> property.<\/p>\n<p>For example, if you want endpoints to live under <code>\/admin<\/code> instead of <code>\/actuator<\/code>, add this to your configuration:<\/p>\n<pre><code class=\"language-properties\">management.endpoints.web.base-path=\/admin\n<\/code><\/pre>\n<p>Now the health endpoint is at <code>\/admin\/health<\/code>, and the info endpoint is at <code>\/admin\/info<\/code>. This might seem like a small change, but it\u2019s a simple way to add a layer of obscurity, which can help deter casual attackers who are scanning for common Actuator endpoints.<\/p>\n<p>I\u2019ve worked with teams that use custom paths as part of their security strategy, and while it\u2019s not a replacement for proper authentication, it\u2019s a quick win that adds a little extra protection. Just make sure your monitoring tools (like Prometheus or Grafana) are updated to use the new path, or you\u2019ll end up with missing metrics.<\/p>\n<h3>Step 4: Secure Your Exposed Endpoints<\/h3>\n<p>Here\u2019s where many teams go wrong: they expose endpoints over HTTP but don\u2019t secure them. Actuator endpoints can give attackers a ton of information about your app\u2014from dependencies to configuration. If you leave them open, you\u2019re essentially handing over a map of your system.<\/p>\n<p>Spring Security is the standard way to secure HTTP endpoints in Spring Boot, and it works seamlessly with Actuator. If you have Spring Security added as a dependency, you\u2019ll need to configure it to require authentication for Actuator endpoints, and allow public access only to the endpoints that should be public.<\/p>\n<p>Let\u2019s look at a basic Spring Security configuration for Actuator. First, add the Spring Security dependency to your <code>pom.xml<\/code> (or build.gradle):<\/p>\n<pre><code class=\"language-xml\">&lt;dependency&gt;\n    &lt;groupId&gt;org.springframework.boot&lt;\/groupId&gt;\n    &lt;artifactId&gt;spring-boot-starter-security&lt;\/artifactId&gt;\n&lt;\/dependency&gt;\n<\/code><\/pre>\n<p>Then, create a security configuration class to define access rules. Here\u2019s a simple one that allows public access to health and info, and requires authentication for all other Actuator endpoints:<\/p>\n<pre><code class=\"language-java\">import org.springframework.context.annotation.Bean;\nimport org.springframework.context.annotation.Configuration;\nimport org.springframework.security.config.annotation.web.builders.HttpSecurity;\nimport org.springframework.security.web.SecurityFilterChain;\n\n@Configuration\npublic class SecurityConfig {\n\n    @Bean\n    public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {\n        http\n            .authorizeHttpRequests(auth -&gt; auth\n                .requestMatchers(&quot;\/actuator\/health&quot;, &quot;\/actuator\/info&quot;).permitAll()\n                .requestMatchers(&quot;\/actuator\/**&quot;).authenticated()\n            )\n            .httpBasic(); \/\/ or formLogin, depending on your needs\n        return http.build();\n    }\n}\n<\/code><\/pre>\n<p>This configuration means that anyone can check if your app is healthy or get basic info, but to access metrics, beans, or other endpoints, you need to log in with valid credentials.<\/p>\n<p>Another security best practice: use HTTPS for all Actuator traffic. If you\u2019re exposing endpoints over HTTP, make sure you\u2019re redirecting to HTTPS. You can configure that in Spring Boot with <code>security.require-ssl=true<\/code> in your properties file, which will ensure that all requests to your app use HTTPS.<\/p>\n<p>I can\u2019t stress this enough\u2014securing Actuator endpoints is non-negotiable. I\u2019ve had clients who didn\u2019t do this, and ended up with their Actuator endpoints scraped by bots, leading to exposed sensitive data. Don\u2019t cut corners here.<\/p>\n<h3>Step 5: Test Your Exposed Endpoints<\/h3>\n<p>Once you\u2019ve configured everything, it\u2019s time to test. You can use tools like curl, Postman, or even a browser to check if your endpoints are accessible. Let\u2019s say you exposed health and info at <code>\/actuator\/health<\/code> and <code>\/actuator\/info<\/code>.<\/p>\n<p>First, test the public endpoints:<\/p>\n<pre><code class=\"language-bash\">curl https:\/\/your-app-domain.com\/actuator\/health\n<\/code><\/pre>\n<p>You should get a response like:<\/p>\n<pre><code class=\"language-json\">{&quot;status&quot;:&quot;UP&quot;}\n<\/code><\/pre>\n<p>That means the endpoint is accessible and working. If you try to access an endpoint that\u2019s supposed to be secured, like <code>\/actuator\/env<\/code>, you should get a 401 Unauthorized response, prompting you to log in.<\/p>\n<p>If you get a 404 when you try to access an endpoint, double-check your <code>exposure.include<\/code> configuration to make sure the endpoint name is correct. Some endpoints have different IDs\u2014for example, the metrics endpoint is <code>metrics<\/code>, but the prometheus endpoint (which is popular for scraping) is <code>prometheus<\/code>. If you\u2019re using Prometheus, make sure to include <code>prometheus<\/code> in your <code>include<\/code> list so it\u2019s exposed.<\/p>\n<p>Another test: if you changed the base path to <code>\/admin<\/code>, your health endpoint should be at <code>\/admin\/health<\/code>. If that doesn\u2019t work, check the <code>base-path<\/code> property in your configuration\u2014typos are easy to make here, and a wrong path will break access.<\/p>\n<h3>Common Pitfalls to Avoid<\/h3>\n<p>After working with dozens of teams on Actuator integrations, I\u2019ve seen the same mistakes pop up again and again. Let\u2019s cover the most common ones so you can avoid them.<\/p>\n<p>First, exposing too many endpoints. It\u2019s tempting to use <code>include=*<\/code> to get all the data, but in production, that\u2019s a huge security risk. Sensitive endpoints like <code>shutdown<\/code>, <code>env<\/code>, and <code>heapdump<\/code> should never be exposed publicly. If you need to use them in your internal environment, make sure they\u2019re behind a VPN or a strict authentication layer.<\/p>\n<p>Second, forgetting to update monitoring tools. If you change the base path or expose new endpoints, make sure your monitoring system (like Prometheus, Datadog, or New Relic) is configured to use the new paths. I\u2019ve had teams spend hours debugging missing metrics only to realize they forgot to update the Actuator path in their monitoring setup.<\/p>\n<p>Third, not handling environment differences. Your local development environment is different from staging and production. In local, you might expose all endpoints for testing, but in production, you should limit exposure and enforce security. You can use Spring profiles to separate configurations\u2014for example, a <code>local<\/code> profile that includes all endpoints, and a <code>prod<\/code> profile that only includes health and info. That way, you don\u2019t have to remember to adjust the configuration when deploying to different environments.<\/p>\n<p>Fourth, ignoring endpoint permissions. If you have a multi-tenant app, you might want to restrict Actuator endpoints per user or team. For example, your dev team might need access to metrics, but your customer support team only needs access to health. Spring Security lets you add role-based access control to Actuator endpoints, which is a must for larger teams.<\/p>\n<h3>When to Work with a Specialist Like Me<\/h3>\n<p>Exposing Actuator endpoints over HTTP is doable with the steps above, but if you\u2019re running a complex environment\u2014like a distributed microservices setup with multiple services, or you need advanced security compliance\u2014you might run into issues. That\u2019s where my team comes in. We\u2019ve helped hundreds of businesses integrate Actuator with their infrastructure, troubleshoot exposure issues, and secure endpoints to meet compliance standards like GDPR or HIPAA.<\/p>\n<p>I\u2019ve seen teams try to handle this on their own and end up with gaps that lead to outages or data breaches. For example, one client a few years ago tried to expose all endpoints over HTTP without security, and their <code>\/actuator\/env<\/code> endpoint leaked database credentials, leading to a breach that cost them tens of thousands of dollars in downtime and remediation. Since we worked with them to adjust their configuration and implement strict security controls, they\u2019ve had zero issues with Actuator.<\/p>\n<p>Whether you need help setting up initial exposure, customizing endpoints for your environment, or hardening security for production, we\u2019re here to guide you. We don\u2019t just provide a tool\u2014we provide expertise that comes from years of working with Actuator, so you can avoid the mistakes that cost teams time and money.<\/p>\n<h3>Final Thought<\/h3>\n<p>Exposing Actuator endpoints over HTTP doesn\u2019t have to be complicated. By adding the right dependencies, configuring exposure carefully, customizing paths when needed, and securing endpoints with Spring Security, you can get the visibility you need into your application without putting your system at risk. The key is to be intentional: only expose the endpoints you need, limit access to sensitive ones, and test your setup regularly.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.pynosvalves.com\/uploads\/44511\/small\/3pc-trunnion-mounted-ball-valve82a54.jpg\"><\/p>\n<p>If you\u2019re looking to streamline your Actuator setup, secure your endpoints, or troubleshoot any issues you\u2019re running into, we\u2019re ready to help. We work with teams of all sizes, from startups to enterprise businesses, to make Actuator work for their specific needs. Reach out to us to discuss your requirements and see how we can support your Actuator integration.<\/p>\n<h2>References<\/h2>\n<p><a href=\"https:\/\/www.pynosvalves.com\/globe-valve\/\">Globe Valve<\/a> Spring Boot Actuator Documentation<br \/>\nSpring Security Reference Guide<br \/>\nPrometheus and Actuator Integration Guide<\/p>\n<hr>\n<p><a href=\"https:\/\/www.pynosvalves.com\/\">Wuxi PYNOS Flow-tech Co., Ltd.<\/a><br \/>As one of the leading actuator manufacturers and suppliers in China, we offer a wide range of products with superior quality. We warmly welcome you to buy high quality actuator made in China here from our factory. We also accept customized orders.<br \/>Address: Sales Center: 7th Floor, No.19 Qingyuan RD, Wuxi City, Jiangsu Prov., China<br \/>E-mail: Info@pynosvalve.com<br \/>WebSite: <a href=\"https:\/\/www.pynosvalves.com\/\">https:\/\/www.pynosvalves.com\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you run a microservices architecture, you already know that keeping track of your application\u2019s inner &hellip; <a title=\"How to expose Actuator endpoints over HTTP?\" class=\"hm-read-more\" href=\"http:\/\/www.koolkooks.com\/blog\/2026\/11\/20\/how-to-expose-actuator-endpoints-over-http-4b69-dc7edf\/\"><span class=\"screen-reader-text\">How to expose Actuator endpoints over HTTP?<\/span>Read more<\/a><\/p>\n","protected":false},"author":146,"featured_media":812,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[775],"class_list":["post-812","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-industry","tag-actuator-4b21-dcb649"],"_links":{"self":[{"href":"http:\/\/www.koolkooks.com\/blog\/wp-json\/wp\/v2\/posts\/812","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.koolkooks.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.koolkooks.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.koolkooks.com\/blog\/wp-json\/wp\/v2\/users\/146"}],"replies":[{"embeddable":true,"href":"http:\/\/www.koolkooks.com\/blog\/wp-json\/wp\/v2\/comments?post=812"}],"version-history":[{"count":0,"href":"http:\/\/www.koolkooks.com\/blog\/wp-json\/wp\/v2\/posts\/812\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.koolkooks.com\/blog\/wp-json\/wp\/v2\/posts\/812"}],"wp:attachment":[{"href":"http:\/\/www.koolkooks.com\/blog\/wp-json\/wp\/v2\/media?parent=812"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.koolkooks.com\/blog\/wp-json\/wp\/v2\/categories?post=812"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.koolkooks.com\/blog\/wp-json\/wp\/v2\/tags?post=812"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}