0

Eureka with Spring Cloud Finchley.RC1 is using form based authentication which causes that the eureka clients cannot use the:

eureka:
  client:
    serviceUrl:
      defaultZone: http://user:password@localhost:8761/eureka

Any idea how to get back the original authentication mechanism used in Spring Cloud Egware.SR3?

Here I create a sample repo:

https://github.com/altfatterz/eureka

Zoltan Altfatter
  • 802
  • 2
  • 11
  • 25

1 Answers1

0

It is the same issue as this one: https://github.com/spring-cloud/spring-cloud-netflix/issues/2754

A workaroud suggested by Ryan Baxter is to disalbe csrf with

http.csrf().disable()

I got it working by including this WebSecurityConfig included in the eureka service.

@EnableWebSecurity
public class WebSecurityConfig extends WebSecurityConfigurerAdapter {

@Override
protected void configure(HttpSecurity http) throws Exception {
    http.csrf().disable()
            .authorizeRequests()
                .anyRequest().authenticated()
            .and()
                .httpBasic();
   }
}
Zoltan Altfatter
  • 802
  • 2
  • 11
  • 25