Skip to content

Default user password logged even if AuthenticationManagerBuilder is configured #12872

@snicoll

Description

@snicoll

I have the following configuration (for a simple demo) using Spring Boot 2.0.1.RELEASE:

@Configuration
static class SecurityConfig extends GlobalAuthenticationConfigurerAdapter {

	@Override
	public void init(AuthenticationManagerBuilder auth) throws Exception {
		auth.inMemoryAuthentication()
				.withUser("hero").password("{noop}hero").roles("HERO", "USER").and()
				.withUser("user").password("{noop}user").roles("USER");
	}
	
}

The configuration works fine and my users are recognized but I can see the following in the logs:

Using generated security password: 01e94f0f-b575-46e1-96f6-f35f4027432a

Same with

@Configuration
static class SecurityConfig extends WebSecurityConfigurerAdapter {

	@Override
	protected void configure(AuthenticationManagerBuilder auth) throws Exception {
		auth.inMemoryAuthentication()
				.withUser("hero").password("{noop}hero").roles("HERO", "USER").and()
				.withUser("user").password("{noop}user").roles("USER");
	}

}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions