- Mastering Spring Boot 2.0
- Dinesh Rajput
- 168字
- 2021-06-25 21:29:20
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.
- 虛擬桌面移動辦公技術
- 新編Office 2016從入門到精通
- AutoCAD 2016中文版繪圖基礎傻瓜書
- 新編Excel 2010從入門到精通
- Excel 2016辦公應用從入門到精通
- OpenCV Computer Vision Application Programming Cookbook Second Edition
- 跟李銳學Excel數據分析
- Excel 2013從入門到精通
- Excel公式與函數大辭典
- 中文版AutoCAD 2016園林設計從入門到精通
- Office 2007中文版實用教程
- 征服Power BI:提升辦公數字化能力的45個實戰技巧
- Excel商務數據分析:思維、策略與方法
- AI智能辦公實戰108招:ChatGPT+Word+PowerPoint+WPS
- Office 2007案例教程