English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Solution to the Problem of No Permission for SpringBoot's Actuator Monitoring and Management Module

SpringBoot 1.5.9 After adding the actuator dependency in the version, access/Error occurs when reporting sensitive information such as beans, as follows

Tue Mar 07 21:18:57 GMT+08:00 2017
An unexpected error occurred (type=Unauthorized, status=401).
Full authentication is required to access this resource.

It must be a permission issue. There are two ways:

  1.Disable permissions: add configuration parameters to application.properties

management.security.enabled=false

2.Add permissions (not tested):

<dependency> 
 <groupId>org.springframework.boot</groupId> 
 <artifactId>spring-boot-starter-security</artifactId>
</dependency>

Configure permissions in the property

ID Description Sensitive (Sensitive)
autoconfig Display an auto-Configuration report, which shows all auto-Configuration candidates and the reasons why they are or are not applied by the application true
beans Display a complete list of all Spring Beans in the application true
configprops Display a list of all@ConfigurationProperties true
dump Perform a thread dump true
env Expose properties from Spring ConfigurableEnvironment true
health Show the health information of the application (when accessing with an unauthenticated connection, a simple 'status' is displayed, and when accessing with an authenticated connection, all detailed information is displayed) false
info Display arbitrary application information false
metrics Show the 'metrics' information of the current application true
mappings Display a list of all@RequestMapping paths true
shutdown Allow the application to shut down gracefully (disabled by default) true
trace Display trace information (default is the latest HTTP requests) true

Summary

The solutions to the problem of no permission for the SpringBoot monitoring management module actuator introduced by the editor are as follows. I hope it will be helpful to everyone. If you have any questions, please leave a message, and the editor will reply to everyone in time. I am also very grateful for everyone's support for the Naoan tutorial website!

Declaration: The content of this article is from the network, and the copyright belongs to the original author. The content is contributed and uploaded by Internet users spontaneously. This website does not own the copyright, does not undergo manual editing, and does not assume relevant legal liabilities. If you find any suspected copyright content, please send an email to: notice#oldtoolbag.com (Please replace # with @ when sending an email to report, and provide relevant evidence. Once verified, this site will immediately delete the infringing content.)

You May Also Like