cancel
Showing results for 
Search instead for 
Did you mean: 

FirstFoundationClient : authentication for admin failed

jmliege
Champ in-the-making
Champ in-the-making
Hello,

I've installed the 1.3 release.
The webclient seems to work properly.I've made the tutorial, and some minor customizations so far (just started during last week…)

So I wanted to test the sample code, then I ran almost directly into some trouble…

authenticationService.authenticate("admin","admin".toCharArray());

generates the following:

Exception in thread "main" org.alfresco.repo.security.authentication.AuthenticationException: Bad credentials presented
   at org.alfresco.repo.security.authentication.AuthenticationComponentImpl.authenticate(AuthenticationComponentImpl.java:69)
   at org.alfresco.repo.security.authentication.AuthenticationServiceImpl.authenticate(AuthenticationServiceImpl.java:104)
….
….
Caused by: net.sf.acegisecurity.BadCredentialsException: Bad credentials presented
   at net.sf.acegisecurity.providers.dao.DaoAuthenticationProvider.getUserFromBackend(DaoAuthenticationProvider.java:393)
   at net.sf.acegisecurity.providers.dao.DaoAuthenticationProvider.authenticate(DaoAuthenticationProvider.java:225)
   at net.sf.acegisecurity.providers.ProviderManager.doAuthentication(ProviderManager.java:159)
   at net.sf.acegisecurity.AbstractAuthenticationManager.authenticate(AbstractAuthenticationManager.java:49)
   at org.alfresco.repo.security.authentication.AuthenticationComponentImpl.authenticate(AuthenticationComponentImpl.java:63)
   … 23 more

I've checked other functions of the AuthenticationService.

authenticationService.authenticationExists("admin")  returns false…
authenticationService.getCurrentUserName() returns "System"…

I've also tried the authenticationService.createAuthentication("admin","admin".toCharArray()), but an Exception about a not supported feature has been throwed.

So I think something should be wrong at some point in my configuration, but where ???

FYI: I also test with an user that I created myself through the web-client, but it doesn't sound better…

I've also watch for information about net.sf.acegisecurity …but I'm still without a solution.

I was thinkin about the "admin" password argument not well translated and thus, the AuthenticationManager returns a "bad credentials".

But "admin" user is not even recognized (or has not yet been authenticated) as the "authenticationExists("admin")  returns false" should imply, I'm not sure about this suggestion.

Thanks for any help that can be provided.

Best regards,
Jean-Marc
1 REPLY 1

jmliege
Champ in-the-making
Champ in-the-making
After several attemps, and some searches throughout the forum, i find my solution at the following topic : http://forums.alfresco.com/viewtopic.php?t=2218

dschalmz said:
- stop tomcat
- remove the alfresco db (using db_remove.sql)
- create the aflresco db (using db_setup.sql)
- remove alf_data and subdirectories
- restart tomcat

In fact, i 'd already stopped my tomcat, and I only started mySQL.

The problems was the alf_data which were created at several places
(to say: alfresco/alf_data, and /samples/FirstFoundationClient/alf_data)

I drop the schema, than recreate it, and it works.

As far as I'm understanding, stored references (indexes) could have never match to a new alf_data folder especially if they 're not existing …

I might have change the dir.root value (of the repository.properties) to point on the valid and unique alf_data.

I will try this immediatly.

JM