Alfresco Web Script Portlet rivet
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2009 10:57 AM
AWPr is a JSR-168 portlet that can be used to expose remote Alfresco Web scripts, including those that need user authentication. With the help of a custom Alfresco authentication component that we wrote the portlet can carry the user credentials from the portal to Alfresco, authenticate the user in Alfresco and retrieve a ticket that can be used during all subsequent interactions between the end-user, the portlet and ultimately the Alfresco Web script itself.
Motivation for AWPr
When integrating Alfresco Web scripts with JBoss Portal or Liferay Portal AWPr alleviates the need for having to deploy all of Alfresco inside the portal as is the case when using Alfresco's OOTB (out-of-the-box) Web script portlet for Alfresco/Portal integration.
AWPr is also highly configurable. Through the use of portlet preferences you can create multiple instances of AWPr and configure each one with a different Web script URL and a set of parameters with default values if needed. The instance will then RESTfully fetch the result of the Web script's render phase and carry that over to the portlet finally rendering it on the screen within the confines of the portlet window.
It is hence possible to run two instances of AWPr on a single portal page where each instance is exposing a different Web script even if those Web scripts are hosted on two different Alfresco servers regardless of their geographic location.
AWPr lives here:
http://wiki.rivetlogic.org/display/AWPr/
Feel free to ask questions about AWPr in this thread.
–Alaaeldin
- Labels:
-
Archive
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-23-2009 11:26 AM
Anyway I'm succeeding in getting my desidered behaviour…an user is authenticated in aWpr (alfresco) only if he is an alfresco user too. I modified code and it now seems to work.
Still thanks for your help, you was so friendly 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-24-2009 08:14 AM
Unfortunately still no clue what's wrong with my setup

What i did in detail:
- set up Liferay 5.2.3 bundled with Tomcat 5.5.27 (localhost:8081, AJP port 8010)
- set up Alfresco 3.2CE/3.1E bundled with Tomcat 6.0.x (localhost/alfresco:8080, AJP port 8011)
- installed Apache (localhost) with mod_jk
http.conf:
JkMount /alfresco worker_alfrescoJkMount /alfresco/* worker_alfrescoJkMount /* worker_liferay
workers.properties:# Setting Tomcat & Java Home#workers.tomcat_home="C:/Alfresco/tomcat"workers.tomcat_home="C:/Liferay/tomcat-5.5.27"workers.tomcat_home="C:/Alf3.1E/tomcat"workers.java_home="C:/Program Files/Java/jdk1.6.0_07"ps=\worker.list=worker_alfresco,worker_liferay# Set properties for worker 'worker_alfresco' (ajp13)worker.worker_alfresco.type=ajp13worker.worker_alfresco.host=localhostworker.worker_alfresco.port=8011# Set properties for worker 'worker_liferay' (ajp13)worker.worker_liferay.type=ajp13worker.worker_liferay.host=localhostworker.worker_liferay.port=8010
- used Alfresco MMT to install "AWPrExampleWebScripts" and "SecureTokenAuthenticationRivet"- created chaining-authentication-context.xml and used the code from your wiki-site
Anything I forgot or could have done wrong?
Kind regards and thank you very much in advance.
Hello Alaaeldin,
AWPr looks really great, thank you for contributing it to the community! I managed to get the AWPr My Spaces Web script working, but unfortunately Alfresco (3.2 CE) creates for every user an account instead of assigning the matching Alfresco-User. Liferay (5.2.3) and Alfresco do have the exact same users in it, same e-mail-addresses, Liferay screennames matches Alfresco's user names and Home Space names, what am I doing wrong?
I already checked my alfresco.war using alfresco-mmt-3.2.jar list, modules "AWPrExampleWebScripts" and "SecureTokenAuthenticationRivet" are installed and I used the chaining-authentication-context.xml from your wiki-page.
Any help would be much appreciated, thank you in advance.
Hi,
Thanks for the kind words. We haven't had a chance to test AWPr with Alfresco 3.2 yet. But I think it should work unless Alfresco's chaining authentication XML changed since Alfresco version 3.1.
I'll update this thread when we get around to trying it out.
Cheers,
–Alaaeldin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-24-2009 11:19 AM
Which webscript are you trying to access through AWPr? Can you also post the AWPr instance configuration you're using? Also, you should be using the latest version of AWPr (1.5.0). You should also use the latest versions of STAr and the example webscripts (if you're gonna be using them):
star-1.1.0.amp
awpr-example-webscripts-1.5.0.amp
Cheers,
–Alaaeldin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2009 06:46 AM
only latest versions are in use. I also made sure, I got the awpr.war for Liferay 5.2.x.
Alfresco says at startup:
11:58:03,081 User:System INFO [repo.module.ModuleServiceImpl] Starting module 'SecureTokenAuthenticationRivet' version 1.1.0.11:58:03,159 User:System INFO [repo.module.ModuleServiceImpl] Starting module 'AWPrExampleWebScripts' version 1.5.0.
Liferay says at startup:09:54:58,407 INFO [PortletHotDeployListener:227] Registering portlets for awpr09:54:58,438 WARN [PortletLocalServiceImpl:499] Portlet with the name awpr_WAR_awpr is described in portlet.xml but does not have a matching entry in liferay-portlet.xml09:54:58,485 INFO [PortletHotDeployListener:346] 1 portlet for awpr is available for use
The AWPr-Preferences within your My Spaces Web script are set to:
Alfresco Host: http://localhost
Alfresco Context Path: /alfresco
Script Url: /ui/awprmyspaces
Constant Script Parameters: {alfUrl}[http://localhost/alfresco]
Default Script Parameters: {f}[0],{p}[/Company Home/]
Proxy URLs: {/ui/awprmyspaces}
Javascript Variable: uiawprmyspaces
REST Method Type: GET
URL Encoding Type: UTF-8
Cheers.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2009 08:57 AM
–Alaaeldin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2009 12:05 PM
Turning Alfresco's automatic user creation off, My Spaces Web script shows an Alfresco-loginscreen. So it must be something with authentication, but I have no clue what it could be

Kind regards and have a nice weekend.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2009 12:09 PM
Hope this helps,
–Alaaeldin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2009 03:21 AM
So either create the user in Alfresco ahead of time or Alfresco will create it for you. Since you're using Liferay you must be careful since Liferay allows you to login using userid, e-mail, or screenname. Whatever the username is that you type in Liferay's login is has to be the username in Alfresco. So if you login to Liferay with an e-mail address then the username of the user in Alfresco must also be the e-mail address.That's exactly what I did

Thanks again and kind regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-30-2009 10:42 AM
This seems to imply that you're using the JBoss Portal version of AWPr since it makes the standard Portlet API call to get the portal username, while the Liferay version makes a different call.
Are you sure you're using the Liferay version of AWPr?
–Alaaeldin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2009 10:03 AM
I'm so sorry for wasting your time because of my own stupidity. But hands down, not only AWPr is a great piece of software, also your efforts supplying support is just awsome. Thank you very much!
