Neoryder
Neoryder

Reputation: 897

Change Authentication of Eureka Client on JHipster

I am using JHipster.

I have 3 different Apps. JHipster Registry instance JHipster Gateway instance JHipster Microservice instance

Whenever I change the following I get a 401 during startup of the Gateway and Microservice instances.

Change the Eureka client config:

eureka:
    instance:
        prefer-ip-address: true
    client:
        enabled: true
        healthcheck:
            enabled: true
        registerWithEureka: true
        fetchRegistry: true
        serviceUrl:
            defaultZone: http://admin:admin@localhost:8761/eureka/

Change the Eureka Server Config

security:
    user:
        name: admin
        password: <better password>
        role: USER,ADMIN

changing admin:admin to admin:

Does anyone know what I am doing wrong?

Upvotes: 0

Views: 945

Answers (1)

David Steiman
David Steiman

Reputation: 3145

the JHipster Registry is a Spring Cloud Server as well. So when you change your password, you should also apply

spring:
  cloud:
    config:
      uri: http://admin:betterpass@localhost:8761/config

in your bootstrap-dev.yml (or bootstrap-prod, if you run this in production or in docker) of your client application, or by passing it via environment vars like

SPRING_CLOUD_CONFIG_URI=...

Upvotes: 2

Related Questions