Unauthorized in spring boot admin

20,705

Setting management.security.enabled=false in the application.properties will disable the security on the endpoints.

Share:
20,705
Gireesh Bhat
Author by

Gireesh Bhat

Updated on November 08, 2020

Comments

  • Gireesh Bhat
    Gireesh Bhat over 3 years

    I wanted to control the microservices that are running in the Eureka server. I used spring-boot-admin for this, but I am getting the error on accessing the information about the Trace,Log etc...

    The error I am getting is

    Error: {"timestamp":1489052472862,"status":401,"error":"Unauthorized","message":"Full authentication is required to access this resource.","path":"/metrics"}

    My dependencies are

    <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-actuator</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-eureka</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>de.codecentric</groupId>
            <artifactId>spring-boot-admin-server</artifactId>
            <version>1.4.3</version>
        </dependency>
        <dependency>
            <groupId>de.codecentric</groupId>
            <artifactId>spring-boot-admin-server-ui</artifactId>
            <version>1.4.3</version>
        </dependency>
    

    and none of the below properties worked

    endpoints.info.id=information
    endpoints.info.sensitive=false
    endpoints.info.enabled=true
    information.app.name=Actuator Example
    information.app.description=Actuator Example
    information.app.version=1.0.0
    

    and the same thing is happening with all the end points like mappings, env and all accept health

  • LenglBoy
    LenglBoy over 5 years
    This application property is not available anymore on the newest spring-security version (2.1+). Just as information for current readers