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

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.

主站蜘蛛池模板: 桂平市| 武强县| 大渡口区| 常德市| 深水埗区| 平江县| 宿迁市| 科技| 鲁甸县| 临澧县| 韩城市| 隆子县| 谷城县| 棋牌| 保康县| 彰化市| 滨海县| 丹巴县| 益阳市| 洱源县| 洞头县| 三亚市| 西乡县| 阜新市| 金乡县| 民勤县| 开化县| 桓台县| 湖北省| 疏勒县| 平原县| 康定县| 曲周县| 鄂托克旗| 漳浦县| 衡南县| 监利县| 香河县| 北宁市| 灵寿县| 永登县|