How to fix Encoded password does not look like BCryptHow does PasswordEncoder get called in Spring Security?Security configuration with Spring-bootAuthentication failed: password does not match stored value in spring security 3.2Spring http security stop working after adding OAuth2Failed to send message to ExecutorSubscribableChannel[clientInboundChannel]Spring Security Thymleaf static resources don't loadSpring Boot 1.3.3., Spring Security basic custom configSpring boot security consider case insensitive username check for loginReturning bad credential in oauth2 implemention using spring boot 1.5Spring-Security 5 always 302

Why would guns not work in the dungeon?

Are unclear "take-it or leave-it" contracts interpreted in my favor?

What explains 9 speed cassettes price differences?

Why does my String turn into Integers instead of letters after I add characters with +?

When casting Eldritch Blast with the Agonizing Blast eldritch invocation, what do I add to my damage roll?

Does throwing a penny at a train stop the train?

Should I intentionally omit previous work experience when applying for jobs?

Setting MAC field to all-zero to indicate unencrypted data

references on the empirical study on the practice of OR

Flatten array with OPENJSON: OPENJSON on a value that may not be an array? [ [1] ], vs [1]

What is this welding tool I found in my attic?

Is Arc Length always irrational between two rational points?

Cops: The Hidden OEIS Substring

For a hashing function like MD5, how similar can two plaintext strings be and still generate the same hash?

How is angular momentum conserved for the orbiting body if the centripetal force disappears?

Why isn't there research to build a standard lunar, or Martian mobility platform?

Why do people keep referring to Leia as Princess Leia, even after the destruction of Alderaan?

How did the hit man miss?

When did the Roman Empire fall according to contemporaries?

Did any of the founding fathers anticipate Lysander Spooner's criticism of the constitution?

Matchmaker, Matchmaker, make me a match

Does Google Maps take into account hills/inclines for route times?

Keep milk (or milk alternative) for a day without a fridge

Is there any word for "disobedience to God"?



How to fix Encoded password does not look like BCrypt


How does PasswordEncoder get called in Spring Security?Security configuration with Spring-bootAuthentication failed: password does not match stored value in spring security 3.2Spring http security stop working after adding OAuth2Failed to send message to ExecutorSubscribableChannel[clientInboundChannel]Spring Security Thymleaf static resources don't loadSpring Boot 1.3.3., Spring Security basic custom configSpring boot security consider case insensitive username check for loginReturning bad credential in oauth2 implemention using spring boot 1.5Spring-Security 5 always 302






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















I have been all over stack overflow trying to find out why this issue is happening, but cannot find an answer.



This is my setup:



SecurityConfig



@Autowired
private IUserService userService;

@Override
public void configure(final AuthenticationManagerBuilder auth) throws Exception
auth.userDetailsService(userService).passwordEncoder(passwordEncoder());


@Override
protected void configure(final HttpSecurity http) throws Exception
// @formatter:off
http.
authorizeRequests().
antMatchers("/api/**"). // if you want a more explicit mapping here
//anyRequest().
// authenticated().antMatchers("/api/users/**").
permitAll().

and().
httpBasic().
and().
sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS).
and().csrf().disable();
// @formatter:on


@Bean
public PasswordEncoder passwordEncoder()
PasswordEncoder encoder = new BCryptPasswordEncoder();
return encoder;



UserService create method:



@Override
public User create(User u)
User newUser = new User();
newUser.setUsername(u.getUsername());
newUser.setEmail(u.getEmail());
newUser.setPhoneNum(u.getPhoneNum());
newUser.setPassword(passwordEncoder.encode(u.getPassword()));

// Add default roles
Role userRole = roleService.findByName("ROLE_USER");
newUser.setRoles(Sets.<Role>newHashSet(userRole));
dao.save(newUser);
return newUser;



Note that User implements UserDetails and IUserService implements UserDetailsService.



Based on other articles here is some more information:



I'm not trying to do OAUTH so please don't recommend that i also encode the client secret



I checked my database, its a VARCHAR(68), so I believe there is enough room to store the encoded password.



The database does indeed store the encoded password (i looked and its not plain text)



Here is some DEBUG logs from a request that gets denied:



DEBUG o.s.s.w.a.w.BasicAuthenticationFilter - Basic Authentication Authorization header found for user 'wowz'
23:17:57.187 [http-nio-8082-exec-8] DEBUG o.s.s.authentication.ProviderManager - Authentication attempt using org.springframework.security.authentication.dao.DaoAuthenticationProvider
23:17:57.471 [http-nio-8082-exec-8] WARN o.s.s.c.bcrypt.BCryptPasswordEncoder - Encoded password does not look like BCrypt
23:17:57.472 [http-nio-8082-exec-8] DEBUG o.s.s.a.d.DaoAuthenticationProvider - Authentication failed: password does not match stored value
23:17:57.472 [http-nio-8082-exec-8] DEBUG o.s.s.w.a.w.BasicAuthenticationFilter - Authentication request for failed: org.springframework.security.authentication.BadCredentialsException: Bad credentials
23:17:57.472 [http-nio-8082-exec-8] DEBUG o.s.s.w.a.DelegatingAuthenticationEntryPoint - Trying to match using RequestHeaderRequestMatcher [expectedHeaderName=X-Requested-With, expectedHeaderValue=XMLHttpRequest]
23:17:57.473 [http-nio-8082-exec-8] DEBUG o.s.s.w.a.DelegatingAuthenticationEntryPoint - No match found. Using default entry point org.springframework.security.web.authentication.www.BasicAuthenticationEntryPoint@42da9490
23:17:57.473 [http-nio-8082-exec-8] DEBUG o.s.s.w.h.writers.HstsHeaderWriter - Not injecting HSTS header since it did not match the requestMatcher org.springframework.security.web.header.writers.HstsHeaderWriter$SecureRequestMatcher@115f4872
23:17:57.473 [http-nio-8082-exec-8] DEBUG o.s.s.w.c.SecurityContextPersistenceFilter - SecurityContextHolder now cleared, as request processing completed


Also note that this is security for a REST API, not a MVC application










share|improve this question






















  • I think, you should try to put few break points & see whats going on , esp. in method - BCryptPasswordEncoder.matches(...). I see that this method is being called from DaoAuthenticationProvider

    – Sabir Khan
    Mar 26 at 12:53












  • Show your encoded password from database.

    – dur
    Mar 26 at 20:08











  • $2a$10$6oT6Gilx3X0juhBdM5JFm.WgC2GFdsqniP8S2Z1iIUZBioYkKfSfi

    – yasgur99
    Mar 26 at 22:19











  • based on what you say it doesn't look like bcrypt?

    – ValerioMC
    Mar 27 at 14:23












  • @ValerioMC what makes you say that. it definitely starts with $2a$ which is most definitely bcrypt type

    – yasgur99
    Mar 27 at 18:30

















0















I have been all over stack overflow trying to find out why this issue is happening, but cannot find an answer.



This is my setup:



SecurityConfig



@Autowired
private IUserService userService;

@Override
public void configure(final AuthenticationManagerBuilder auth) throws Exception
auth.userDetailsService(userService).passwordEncoder(passwordEncoder());


@Override
protected void configure(final HttpSecurity http) throws Exception
// @formatter:off
http.
authorizeRequests().
antMatchers("/api/**"). // if you want a more explicit mapping here
//anyRequest().
// authenticated().antMatchers("/api/users/**").
permitAll().

and().
httpBasic().
and().
sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS).
and().csrf().disable();
// @formatter:on


@Bean
public PasswordEncoder passwordEncoder()
PasswordEncoder encoder = new BCryptPasswordEncoder();
return encoder;



UserService create method:



@Override
public User create(User u)
User newUser = new User();
newUser.setUsername(u.getUsername());
newUser.setEmail(u.getEmail());
newUser.setPhoneNum(u.getPhoneNum());
newUser.setPassword(passwordEncoder.encode(u.getPassword()));

// Add default roles
Role userRole = roleService.findByName("ROLE_USER");
newUser.setRoles(Sets.<Role>newHashSet(userRole));
dao.save(newUser);
return newUser;



Note that User implements UserDetails and IUserService implements UserDetailsService.



Based on other articles here is some more information:



I'm not trying to do OAUTH so please don't recommend that i also encode the client secret



I checked my database, its a VARCHAR(68), so I believe there is enough room to store the encoded password.



The database does indeed store the encoded password (i looked and its not plain text)



Here is some DEBUG logs from a request that gets denied:



DEBUG o.s.s.w.a.w.BasicAuthenticationFilter - Basic Authentication Authorization header found for user 'wowz'
23:17:57.187 [http-nio-8082-exec-8] DEBUG o.s.s.authentication.ProviderManager - Authentication attempt using org.springframework.security.authentication.dao.DaoAuthenticationProvider
23:17:57.471 [http-nio-8082-exec-8] WARN o.s.s.c.bcrypt.BCryptPasswordEncoder - Encoded password does not look like BCrypt
23:17:57.472 [http-nio-8082-exec-8] DEBUG o.s.s.a.d.DaoAuthenticationProvider - Authentication failed: password does not match stored value
23:17:57.472 [http-nio-8082-exec-8] DEBUG o.s.s.w.a.w.BasicAuthenticationFilter - Authentication request for failed: org.springframework.security.authentication.BadCredentialsException: Bad credentials
23:17:57.472 [http-nio-8082-exec-8] DEBUG o.s.s.w.a.DelegatingAuthenticationEntryPoint - Trying to match using RequestHeaderRequestMatcher [expectedHeaderName=X-Requested-With, expectedHeaderValue=XMLHttpRequest]
23:17:57.473 [http-nio-8082-exec-8] DEBUG o.s.s.w.a.DelegatingAuthenticationEntryPoint - No match found. Using default entry point org.springframework.security.web.authentication.www.BasicAuthenticationEntryPoint@42da9490
23:17:57.473 [http-nio-8082-exec-8] DEBUG o.s.s.w.h.writers.HstsHeaderWriter - Not injecting HSTS header since it did not match the requestMatcher org.springframework.security.web.header.writers.HstsHeaderWriter$SecureRequestMatcher@115f4872
23:17:57.473 [http-nio-8082-exec-8] DEBUG o.s.s.w.c.SecurityContextPersistenceFilter - SecurityContextHolder now cleared, as request processing completed


Also note that this is security for a REST API, not a MVC application










share|improve this question






















  • I think, you should try to put few break points & see whats going on , esp. in method - BCryptPasswordEncoder.matches(...). I see that this method is being called from DaoAuthenticationProvider

    – Sabir Khan
    Mar 26 at 12:53












  • Show your encoded password from database.

    – dur
    Mar 26 at 20:08











  • $2a$10$6oT6Gilx3X0juhBdM5JFm.WgC2GFdsqniP8S2Z1iIUZBioYkKfSfi

    – yasgur99
    Mar 26 at 22:19











  • based on what you say it doesn't look like bcrypt?

    – ValerioMC
    Mar 27 at 14:23












  • @ValerioMC what makes you say that. it definitely starts with $2a$ which is most definitely bcrypt type

    – yasgur99
    Mar 27 at 18:30













0












0








0








I have been all over stack overflow trying to find out why this issue is happening, but cannot find an answer.



This is my setup:



SecurityConfig



@Autowired
private IUserService userService;

@Override
public void configure(final AuthenticationManagerBuilder auth) throws Exception
auth.userDetailsService(userService).passwordEncoder(passwordEncoder());


@Override
protected void configure(final HttpSecurity http) throws Exception
// @formatter:off
http.
authorizeRequests().
antMatchers("/api/**"). // if you want a more explicit mapping here
//anyRequest().
// authenticated().antMatchers("/api/users/**").
permitAll().

and().
httpBasic().
and().
sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS).
and().csrf().disable();
// @formatter:on


@Bean
public PasswordEncoder passwordEncoder()
PasswordEncoder encoder = new BCryptPasswordEncoder();
return encoder;



UserService create method:



@Override
public User create(User u)
User newUser = new User();
newUser.setUsername(u.getUsername());
newUser.setEmail(u.getEmail());
newUser.setPhoneNum(u.getPhoneNum());
newUser.setPassword(passwordEncoder.encode(u.getPassword()));

// Add default roles
Role userRole = roleService.findByName("ROLE_USER");
newUser.setRoles(Sets.<Role>newHashSet(userRole));
dao.save(newUser);
return newUser;



Note that User implements UserDetails and IUserService implements UserDetailsService.



Based on other articles here is some more information:



I'm not trying to do OAUTH so please don't recommend that i also encode the client secret



I checked my database, its a VARCHAR(68), so I believe there is enough room to store the encoded password.



The database does indeed store the encoded password (i looked and its not plain text)



Here is some DEBUG logs from a request that gets denied:



DEBUG o.s.s.w.a.w.BasicAuthenticationFilter - Basic Authentication Authorization header found for user 'wowz'
23:17:57.187 [http-nio-8082-exec-8] DEBUG o.s.s.authentication.ProviderManager - Authentication attempt using org.springframework.security.authentication.dao.DaoAuthenticationProvider
23:17:57.471 [http-nio-8082-exec-8] WARN o.s.s.c.bcrypt.BCryptPasswordEncoder - Encoded password does not look like BCrypt
23:17:57.472 [http-nio-8082-exec-8] DEBUG o.s.s.a.d.DaoAuthenticationProvider - Authentication failed: password does not match stored value
23:17:57.472 [http-nio-8082-exec-8] DEBUG o.s.s.w.a.w.BasicAuthenticationFilter - Authentication request for failed: org.springframework.security.authentication.BadCredentialsException: Bad credentials
23:17:57.472 [http-nio-8082-exec-8] DEBUG o.s.s.w.a.DelegatingAuthenticationEntryPoint - Trying to match using RequestHeaderRequestMatcher [expectedHeaderName=X-Requested-With, expectedHeaderValue=XMLHttpRequest]
23:17:57.473 [http-nio-8082-exec-8] DEBUG o.s.s.w.a.DelegatingAuthenticationEntryPoint - No match found. Using default entry point org.springframework.security.web.authentication.www.BasicAuthenticationEntryPoint@42da9490
23:17:57.473 [http-nio-8082-exec-8] DEBUG o.s.s.w.h.writers.HstsHeaderWriter - Not injecting HSTS header since it did not match the requestMatcher org.springframework.security.web.header.writers.HstsHeaderWriter$SecureRequestMatcher@115f4872
23:17:57.473 [http-nio-8082-exec-8] DEBUG o.s.s.w.c.SecurityContextPersistenceFilter - SecurityContextHolder now cleared, as request processing completed


Also note that this is security for a REST API, not a MVC application










share|improve this question














I have been all over stack overflow trying to find out why this issue is happening, but cannot find an answer.



This is my setup:



SecurityConfig



@Autowired
private IUserService userService;

@Override
public void configure(final AuthenticationManagerBuilder auth) throws Exception
auth.userDetailsService(userService).passwordEncoder(passwordEncoder());


@Override
protected void configure(final HttpSecurity http) throws Exception
// @formatter:off
http.
authorizeRequests().
antMatchers("/api/**"). // if you want a more explicit mapping here
//anyRequest().
// authenticated().antMatchers("/api/users/**").
permitAll().

and().
httpBasic().
and().
sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS).
and().csrf().disable();
// @formatter:on


@Bean
public PasswordEncoder passwordEncoder()
PasswordEncoder encoder = new BCryptPasswordEncoder();
return encoder;



UserService create method:



@Override
public User create(User u)
User newUser = new User();
newUser.setUsername(u.getUsername());
newUser.setEmail(u.getEmail());
newUser.setPhoneNum(u.getPhoneNum());
newUser.setPassword(passwordEncoder.encode(u.getPassword()));

// Add default roles
Role userRole = roleService.findByName("ROLE_USER");
newUser.setRoles(Sets.<Role>newHashSet(userRole));
dao.save(newUser);
return newUser;



Note that User implements UserDetails and IUserService implements UserDetailsService.



Based on other articles here is some more information:



I'm not trying to do OAUTH so please don't recommend that i also encode the client secret



I checked my database, its a VARCHAR(68), so I believe there is enough room to store the encoded password.



The database does indeed store the encoded password (i looked and its not plain text)



Here is some DEBUG logs from a request that gets denied:



DEBUG o.s.s.w.a.w.BasicAuthenticationFilter - Basic Authentication Authorization header found for user 'wowz'
23:17:57.187 [http-nio-8082-exec-8] DEBUG o.s.s.authentication.ProviderManager - Authentication attempt using org.springframework.security.authentication.dao.DaoAuthenticationProvider
23:17:57.471 [http-nio-8082-exec-8] WARN o.s.s.c.bcrypt.BCryptPasswordEncoder - Encoded password does not look like BCrypt
23:17:57.472 [http-nio-8082-exec-8] DEBUG o.s.s.a.d.DaoAuthenticationProvider - Authentication failed: password does not match stored value
23:17:57.472 [http-nio-8082-exec-8] DEBUG o.s.s.w.a.w.BasicAuthenticationFilter - Authentication request for failed: org.springframework.security.authentication.BadCredentialsException: Bad credentials
23:17:57.472 [http-nio-8082-exec-8] DEBUG o.s.s.w.a.DelegatingAuthenticationEntryPoint - Trying to match using RequestHeaderRequestMatcher [expectedHeaderName=X-Requested-With, expectedHeaderValue=XMLHttpRequest]
23:17:57.473 [http-nio-8082-exec-8] DEBUG o.s.s.w.a.DelegatingAuthenticationEntryPoint - No match found. Using default entry point org.springframework.security.web.authentication.www.BasicAuthenticationEntryPoint@42da9490
23:17:57.473 [http-nio-8082-exec-8] DEBUG o.s.s.w.h.writers.HstsHeaderWriter - Not injecting HSTS header since it did not match the requestMatcher org.springframework.security.web.header.writers.HstsHeaderWriter$SecureRequestMatcher@115f4872
23:17:57.473 [http-nio-8082-exec-8] DEBUG o.s.s.w.c.SecurityContextPersistenceFilter - SecurityContextHolder now cleared, as request processing completed


Also note that this is security for a REST API, not a MVC application







spring spring-security spring-rest






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 26 at 3:27









yasgur99yasgur99

1392 silver badges16 bronze badges




1392 silver badges16 bronze badges












  • I think, you should try to put few break points & see whats going on , esp. in method - BCryptPasswordEncoder.matches(...). I see that this method is being called from DaoAuthenticationProvider

    – Sabir Khan
    Mar 26 at 12:53












  • Show your encoded password from database.

    – dur
    Mar 26 at 20:08











  • $2a$10$6oT6Gilx3X0juhBdM5JFm.WgC2GFdsqniP8S2Z1iIUZBioYkKfSfi

    – yasgur99
    Mar 26 at 22:19











  • based on what you say it doesn't look like bcrypt?

    – ValerioMC
    Mar 27 at 14:23












  • @ValerioMC what makes you say that. it definitely starts with $2a$ which is most definitely bcrypt type

    – yasgur99
    Mar 27 at 18:30

















  • I think, you should try to put few break points & see whats going on , esp. in method - BCryptPasswordEncoder.matches(...). I see that this method is being called from DaoAuthenticationProvider

    – Sabir Khan
    Mar 26 at 12:53












  • Show your encoded password from database.

    – dur
    Mar 26 at 20:08











  • $2a$10$6oT6Gilx3X0juhBdM5JFm.WgC2GFdsqniP8S2Z1iIUZBioYkKfSfi

    – yasgur99
    Mar 26 at 22:19











  • based on what you say it doesn't look like bcrypt?

    – ValerioMC
    Mar 27 at 14:23












  • @ValerioMC what makes you say that. it definitely starts with $2a$ which is most definitely bcrypt type

    – yasgur99
    Mar 27 at 18:30
















I think, you should try to put few break points & see whats going on , esp. in method - BCryptPasswordEncoder.matches(...). I see that this method is being called from DaoAuthenticationProvider

– Sabir Khan
Mar 26 at 12:53






I think, you should try to put few break points & see whats going on , esp. in method - BCryptPasswordEncoder.matches(...). I see that this method is being called from DaoAuthenticationProvider

– Sabir Khan
Mar 26 at 12:53














Show your encoded password from database.

– dur
Mar 26 at 20:08





Show your encoded password from database.

– dur
Mar 26 at 20:08













$2a$10$6oT6Gilx3X0juhBdM5JFm.WgC2GFdsqniP8S2Z1iIUZBioYkKfSfi

– yasgur99
Mar 26 at 22:19





$2a$10$6oT6Gilx3X0juhBdM5JFm.WgC2GFdsqniP8S2Z1iIUZBioYkKfSfi

– yasgur99
Mar 26 at 22:19













based on what you say it doesn't look like bcrypt?

– ValerioMC
Mar 27 at 14:23






based on what you say it doesn't look like bcrypt?

– ValerioMC
Mar 27 at 14:23














@ValerioMC what makes you say that. it definitely starts with $2a$ which is most definitely bcrypt type

– yasgur99
Mar 27 at 18:30





@ValerioMC what makes you say that. it definitely starts with $2a$ which is most definitely bcrypt type

– yasgur99
Mar 27 at 18:30












1 Answer
1






active

oldest

votes


















0














The best way to identify this problem "Encoded password does not look like BCrypt" is setup a break porint in class org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder. And then check the root cause for the warnning.



if (!BCRYPT_PATTERN.matcher(encodedPassword).matches()) 
logger.warn("Encoded password does not look like BCrypt");
return false;






share|improve this answer






















    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55349441%2fhow-to-fix-encoded-password-does-not-look-like-bcrypt%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    The best way to identify this problem "Encoded password does not look like BCrypt" is setup a break porint in class org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder. And then check the root cause for the warnning.



    if (!BCRYPT_PATTERN.matcher(encodedPassword).matches()) 
    logger.warn("Encoded password does not look like BCrypt");
    return false;






    share|improve this answer



























      0














      The best way to identify this problem "Encoded password does not look like BCrypt" is setup a break porint in class org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder. And then check the root cause for the warnning.



      if (!BCRYPT_PATTERN.matcher(encodedPassword).matches()) 
      logger.warn("Encoded password does not look like BCrypt");
      return false;






      share|improve this answer

























        0












        0








        0







        The best way to identify this problem "Encoded password does not look like BCrypt" is setup a break porint in class org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder. And then check the root cause for the warnning.



        if (!BCRYPT_PATTERN.matcher(encodedPassword).matches()) 
        logger.warn("Encoded password does not look like BCrypt");
        return false;






        share|improve this answer













        The best way to identify this problem "Encoded password does not look like BCrypt" is setup a break porint in class org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder. And then check the root cause for the warnning.



        if (!BCRYPT_PATTERN.matcher(encodedPassword).matches()) 
        logger.warn("Encoded password does not look like BCrypt");
        return false;







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 28 at 9:41









        Lin ChenLin Chen

        251 silver badge9 bronze badges




        251 silver badge9 bronze badges


















            Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.







            Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.



















            draft saved

            draft discarded
















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55349441%2fhow-to-fix-encoded-password-does-not-look-like-bcrypt%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

            Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

            Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript