Check the log to see what security domain the war is being deployed with and
then check the security/web unit tests in the testsuite module as they
demonstrate this stuff.
 
xxxxxxxxxxxxxxxxxxxxxxxx
Scott Stark
Chief Technology Officer
JBoss Group, LLC
xxxxxxxxxxxxxxxxxxxxxxxx
----- Original Message -----
Sent: Thursday, November 07, 2002 1:37 PM
Subject: Re: [JBoss-user] JAAS - Problem with Ldap Realm

Ok,  I am really just using the application.xml, the jboss-web.xml and the web.xml (which are in the WEB-INF directory of a war file in a ear file) to protect some servlets and jsps right now.
here are the relevant snippets here;

jboss-web.xml

<security-domain>java:/jaas/ldap</security-domain>

web.xml

   <security-constraint>
      <web-resource-collection>
         <web-resource-name>Restricted</web-resource-name>
         <description>security</description>
         <url-pattern>/secure/*</url-pattern>
         <http-method>HEAD</http-method>
         <http-method>GET</http-method>
         <http-method>POST</http-method>
         <http-method>PUT</http-method>
         <http-method>DELETE</http-method>
      </web-resource-collection>
      <auth-constraint>
         <role-name>user_admin</role-name>
      </auth-constraint>
      <user-data-constraint>
         <description>no description</description>
         <transport-guarantee>NONE</transport-guarantee>
      </user-data-constraint>
   </security-constraint>

   <security-role>
      <description>user admin</description>
      <role-name>user_admin</role-name>
   </security-role>

application.xml

   <module>
      <web>
         <web-uri>mywarfile.war</web-uri>
         <context-root>/</context-root>
      </web>
   </module>

OS: XPsp1
JDK: 1.4.1_01
JBoss: 3.0.4

And at the risk of being redundant, I swear this works with JBoss 2.4.x.

BTW Thanks...
-Keene 
 

Reply via email to