cancel
Showing results for 
Search instead for 
Did you mean: 

Alfresco portlets

unknown-user
Champ on-the-rise
Champ on-the-rise
I have deployed alfresco in liferay. When i try to use my spaces portelt i get the following error:
java.lang.IllegalArgumentException - All user details are mandatory!
  
org.alfresco.web.bean.repository.User.(User.java:70)
org.alfresco.web.scripts.portlet.WebClientPortletAuthenticator.createWebClientUser(WebClientPortletAuthenticator.java:140)
org.alfresco.web.scripts.portlet.WebClientPortletAuthenticator.authenticate(WebClientPortletAuthenticator.java:114)
org.alfresco.web.scripts.portlet.WebScriptPortlet$WebScriptPortalRuntime.authenticate(WebScriptPortlet.java:263)
org.alfresco.web.scripts.WebScriptRuntime.authenticatedExecute(WebScriptRuntime.java:294)
I have taken alfresco from svn one mont ago and i have implemented ldap sso with cas between liferay and alfresco.
Any help would be appreciated
18 REPLIES 18

jonas
Champ in-the-making
Champ in-the-making
Hi,

The package in liferay.cignex.com is Liferay Enterprise Portal 4.3.0 (Bundled with Tomcat 6.0), not JBoss Bundle. Thus the package includes a standalone application.

If you want to test it locally, please follow read-me as follows.

at http://liferay.cignex.com/CIGNEX_Liferay_43-Tomcat60-Alfresco_21-SSO-LDAP-readme.txt

——————
A solution of SSO plus LDAP for Liferay Portal 4.3 and Alfresco Portlet 2.1.

1. First please download an example Liferay Portal 4.3, Alfresco Portlet 2.1, LDAP (ADS) and SSO CAS.

CIGNEX_Liferay_43-Tomcat60-Alfresco_21-SSO-LDAP.zip

Download from (save link as …)

http://liferay.cignex.com

unzip it in your local machine. (It should be tomcat60/*)

download portal-mysql-43.sql at http://liferay.cignex.com/portal-mysql-43.sql

Note: It is tomcat 6.0.13, jdk 1.6.* is required.

2. Then create database (this is configurable) MySQL

for Liferay Portal 4.3
create database liferay43plet;
grant all on liferay43plet.* to 'liferay43plet'@'localhost' identified by 'liferay43plet' with grant option;
grant all on liferay43plet.* to 'liferay43plet'@'localhost.localdomain' identified by 'liferay43plet' with grant option;

input data
mysql -u liferay43plet -pliferay43plet liferay43plet < portal-mysql-43.sql

for Alfresco Portlet
create database alfresco21plet;
grant all on alfresco21plet.* to 'alfresco21plet'@'localhost' identified by 'alfresco21plet' with grant option;
grant all on alfresco21plet.* to 'alfresco21plet'@'localhost.localdomain' identified by 'alfresco21plet' with grant option;

3. Start your AS from unzipped file
tomcat60/bin/startup.bat or sh startup.sh

Go to http://localhost:8080/c/portal/login

4. In CAS login page (https://docs.cignex.com/cas-web), login

possible users in LDAP server (docs.cignex.com) (configurable)
jonas/jonas
jane/jane



For the first time you login, you are required to sign on for agreement in Liferay Portal.

Furthermore, just add content "Alfresco Ext 2.1 Client";

using email/password

jonas@liferay.com / jonas
jane@liferay.com / jane

….

After login in CAS, you should be in Liferay Portal with your login name. No need re-login in Liferay Portal.

Add Alfresco Ext 2.1 Client. You should be in Alfresco Portlet with your login name. No need re-login in Alfresco Portlet.

Get it? 

Good luck.  

—————————-

tobias_amon
Champ in-the-making
Champ in-the-making
Hi,

Yes I know that its bundled wit Tomcat. But it didn't work for me. As I need an EJB-container I have to work with JBoss.

The message I get from Alfresco (log):
com.cignex.portal.web.app.portlet.ExtAlfrescoFacesPortlet  - Auto Login User ID = null

Why is the User ID null?
Is it because the user I entered is not available inside Alfresco? (->jonas/jonas)
Or is it because I use my own CAS-Server?

jonas
Champ in-the-making
Champ in-the-making
Hi

I just tested the above one. It works well in my local machine.

By the way, the above one is also tested successfully by a lot of forums' users.

There are instructions for Do-It-Yourselfers at liferay.cignex.com (for tomcat bundle only).

You should use CAS SSO server at docs.cignex.com, where CAS SSO server associating with an LDAP directory, not from CAS official web site.  

Good luck!

tobias_amon
Champ in-the-making
Champ in-the-making
Hi,

I managed authentication with my own CAS. Therefore I modified some classes.

As I need a custom cas-server (to be able to use card/certificate-based authentication) your cas is not working for me.

But thanks for your help

apoorvdurga
Champ in-the-making
Champ in-the-making
Hi Jonas,

Thanks for an excellent solution.

However, i want to run it with my own CAS and OpenLDAP. DO you have any tips on where all to make changes for both alfresco and liferay?

ALso is it necessary to use an LDAP? Can't i just use CAS + database with liferay and alfresco?

thanks for your help,
/a

jonas
Champ in-the-making
Champ in-the-making
Hi,

The solution is generic for any LDAP Server. You can use ADS (Active Directory Server), ADS (Apache Directory Server), OpenLDAP, ect. For using OpenLDAP, you just replace ADS configuration in SSO CAS, Liferay and Alfresco with OpenLDAP configuration, pointing LDAP connection to your OpenLDAP server and setting parameters according to your OpenLDAP server context.

Surely, SSO CAS server, Alfresco and Liferay can be configured with JDBC source (database) separately. In this case, we need at least three databases (by MySQL, for example). Since these three databases are separated (physically or logically) - they have different database schema, the same user’ info has to be duplicated in these three databases. For example, if there was a user account “jonas/jonasâ€

apoorvdurga
Champ in-the-making
Champ in-the-making
Hi,

The solution is generic for any LDAP Server. You can use ADS (Active Directory Server), ADS (Apache Directory Server), OpenLDAP, ect. For using OpenLDAP, you just replace ADS configuration in SSO CAS, Liferay and Alfresco with OpenLDAP configuration, pointing LDAP connection to your OpenLDAP server and setting parameters according to your OpenLDAP server context.

Jonas thanks for your inputs. Much appreciated.

However, i have tried all the downloads from liferay.cignex.com  and none of them seem to work for me. I have managed to configure LAP + CAS with Liferay (SSO1) and LDAP + CAS with Alfresco (SSO2) separately. But, i am unable to do sso1 + sso2. Basically i can login to liferay via CAS but when i click on alfresco, it again throws the CAS login page. I guess this is because you are using a couple of filters and jars and i'm not clear about them.

Thanks for any inputs.

Best regards,
Apoorv

jonas
Champ in-the-making
Champ in-the-making
Hi Apoorv,

I just tested the following one. It works well in my local machine.

——————————
A solution of SSO plus LDAP for Liferay Portal 4.3 and Alfresco Portlet 2.1.

1. First please download an example Liferay Portal 4.3, Alfresco Portlet 2.1, LDAP (ADS) and SSO CAS.

CIGNEX_Liferay_43-Tomcat60-Alfresco_21-SSO-LDAP.zip

Download from (save link as …)

http://liferay.cignex.com

unzip it in your local machine. (It should be tomcat60/*)

download portal-mysql-43.sql at http://liferay.cignex.com/portal-mysql-43.sql

Note: It is tomcat 6.0.13, jdk 1.6.* is required.

2. Then create database (this is configurable) MySQL

for Liferay Portal 4.3
create database liferay43plet;
grant all on liferay43plet.* to 'liferay43plet'@'localhost' identified by 'liferay43plet' with grant option;
grant all on liferay43plet.* to 'liferay43plet'@'localhost.localdomain' identified by 'liferay43plet' with grant option;

input data
mysql -u liferay43plet -pliferay43plet liferay43plet < portal-mysql-43.sql

for Alfresco Portlet
create database alfresco21plet;
grant all on alfresco21plet.* to 'alfresco21plet'@'localhost' identified by 'alfresco21plet' with grant option;
grant all on alfresco21plet.* to 'alfresco21plet'@'localhost.localdomain' identified by 'alfresco21plet' with grant option;

3. Start your AS from unzipped file
tomcat60/bin/startup.bat or sh startup.sh

Go to http://localhost:8080/c/portal/login

4. In CAS login page (https://docs.cignex.com/cas-web), login

possible users in LDAP server (docs.cignex.com) (configurable)
jonas/jonas
jane/jane



For the first time you login, you are required to sign on for agreement in Liferay Portal.
Furthermore, just add content "Alfresco Ext 2.1 Client";

using email/password

jonas@liferay.com / jonas
jane@liferay.com / jane

….

After login in CAS, you should be in Liferay Portal with your login name. No need re-login in Liferay Portal.

Add Alfresco Ext 2.1 Client. You should be in Alfresco Portlet with your login name. No need re-login in Alfresco Portlet.

Get it? 

Good luck.

——————————————-

For more details, please refer to instructions for Do-It-Yourselfers. Or just test Real Demo at

http://liferay.cignex.com

After you can get it running in your local machine, you can replace LDAP with yours carefully, as well as CAS SSO server.

zazation
Champ in-the-making
Champ in-the-making
hi

I have put in place a simple "CAS SSO"  for the "Liferay" portal and it works very well.
now I'm trying to extend this solution to put in place a proxy cas sso that accesses to a portlet that, itself,

accesses to "Alfresco" via web services.

What are the configurations to add in the class "com.liferay.portal.servlet.filters.sso.cas.CASFilter"
to use the proxies and get the pgtiou I'd use to ask for proxy tickets???


otherwise, I've tried to illustrate the mecanisme directly in a browser like this:
- my server cas accessible on the port :8483
- my server tomcat for liferay on : 8090
- I also have the liferay's ssl port: 8445

So
- I put in the url "https://localhost:8443/cas/login" for the authentication on the "CAS"
- then the url "https://localhost:8443/cas/login?service=localhost:8090/c/portal" to get the st for liferay
- validation of the service, ticket recovered on

https://localhost:8443/cas/serviceValidateticket=XXX&service=localhost:8090/c/portal&pgtUrl=https://...
/c/cas/proxyCallBack

this is where I get the login but I have this exception:


2007-09-13 14:23:12,026 INFO [org.jasig.cas.ticket.registry.support.DefaultTicke
tRegistryCleaner] - <Starting cleaning of expired tickets from ticket registry a
t [Thu Sep 13 14:23:12 CEST 2007]>
2007-09-13 14:23:12,036 INFO [org.jasig.cas.ticket.registry.support.DefaultTicke
tRegistryCleaner] - <0 found to be removed.  Removing now.>
2007-09-13 14:23:12,046 INFO [org.jasig.cas.ticket.registry.support.DefaultTicke
tRegistryCleaner] - <Finished cleaning of expired tickets from ticket registry a
t [Thu Sep 13 14:23:12 CEST 2007]>
2007-09-13 14:38:32,650 INFO [org.jasig.cas.web.flow.InitialFlowSetupAction] - <
Setting ContextPath for cookies to: /cas>
2007-09-13 14:39:14,991 INFO [org.jasig.cas.authentication.AuthenticationManager
Impl] - <AuthenticationHandler: org.jasig.cas.authentication.handler.support.Sim
pleTestUsernamePasswordAuthenticationHandler successfully authenticated the user
which provided the following credentials: joebloggs>
2007-09-13 14:39:15,011 INFO [org.jasig.cas.CentralAuthenticationServiceImpl] -
<Granted service ticket [ST-1-o33NgonIFq7uJTQCTfy5f66I4OJJLJftVaQ-20] for servic
e [http://localhost:9000/liferay] for user [joebloggs]>
2007-09-13 14:40:07,106 INFO [org.jasig.cas.authentication.AuthenticationManager
Impl] - <AuthenticationHandler: org.jasig.cas.authentication.handler.support.Htt
pBasedServiceCredentialsAuthenticationHandler failed to authenticate the user wh
ich provided the following credentials: https://localhost:8443/cas/proxyCallBack
>
2007-09-13 14:40:07,106 ERROR [org.jasig.cas.web.ServiceValidateController] - <T
icketException generating ticket for: https://localhost:8443/cas/proxyCallBack>
org.jasig.cas.ticket.TicketCreationException: error.authentication.credentials.b
ad
        at org.jasig.cas.CentralAuthenticationServiceImpl.delegateTicketGranting
Ticket(CentralAuthenticationServiceImpl.java:271)
        at org.jasig.cas.web.ServiceValidateController.handleRequestInternal(Ser
viceValidateController.java:124)
        at org.springframework.web.servlet.mvc.AbstractController.handleRequest(
AbstractController.java:153)
        at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.ha
ndle(SimpleControllerHandlerAdapter.java:48)
        at org.springframework.web.servlet.DispatcherServlet.doDispatch(Dispatch
erServlet.java:857)
        at org.springframework.web.servlet.DispatcherServlet.doService(Dispatche
rServlet.java:792)
        at org.springframework.web.servlet.FrameworkServlet.processRequest(Frame
workServlet.java:475)
        at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServl
et.java:430)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
        at org.jasig.cas.web.init.SafeDispatcherServlet.service(SafeDispatcherSe
rvlet.java:115)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:269)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:188)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:210)



for information, I've generated the certificate with the following commands:


keytool -genkey -alias tomcat -keypass changeit -keyalg RSA
keytool -export -alias tomcat -keypass changeit -file server.cert
keytool -import -alias tomcat -file server.cert -keypass changeit -keystore %JAVA_HOME%/jre/lib/security/cacerts


Thanks for your help