You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ca...@apache.org on 2007/01/27 22:15:48 UTC

svn commit: r500624 - in /myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp: META-INF/ META-INF/context.xml META-INF/tomcat-users.xml WEB-INF/web.xml

Author: cagatay
Date: Sat Jan 27 13:15:47 2007
New Revision: 500624

URL: http://svn.apache.org/viewvc?view=rev&rev=500624
Log:
Add security config for the security context example

Added:
    myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/META-INF/
    myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/META-INF/context.xml   (with props)
    myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/META-INF/tomcat-users.xml   (with props)
Modified:
    myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/WEB-INF/web.xml

Added: myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/META-INF/context.xml
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/META-INF/context.xml?view=auto&rev=500624
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/META-INF/context.xml (added)
+++ myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/META-INF/context.xml Sat Jan 27 13:15:47 2007
@@ -0,0 +1,12 @@
+<?xml version='1.0' encoding='utf-8'?>
+<!--
+ $LastChangedBy$
+ $LastChangedDate$
+ $LastChangedRevision$
+-->
+<Context displayName="tomahawk-sandbox-examples">
+
+	<Realm className="org.apache.catalina.realm.MemoryRealm"
+    pathname="webapps/tomahawk-sandbox-examples/META-INF/tomcat-users.xml" />
+
+</Context>
\ No newline at end of file

Propchange: myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/META-INF/context.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/META-INF/context.xml
------------------------------------------------------------------------------
    svn:keywords = Id LastChangedBy LastChangedDate LastChangedRevision

Added: myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/META-INF/tomcat-users.xml
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/META-INF/tomcat-users.xml?view=auto&rev=500624
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/META-INF/tomcat-users.xml (added)
+++ myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/META-INF/tomcat-users.xml Sat Jan 27 13:15:47 2007
@@ -0,0 +1,9 @@
+<?xml version='1.0' encoding='utf-8'?>
+<tomcat-users>
+  <role rolename="admin"/>
+  <role rolename="writer"/>
+  <role rolename="reader"/>
+  <user username="admin" password="myfacesrocks" roles="admin"/>
+  <user username="editor" password="editor" roles="writer"/>
+  <user username="guest" password="guest" roles="reader"/>
+</tomcat-users>

Propchange: myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/META-INF/tomcat-users.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/META-INF/tomcat-users.xml
------------------------------------------------------------------------------
    svn:keywords = Id LastChangedBy LastChangedDate LastChangedRevision

Modified: myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/WEB-INF/web.xml?view=diff&rev=500624&r1=500623&r2=500624
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/WEB-INF/web.xml (original)
+++ myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/WEB-INF/web.xml Sat Jan 27 13:15:47 2007
@@ -195,4 +195,33 @@
   	<welcome-file>default.htm</welcome-file>
   	<welcome-file>default.jsp</welcome-file>
   </welcome-file-list>
+  
+  <security-constraint>
+		<web-resource-collection>
+			<web-resource-name>SecurityContext</web-resource-name>
+			<url-pattern>/securityContext.jsf</url-pattern>
+		</web-resource-collection>
+		<auth-constraint>
+			<role-name>admin</role-name>
+			<role-name>writer</role-name>
+			<role-name>reader</role-name>
+		</auth-constraint>
+	</security-constraint>
+  
+  <security-role>
+	<role-name>admin</role-name>
+  </security-role>
+  
+    <security-role>
+	<role-name>writer</role-name>
+  </security-role>
+  
+    <security-role>
+	<role-name>reader</role-name>
+  </security-role>
+  
+  <login-config>
+	<auth-method>BASIC</auth-method>
+  </login-config>
+  
 </web-app>