Forums de discussion

[RESOLVED] Cannot login after installing Liferay Sync

Gustavo Campos, modifié il y a 11 années.

[RESOLVED] Cannot login after installing Liferay Sync

New Member Publications: 21 Date d'inscription: 12/10/12 Publications récentes
I have just downloaded and installed Liferay Sync and I'm trying to connect to my Liferay Portal 6.1.1 GA2.

Getting the following error message:
"Don't know how to bind Invalid authentication token into class com.liferay.sync.model.UserSite. You might need to use an ObjectFactory instead of a plain class."

And the following stack trace on the log file:
19 Fev 2013 08:10:24,234 ERROR [AccountSettingsCompositeHandler:470] [ values ]: Don't know how to bind Invalid authentication token into class com.liferay.sync.model.UserSite. You might need to use an ObjectFactory instead of a plain class.
flexjson.JSONException: [ values ]: Don't know how to bind Invalid authentication token into class com.liferay.sync.model.UserSite. You might need to use an ObjectFactory instead of a plain class.
at flexjson.ObjectBinder.bindPrimitive(ObjectBinder.java:323)
at flexjson.factories.ClassLocatorObjectFactory.instantiate(ClassLocatorObjectFactory.java:40)
at flexjson.ObjectBinder.bind(ObjectBinder.java:86)
at flexjson.ObjectBinder.bindIntoMap(ObjectBinder.java:117)
at flexjson.factories.MapObjectFactory.instantiate(MapObjectFactory.java:19)
at flexjson.ObjectBinder.bind(ObjectBinder.java:86)
at flexjson.ObjectBinder.bind(ObjectBinder.java:65)
at flexjson.JSONDeserializer.deserialize(JSONDeserializer.java:158)
at com.liferay.sync.gui.desktop.properties.util.UserSiteUtil.getUserSites(UserSiteUtil.java:122)
at com.liferay.sync.gui.desktop.properties.util.UserSiteUtil.getUserSites(UserSiteUtil.java:114)
at com.liferay.sync.gui.desktop.properties.accountsettings.AccountSettingsCompositeHandler._setUserSites(AccountSettingsCompositeHandler.java:610)
at com.liferay.sync.gui.desktop.properties.accountsettings.AccountSettingsCompositeHandler.doTestConnection(AccountSettingsCompositeHandler.java:451)
at com.liferay.sync.gui.desktop.properties.accountsettings.AccountSettingsCompositeHandler$1.run(AccountSettingsCompositeHandler.java:251)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

I wasn't able to find anything related here or in Google, did someone see this error before?

Thanks,
Gustavo
thumbnail
Dennis Ju, modifié il y a 11 années.

RE: Cannot login after installing Liferay Sync

Regular Member Publications: 228 Date d'inscription: 30/09/10 Publications récentes
Are you running behind a proxy? What do you get if you enter "http://localhost:8080/api/secure/jsonws/group/get-user-sites" into your web browser (replace localhost:8080 with your server)?
Gustavo Campos, modifié il y a 11 années.

RE: Cannot login after installing Liferay Sync

New Member Publications: 21 Date d'inscription: 12/10/12 Publications récentes
Hi Dennis,

I'm not behind a proxy, actually I did the test on my own machine and on our server (amazon ec2) with the same result.

I get the same message when pointing to http://localhost:8080/api/secure/jsonws/group/get-user-sites locally or using the Amazon server, tried Chrome and Firefox:
{"exception":"Invalid authentication token"}

Thanks.
thumbnail
Dennis Ju, modifié il y a 11 années.

RE: Cannot login after installing Liferay Sync

Regular Member Publications: 228 Date d'inscription: 30/09/10 Publications récentes
I couldn't reproduce the error on a fresh install of 6.1.1. Do you have any settings in your portal-ext.properties affecting authentication or any patches to your portal?
Gustavo Campos, modifié il y a 11 années.

RE: Cannot login after installing Liferay Sync

New Member Publications: 21 Date d'inscription: 12/10/12 Publications récentes
We don't have any patches applied, but we do have custom authentication and we are using JAAS.

Following is the config done in portal-ext.properties related to authentication.

company.security.auth.type=screenName
open.id.auth.enabled=false
auth.pipeline.pre=com.abs.absolute.portal.conf.ext.security.auth.ABSAuthenticator
auth.pipeline.enable.liferay.check=false
portal.jaas.enable=true
portal.jaas.impl=com.abs.absolute.portal.conf.ext.security.jaas.ABSLoginModule

I did put a breakpoint in these classes, they are called when I access my portal using the web browser but they aren't called when I use Sync.
thumbnail
Bruno Farache, modifié il y a 11 années.

RE: Cannot login after installing Liferay Sync

Liferay Master Publications: 603 Date d'inscription: 14/05/07 Publications récentes
Gustavo,

Sync requires Basic Authentication enabled in order to work. This authentication is done within SecureFilter.java. Your ABSAuthentication is probably intercepting the request before the portal has the chance to authenticate with Basic.
Gustavo Campos, modifié il y a 11 années.

RE: Cannot login after installing Liferay Sync

New Member Publications: 21 Date d'inscription: 12/10/12 Publications récentes
We are implementing com.liferay.portal.security.auth.Authenticator in the ABSAuthenticator class and doing basically the same that LDAPAuth does, but with our own password check.

I have tried to use it as a pre and post in the pipeline but it didn't work, is there anything that I can do to combine both Basic and custom authentication?

Thanks
thumbnail
Bruno Farache, modifié il y a 11 années.

RE: Cannot login after installing Liferay Sync

Liferay Master Publications: 603 Date d'inscription: 14/05/07 Publications récentes
Have you disabled your Authenticator so we can check that's the root cause?
Gustavo Campos, modifié il y a 11 années.

RE: Cannot login after installing Liferay Sync

New Member Publications: 21 Date d'inscription: 12/10/12 Publications récentes
I have just disabled it, and confirmed that it wasn't called because I had a breakpoint there, still doesn't work.
thumbnail
Bruno Farache, modifié il y a 11 années.

RE: Cannot login after installing Liferay Sync

Liferay Master Publications: 603 Date d'inscription: 14/05/07 Publications récentes
Have you also changed these properties to the following? (better to clean up portal-ext.properties to make sure it's using the default configuration)

auth.pipeline.enable.liferay.check=true
portal.jaas.enable=false

I noticed you must authenticate using screen name instead of email:

company.security.auth.type=screenName

You are testing with screen name, right? You could also change it to:

company.security.auth.type=emailAddress

And authenticate with the user email address to see if it works.
Gustavo Campos, modifié il y a 11 années.

RE: Cannot login after installing Liferay Sync

New Member Publications: 21 Date d'inscription: 12/10/12 Publications récentes
I was using the screen name.

Changing all the authentication properties to default values works.

Is there a feature request to make it work with JAAS ?

Thanks
thumbnail
Bruno Farache, modifié il y a 11 années.

RE: Cannot login after installing Liferay Sync

Liferay Master Publications: 603 Date d'inscription: 14/05/07 Publications récentes
I'm going to enable JAAS to see how we can fix it.

Can you make a last test? In com.liferay.portal.servlet.filters.secure.SecureFilter.java, if you remove this line, it may authenticate with Basic when JAAS is enabled:

if (!PropsValues.PORTAL_JAAS_ENABLE) {
Gustavo Campos, modifié il y a 11 années.

RE: Cannot login after installing Liferay Sync

New Member Publications: 21 Date d'inscription: 12/10/12 Publications récentes
It seems to work when I delete this line.

I was able to login with Sync and synchronize files, also my portal app seems to be working normally.
thumbnail
Bruno Farache, modifié il y a 11 années.

RE: Cannot login after installing Liferay Sync

Liferay Master Publications: 603 Date d'inscription: 14/05/07 Publications récentes
Cool, Gustavo, thanks for testing this out, we will commit a fix for that.
thumbnail
Bruno Farache, modifié il y a 11 années.

RE: Cannot login after installing Liferay Sync

Liferay Master Publications: 603 Date d'inscription: 14/05/07 Publications récentes
Gustavo, can you please let me know which application server are you using?
Gustavo Campos, modifié il y a 11 années.

RE: Cannot login after installing Liferay Sync

New Member Publications: 21 Date d'inscription: 12/10/12 Publications récentes
I'm using JBoss 7.1, I got the Liferay 6.1 CE GA2 with bundled JBoss.
thumbnail
Bruno Farache, modifié il y a 11 années.

RE: Cannot login after installing Liferay Sync (Réponse)

Liferay Master Publications: 603 Date d'inscription: 14/05/07 Publications récentes
Fixed by LPS-33461.
Gustavo Campos, modifié il y a 11 années.

RE: Cannot login after installing Liferay Sync

New Member Publications: 21 Date d'inscription: 12/10/12 Publications récentes
Thank you for the update.
thumbnail
Gabriel Leon Leyva, modifié il y a 11 années.

RE: Cannot login after installing Liferay Sync

Regular Member Publications: 243 Date d'inscription: 20/06/09 Publications récentes
Having the same problem on tomcat, liferay 6.1 GA2, liferay sync GA3 (last version)

Pièces jointes:

thumbnail
Gabriel Leon Leyva, modifié il y a 11 années.

RE: Cannot login after installing Liferay Sync (Réponse)

Regular Member Publications: 243 Date d'inscription: 20/06/09 Publications récentes
Fixed, had com.liferay.portal.servlet.filters.secure.SecureFilter=false on portal-ext.properties -emoticon