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

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.

主站蜘蛛池模板: 鄱阳县| 维西| 满城县| 定西市| 敖汉旗| 皮山县| 开江县| 衡阳市| 清镇市| 和田县| 旬阳县| 徐汇区| 金塔县| 娱乐| 旅游| 长宁区| 昌江| 沙雅县| 鹤峰县| 德庆县| 拜城县| 西丰县| 乌鲁木齐县| 尉氏县| 隆尧县| 洪雅县| 大英县| 苏州市| 师宗县| 淮滨县| 怀远县| 塘沽区| 观塘区| 太和县| 东乡| 新野县| 拜泉县| 清新县| 宜章县| 永济市| 天等县|