Further to this, I'm having a problem which is very strange.

I'm not sure into which of the seperate jar/war files to put my security 
classes.

I'm using JAAS, and I have a sar file which contains meta-inf/jboss-service.xml:

<?xml version='1.0'?>
  | <!DOCTYPE policy PUBLIC
  |       "-//JBoss//DTD MBean Service 4.0//EN"
  |       "http://www.jboss.org/j2ee/dtd/jboss-service_4_0.dtd";>
  | <server>
  |    <!-- The custom JAAS login configuration that installs 
  |        a Configuration capable of dynamically updating the
  |        config settings
  |    -->
  |     <mbean code="org.jboss.security.auth.login.DynamicLoginConfig"
  |             name="jboss.security.tests:service=LoginConfig">
  |             <attribute name="PolicyConfig" serialDataType="jbxb">
  |                     <jaas:policy
  |                             
xsi:schemaLocation="urn:jboss:security-config:4.1 
resource:security-config_4_1.xsd"
  |                             xmlns:jaas="urn:jboss:security-config:4.1"
  |                             
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
  | 
  |                             <!-- Our Greenfields login config -->
  |                             <jaas:application-policy name="Greenfields">
  |                                     <jaas:authentication>
  |                                             <jaas:login-module 
code="com.fcl.security.GreenfieldsLoginModule" flag="required">
  |                                                     <jaas:module-option 
name="unauthenticatedIdentity">Anonymous</jaas:module-option>
  |                                                     <jaas:module-option 
name="principalClass">com.fcl.security.GreenfieldsUser</jaas:module-option>
  |                                                     <jaas:module-option 
name="ignorePasswordCase">true</jaas:module-option>
  |                                             </jaas:login-module>
  |                                     </jaas:authentication>
  |                             </jaas:application-policy>
  |                     </jaas:policy>         
  |             </attribute>
  |             <depends optional-attribute-name="LoginConfigService">
  |                      jboss.security:service=XMLLoginConfig
  |             </depends>
  |             <depends optional-attribute-name="SecurityManagerService">
  |                      jboss.security:service=JaasSecurityManager
  |             </depends>
  |     </mbean>
  | </server>

I put my com.fcl.security.GreenfieldsLoginModule,com.fcl.security.LoginUtils 
(utility functions used by the login process) and 
com.fcl.security.GreenfieldsUser (The Principal class) into the WAR file 
(because it's the web app that does the JAAS authentication), but then I get

[c]dejava.lang.LinkageError: loader constraints violated when linking 
com/fcl/security/GreenfieldsUser class when invoking my EJBs.

I put com.fcl.security.GreenfieldsUser into my EJB jar file too.

basically, my EAR is build like this... here's my application.xml:

<?xml version="1.0" encoding="UTF-8"?>
  | <application
  |     xmlns="http://java.sun.com/xml/ns/j2ee";
  |     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; version="1.4"
  |     xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
http://java.sun.com/xml/ns/j2ee/application_1_4.xsd";>
  |     <display-name>GreenFields</display-name>
  |     <module>
  |             <java id="greenfield.jar">greenfield.jar</java>
  |     </module>
  |     <module>
  |             <ejb id="persistence.jar">persistence.jar</ejb>
  |     </module>
  |     <module>
  |             <ejb id="ejbs.jar">ejbs.jar</ejb>
  |     </module>
  |     <module>
  |             <java id="GreenfieldsLogin.sar">GreenfieldsLogin.sar</java>
  |     </module>
  |     <module>
  |             <web>
  |                     <web-uri>webapp.war</web-uri>
  |                     <context-root>gfFw</context-root>
  |             </web>
  |     </module>
  | </application>

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3954993#3954993

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3954993

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to