Foros de discusión

[RESOLVED] Cannot login after installing Liferay Sync

Gustavo Campos, modificado hace 11 años.

[RESOLVED] Cannot login after installing Liferay Sync

New Member Mensajes: 21 Fecha de incorporación: 12/10/12 Mensajes recientes
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, modificado hace 11 años.

RE: Cannot login after installing Liferay Sync

Regular Member Mensajes: 228 Fecha de incorporación: 30/09/10 Mensajes recientes
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, modificado hace 11 años.

RE: Cannot login after installing Liferay Sync

New Member Mensajes: 21 Fecha de incorporación: 12/10/12 Mensajes recientes
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, modificado hace 11 años.

RE: Cannot login after installing Liferay Sync

Regular Member Mensajes: 228 Fecha de incorporación: 30/09/10 Mensajes recientes
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, modificado hace 11 años.

RE: Cannot login after installing Liferay Sync

New Member Mensajes: 21 Fecha de incorporación: 12/10/12 Mensajes recientes
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, modificado hace 11 años.

RE: Cannot login after installing Liferay Sync

Liferay Master Mensajes: 603 Fecha de incorporación: 14/05/07 Mensajes recientes
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, modificado hace 11 años.

RE: Cannot login after installing Liferay Sync

New Member Mensajes: 21 Fecha de incorporación: 12/10/12 Mensajes recientes
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, modificado hace 11 años.

RE: Cannot login after installing Liferay Sync

Liferay Master Mensajes: 603 Fecha de incorporación: 14/05/07 Mensajes recientes
Have you disabled your Authenticator so we can check that's the root cause?
Gustavo Campos, modificado hace 11 años.

RE: Cannot login after installing Liferay Sync

New Member Mensajes: 21 Fecha de incorporación: 12/10/12 Mensajes recientes
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, modificado hace 11 años.

RE: Cannot login after installing Liferay Sync

Liferay Master Mensajes: 603 Fecha de incorporación: 14/05/07 Mensajes recientes
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, modificado hace 11 años.

RE: Cannot login after installing Liferay Sync

New Member Mensajes: 21 Fecha de incorporación: 12/10/12 Mensajes recientes
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, modificado hace 11 años.

RE: Cannot login after installing Liferay Sync

Liferay Master Mensajes: 603 Fecha de incorporación: 14/05/07 Mensajes recientes
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, modificado hace 11 años.

RE: Cannot login after installing Liferay Sync

New Member Mensajes: 21 Fecha de incorporación: 12/10/12 Mensajes recientes
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, modificado hace 11 años.

RE: Cannot login after installing Liferay Sync

Liferay Master Mensajes: 603 Fecha de incorporación: 14/05/07 Mensajes recientes
Cool, Gustavo, thanks for testing this out, we will commit a fix for that.
thumbnail
Bruno Farache, modificado hace 11 años.

RE: Cannot login after installing Liferay Sync

Liferay Master Mensajes: 603 Fecha de incorporación: 14/05/07 Mensajes recientes
Gustavo, can you please let me know which application server are you using?
Gustavo Campos, modificado hace 11 años.

RE: Cannot login after installing Liferay Sync

New Member Mensajes: 21 Fecha de incorporación: 12/10/12 Mensajes recientes
I'm using JBoss 7.1, I got the Liferay 6.1 CE GA2 with bundled JBoss.
thumbnail
Bruno Farache, modificado hace 11 años.

RE: Cannot login after installing Liferay Sync (Respuesta)

Liferay Master Mensajes: 603 Fecha de incorporación: 14/05/07 Mensajes recientes
Fixed by LPS-33461.
Gustavo Campos, modificado hace 11 años.

RE: Cannot login after installing Liferay Sync

New Member Mensajes: 21 Fecha de incorporación: 12/10/12 Mensajes recientes
Thank you for the update.
thumbnail
Gabriel Leon Leyva, modificado hace 10 años.

RE: Cannot login after installing Liferay Sync

Regular Member Mensajes: 243 Fecha de incorporación: 20/06/09 Mensajes recientes
Having the same problem on tomcat, liferay 6.1 GA2, liferay sync GA3 (last version)

Archivos adjuntos:

thumbnail
Gabriel Leon Leyva, modificado hace 10 años.

RE: Cannot login after installing Liferay Sync (Respuesta)

Regular Member Mensajes: 243 Fecha de incorporación: 20/06/09 Mensajes recientes
Fixed, had com.liferay.portal.servlet.filters.secure.SecureFilter=false on portal-ext.properties -emoticon