留言板

[RESOLVED] Cannot login after installing Liferay Sync

Gustavo Campos,修改在11 年前。

[RESOLVED] Cannot login after installing Liferay Sync

New Member 帖子: 21 加入日期: 12-10-12 最近的帖子
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,修改在11 年前。

RE: Cannot login after installing Liferay Sync

Regular Member 帖子: 228 加入日期: 10-9-30 最近的帖子
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,修改在11 年前。

RE: Cannot login after installing Liferay Sync

New Member 帖子: 21 加入日期: 12-10-12 最近的帖子
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,修改在11 年前。

RE: Cannot login after installing Liferay Sync

Regular Member 帖子: 228 加入日期: 10-9-30 最近的帖子
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,修改在11 年前。

RE: Cannot login after installing Liferay Sync

New Member 帖子: 21 加入日期: 12-10-12 最近的帖子
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,修改在11 年前。

RE: Cannot login after installing Liferay Sync

Liferay Master 帖子: 603 加入日期: 07-5-14 最近的帖子
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,修改在11 年前。

RE: Cannot login after installing Liferay Sync

New Member 帖子: 21 加入日期: 12-10-12 最近的帖子
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,修改在11 年前。

RE: Cannot login after installing Liferay Sync

Liferay Master 帖子: 603 加入日期: 07-5-14 最近的帖子
Have you disabled your Authenticator so we can check that's the root cause?
Gustavo Campos,修改在11 年前。

RE: Cannot login after installing Liferay Sync

New Member 帖子: 21 加入日期: 12-10-12 最近的帖子
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,修改在11 年前。

RE: Cannot login after installing Liferay Sync

Liferay Master 帖子: 603 加入日期: 07-5-14 最近的帖子
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,修改在11 年前。

RE: Cannot login after installing Liferay Sync

New Member 帖子: 21 加入日期: 12-10-12 最近的帖子
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,修改在11 年前。

RE: Cannot login after installing Liferay Sync

Liferay Master 帖子: 603 加入日期: 07-5-14 最近的帖子
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,修改在11 年前。

RE: Cannot login after installing Liferay Sync

New Member 帖子: 21 加入日期: 12-10-12 最近的帖子
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,修改在11 年前。

RE: Cannot login after installing Liferay Sync

Liferay Master 帖子: 603 加入日期: 07-5-14 最近的帖子
Cool, Gustavo, thanks for testing this out, we will commit a fix for that.
thumbnail
Bruno Farache,修改在11 年前。

RE: Cannot login after installing Liferay Sync

Liferay Master 帖子: 603 加入日期: 07-5-14 最近的帖子
Gustavo, can you please let me know which application server are you using?
Gustavo Campos,修改在11 年前。

RE: Cannot login after installing Liferay Sync

New Member 帖子: 21 加入日期: 12-10-12 最近的帖子
I'm using JBoss 7.1, I got the Liferay 6.1 CE GA2 with bundled JBoss.
thumbnail
Bruno Farache,修改在11 年前。

RE: Cannot login after installing Liferay Sync (答复)

Liferay Master 帖子: 603 加入日期: 07-5-14 最近的帖子
Fixed by LPS-33461.
Gustavo Campos,修改在11 年前。

RE: Cannot login after installing Liferay Sync

New Member 帖子: 21 加入日期: 12-10-12 最近的帖子
Thank you for the update.
thumbnail
Gabriel Leon Leyva,修改在10 年前。

RE: Cannot login after installing Liferay Sync

Regular Member 帖子: 243 加入日期: 09-6-20 最近的帖子
Having the same problem on tomcat, liferay 6.1 GA2, liferay sync GA3 (last version)
thumbnail
Gabriel Leon Leyva,修改在10 年前。

RE: Cannot login after installing Liferay Sync (答复)

Regular Member 帖子: 243 加入日期: 09-6-20 最近的帖子
Fixed, had com.liferay.portal.servlet.filters.secure.SecureFilter=false on portal-ext.properties -emoticon