官术网_书友最值得收藏!

Changing the sensitivity of the Actuator's endpoints

By default, many of the Actuator's endpoints are sensitive. All default endpoints in Spring Boot Actuator are automatically sensitive. Hence the endpoints can be secured by using default properties for fault security. These include username, password, and role, within the properties file of your application. But you can also mark sensitive as false if the endpoint doesn't expose sensitive information, as follows:

endpoints._endpoint-id.sensitive = false 

In the application.yml file, it would look like the following:

endpoints:
   _endpoint-id:
         sensitive: false 

You can also set it to true if all endpoints expose sensitive information.

For example, let's set the /health endpoint's sensitive value to false:

endpoints.health.sensitive=false 

Or in application.yml file:

endpoints:
   health:
         sensitive: false 

Now you can access the /health endpoint without any authentication security.

Spring Boot Actuators also allows you to create your own endpoint, with your own configurations and implementations. To do so, all you have to do is implement the endpoint interface and override its method.

主站蜘蛛池模板: 靖远县| 阜新| 台江县| 宁城县| 晋城| 时尚| 定远县| 武夷山市| 浦县| 宜丰县| 乡宁县| 渑池县| 霞浦县| 车致| 平昌县| 兴国县| 五台县| 左贡县| 德州市| 神池县| 沾化县| 洞口县| 建始县| 阿合奇县| 芜湖市| 阆中市| 娱乐| 新津县| 甘德县| 金平| 启东市| 双桥区| 彰化县| 永安市| 建瓯市| 安吉县| 通山县| 页游| 嘉峪关市| 综艺| 石渠县|