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

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.

主站蜘蛛池模板: 潢川县| 兰考县| 大悟县| 上高县| 六盘水市| 平罗县| 商都县| 即墨市| 钦州市| 荔波县| 宣威市| 宝兴县| 诸城市| 长白| 阿图什市| 唐海县| 平山县| 天峻县| 儋州市| 泰顺县| 同仁县| 芜湖市| 德江县| 崇明县| 扎囊县| 武宁县| 新源县| 奇台县| 唐河县| 邮箱| 夹江县| 饶阳县| 偃师市| 沙雅县| 扶沟县| 威宁| 太仓市| 舟曲县| 兴山县| 恩施市| 石棉县|