portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject svn commit: r360565 - in /portals/jetspeed-1/trunk/cma: ./ WEB-INF/ WEB-INF/conf/ WEB-INF/conf/TurbineResources.properties.merge WEB-INF/web.xml build.properties.example tomcat-conf/ tomcat-conf/tomcat-users.xml
Date Sun, 01 Jan 2006 21:56:32 GMT
Author: taylor
Date: Sun Jan  1 13:56:31 2006
New Revision: 360565

URL: http://svn.apache.org/viewcvs?rev=360565&view=rev
Log:
Example of container managed authentication

Added:
    portals/jetspeed-1/trunk/cma/
    portals/jetspeed-1/trunk/cma/WEB-INF/
    portals/jetspeed-1/trunk/cma/WEB-INF/conf/
    portals/jetspeed-1/trunk/cma/WEB-INF/conf/TurbineResources.properties.merge
    portals/jetspeed-1/trunk/cma/WEB-INF/web.xml
    portals/jetspeed-1/trunk/cma/build.properties.example
    portals/jetspeed-1/trunk/cma/tomcat-conf/
    portals/jetspeed-1/trunk/cma/tomcat-conf/tomcat-users.xml

Added: portals/jetspeed-1/trunk/cma/WEB-INF/conf/TurbineResources.properties.merge
URL: http://svn.apache.org/viewcvs/portals/jetspeed-1/trunk/cma/WEB-INF/conf/TurbineResources.properties.merge?rev=360565&view=auto
==============================================================================
--- portals/jetspeed-1/trunk/cma/WEB-INF/conf/TurbineResources.properties.merge (added)
+++ portals/jetspeed-1/trunk/cma/WEB-INF/conf/TurbineResources.properties.merge Sun Jan  1
13:56:31 2006
@@ -0,0 +1 @@
+action.sessionvalidator=JAASSessionValidator

Added: portals/jetspeed-1/trunk/cma/WEB-INF/web.xml
URL: http://svn.apache.org/viewcvs/portals/jetspeed-1/trunk/cma/WEB-INF/web.xml?rev=360565&view=auto
==============================================================================
--- portals/jetspeed-1/trunk/cma/WEB-INF/web.xml (added)
+++ portals/jetspeed-1/trunk/cma/WEB-INF/web.xml Sun Jan  1 13:56:31 2006
@@ -0,0 +1,152 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+Copyright 2004 The Apache Software Foundation
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+<!DOCTYPE web-app
+    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
+    "http://java.sun.com/j2ee/dtds/web-app_2.2.dtd">
+
+<web-app>
+    <display-name>Jetspeed Enterprise Information Portal</display-name>
+    <servlet>
+        <servlet-name>
+           jetspeed
+        </servlet-name>
+        <servlet-class>
+            org.apache.turbine.Turbine
+        </servlet-class>
+
+        <init-param>
+            <param-name>properties</param-name>
+            <param-value>
+              WEB-INF/conf/TurbineResources.properties
+            </param-value>            
+        </init-param>
+        <init-param>
+            <param-name>resources</param-name>
+            <param-value>org.apache.jetspeed.services.resources.JetspeedResourceService</param-value>
           
+        </init-param>    
+        <init-param>
+            <param-name>logging</param-name>
+            <param-value>org.apache.jetspeed.services.logging.JetspeedLoggingService</param-value>
           
+        </init-param>    
+        <load-on-startup>1</load-on-startup>
+		
+		  <security-role-ref>
+		   <role-name>user</role-name>  <!--passed to isUserInRole()-->
+		   <role-link>user</role-link>  <!--Jetspeed role name-->
+		  </security-role-ref>
+		 
+		  <security-role-ref>
+			<role-name>admin</role-name>
+			<role-link>admin</role-link>
+		  </security-role-ref>
+		 
+		  <security-role-ref>
+			<role-name>guest</role-name>
+			<role-link>guest</role-link>
+		  </security-role-ref>
+  		
+    </servlet>
+
+    <servlet-mapping>
+       <servlet-name>
+          jetspeed
+       </servlet-name>
+       <url-pattern>
+         /portal/*
+       </url-pattern>
+    </servlet-mapping>
+    <servlet-mapping>
+       <servlet-name>
+          jetspeed
+       </servlet-name>
+       <url-pattern>
+         /jetspeed/*
+       </url-pattern>
+    </servlet-mapping>
+    
+    <mime-mapping> 
+      <extension>wbmp</extension> 
+      <mime-type>image/vnd.wap.wbmp</mime-type> 
+    </mime-mapping>
+    
+    <mime-mapping> 
+      <extension>wml</extension> 
+      <mime-type>text/vnd.wap.wml</mime-type> 
+    </mime-mapping>
+    
+    <mime-mapping> 
+      <extension>wmls</extension> 
+      <mime-type>text/vnd.wap.wmlscript</mime-type> 
+    </mime-mapping> 
+
+    <welcome-file-list>
+      <welcome-file>index.jsp</welcome-file>
+      <welcome-file>index.wml</welcome-file>
+      <welcome-file>index.html</welcome-file>
+    </welcome-file-list>
+
+  <security-constraint>
+    <display-name>Jetspeed Security</display-name>
+    <web-resource-collection>
+      <web-resource-name>Protected Area</web-resource-name>
+      <!-- Define the context-relative URL(s) to be protected -->
+      <url-pattern>/*</url-pattern>
+  
+      <!-- If you list http methods, only those methods are protected -->
+      <http-method>DELETE</http-method>
+      <http-method>GET</http-method>
+      <http-method>POST</http-method>
+      <http-method>PUT</http-method>
+    </web-resource-collection>
+	  
+    <auth-constraint>
+      <!-- Anyone with one of the listed roles may access this area -->
+      <role-name>user</role-name>
+      <role-name>admin</role-name>
+    </auth-constraint>
+  	  
+  </security-constraint>
+	
+  <login-config>
+    <auth-method>BASIC</auth-method>
+    <realm-name>Jetspeed BASIC Authentication</realm-name>
+  </login-config>
+  
+  <!-- Default login configuration uses form-based authentication -->
+  <!--
+    <login-config>
+      <auth-method>FORM</auth-method>
+      <realm-name>Example Form-Based Authentication Area</realm-name>
+      <form-login-config>
+        <form-login-page>/jsp/security/protected/login.jsp</form-login-page>
+        <form-error-page>/jsp/security/protected/error.jsp</form-error-page>
+      </form-login-config>
+    </login-config>
+  -->
+  
+  <!-- Security roles referenced by this web application -->
+  <security-role>
+    <role-name>admin</role-name>
+  </security-role>
+  <security-role>
+    <role-name>user</role-name>
+  </security-role>
+  <security-role>
+    <role-name>guest</role-name>
+  </security-role>
+	
+</web-app>

Added: portals/jetspeed-1/trunk/cma/build.properties.example
URL: http://svn.apache.org/viewcvs/portals/jetspeed-1/trunk/cma/build.properties.example?rev=360565&view=auto
==============================================================================
--- portals/jetspeed-1/trunk/cma/build.properties.example (added)
+++ portals/jetspeed-1/trunk/cma/build.properties.example Sun Jan  1 13:56:31 2006
@@ -0,0 +1,2 @@
+# in order to deploy the tomcat-users.xml example, you will need this property
+maven.war.appserver.home = /home/jetspeed/jakarta-tomcat-5.0.30

Added: portals/jetspeed-1/trunk/cma/tomcat-conf/tomcat-users.xml
URL: http://svn.apache.org/viewcvs/portals/jetspeed-1/trunk/cma/tomcat-conf/tomcat-users.xml?rev=360565&view=auto
==============================================================================
--- portals/jetspeed-1/trunk/cma/tomcat-conf/tomcat-users.xml (added)
+++ portals/jetspeed-1/trunk/cma/tomcat-conf/tomcat-users.xml Sun Jan  1 13:56:31 2006
@@ -0,0 +1,20 @@
+<?xml version='1.0' encoding='utf-8'?>
+<tomcat-users>
+
+  <!-- Tomcat Roles -->
+  <role rolename="tomcat"/>
+  <role rolename="manager"/>
+
+  <!-- Jetspeed Roles -->
+  <role rolename="admin"/>
+  <role rolename="user"/>
+  <role rolename="guest"/>
+
+  <!-- Tomcat Users -->  
+  <user username="tomcat" password="tomcat" roles="tomcat"/>
+
+  <!-- Jetspeed Users -->
+  <user username="admin" password="jetspeed" roles="admin,user,manager"/>
+  <user username="turbine" password="turbine" roles="user"/>
+
+</tomcat-users>



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message