- 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.
- Word Excel PPT 2019 商務辦公全能一本通(全彩版)
- 新編電腦辦公(Windows 10 + Office 2010版)從入門到精通
- SAP ECC 5.0/6.0 總賬系統應用指南(第2版)
- Excel 2007函數與公式實戰技巧精粹
- 21天精通 Windows 7+Office 2010電腦辦公
- 天天用的Office一百招
- 跟李銳學Excel數據分析
- 非常Easy:Excel財務高效管理
- 從零開始學Arduino電子設計:創意案例版
- 別讓PPT拖后腿
- 零基礎入門Python游戲
- Excel經典教程:公式與函數
- 情感化PPT設計(微視頻版)
- Excel VBA案例實戰從入門到精通(視頻自學版)
- 如何高效辦公:Excel 2013經典應用技巧大全