Jetspeed with filter authentication

Jetspeed 2 authenticate user’s with JAAS. Jetspeed installer and maven plug-in both configure tomcat for JAAS authentication.

I have seen people facing problem in configuring JAAS in different application server e.g Websphere, Jboss etc.In some case user face error in tomcat too.
This is the common error log, if JAAS is not configured properly

javax.security.auth.login.LoginException: unable to find LoginModule
class: org.apache.jetspeed.security.impl.DefaultLoginModule
at javax.security.auth.login.LoginContext.invoke(LoginContext.java:808)
at javax.security.auth.login.LoginContext.access$000(LoginContext.java:186)
at javax.security.auth.login.LoginContext$4.run(LoginContext.java:683)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:680)

Jetspeed is modular and easy to configure. Jetspeed authentication can be configured with-out JASS.
For using different authentication then JAAS, you would need to edit web.xml of jetspeed. You will find an commented entry for portal filter.

<!--

<filter>

<filter-name>PortalFilter</filter-name>

<filter-class>org.apache.jetspeed.login.filter.PortalFilter</filter-class>

</filter>

-->

<!--

<filter-mapping>

<filter-name>PortalFilter</filter-name>

<url-pattern>/*</url-pattern>

</filter-mapping>

-->

Just un-comment the above filter configuration and restart your application ( Some application server, don’t take changes in web.xml, once deployed). I would recommend to make these changes before deploy.

Once server is started, Jetspeed login should work

Apache Jetspeed-2 installation

Jetspeed-2 installation

Jetspeed-2 (JS2) portal installation is very easy and simple,still i have seen lot of people
having trouble in installation. Its very important to under-stand, what exactly is required to run jetspeed.

Jetspeed in more generic way an web application, which is serving user request as portal and requires three simple thing to run

Database

Jetspeed has custom database structure, which is an essential for running.
JS2 use database via JNDI, JS2 expect jndi to be named is “jdbc/jetspeed”.
JS2 will try to access database with this JNDI, there can be different way to setup JNDI in different application server. I would recommend to test database via JNDI from application server.

Shared lib

Jetspeed require shared lib to be setup with in application server. Each application server have different way to set-up shared lib. Different version of jetspeed require different files in shared lib.

Jetspeed 2.1.3
jetspeed-api-2.1.3.jar
jetspeed-commons-2.1.3.jar
pluto-1.0.1.jar
portals-bridges-common-1.0.4.jar
portlet-api-1.0.jar

Jetspeed 2.2.0
ccpp-1.0.jar
jetspeed-api-2.2-SNAPSHOT.jar
jetspeed-commons-2.2-SNAPSHOT.jar
pluto-container-api-2.0.0-SNAPSHOT.jar
pluto-taglib-2.0.0-SNAPSHOT.jar
portals-bridges-common-1.0.4.jar
portlet-api-2.0.jar

Note:

1) Make sure, Version of shared libraries should be same as version of jetspeed.
2) Jetspeed-api and jetspeed common, should be present only in shared lib, not even with your portlet application.

JAAS authentication setup


I would say this step is more-over optional and can be configured differently according to your requirement. Jespeed out-of-box comes with JAAS authentication, again like the above two steps. It is all depends on the application server to configure it.

Jetspeed installer comes with tomcat 5.5.27 and have JAAS authentication as pre configured to use. If you are facing problem ins setting up JAAS in your application server. I would suggest you to go set up jetspeed with filter authentication¬† Go here “filter-Authentication” for details on this.

Last and final step

Deploy jetspeed.war in your application server.

open browser with http://localhost:8080/jetspeed/portal
this should show default jetspeed.

Hope this will help.