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

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.

主站蜘蛛池模板: 庆元县| 桐城市| 资阳市| 陆丰市| 新宾| 诸暨市| 嘉善县| 南丰县| 咸丰县| 什邡市| 宜君县| 涪陵区| 洞头县| 漳州市| 连城县| 武川县| 枣阳市| 榆林市| 伽师县| 黑水县| 高碑店市| 偃师市| 托克逊县| 鸡西市| 恩施市| 兴安盟| 南城县| 双桥区| 桃源县| 桑植县| 西乌珠穆沁旗| 新蔡县| 石城县| 西乌珠穆沁旗| 永胜县| 徐水县| 天等县| 炉霍县| 济南市| 平谷区| 延安市|