views:

600

answers:

1

Hello all.
First of all sorry for my poor english but, i'm french...
I try for some time to create my custom jaas module for authentification im my web application. I work under JBoss5. So I have create my own JAAS module (Principal, Group, LoginModule). I have declare it in my ear conf:
-myEAR:
     |-----my-login-config.xml
     |-----META-INF/jboss-service.xml
my-login-config.xml:


    <policy>
      <application-policy name='MyJaas'>
        <authentication>
          <login-module code="com.toto.MyLoginModule" flag="required">
          </login-module>
        </authentication>
      </application-policy>
     </policy>


jboss-service.xml:


<server>
    <mbean code="org.jboss.security.auth.login.DynamicLoginConfig" name="whatever:service=MyLogin">
     <attribute name="AuthConfig">my-login-config.xml</attribute>

     <depends optional-attribute-name="LoginConfigService">jboss.security:service=XMLLoginConfig</depends>
     <depends optional-attribute-name="SecurityManagerService">jboss.security:service=JaasSecurityManager</depends>
    </mbean>
</server>

Then in my war file:
I Have create a jboss-web.xml in my WEB-INF folder with:


    <jboss-web>
    <security-domain>java:/jaas/MyJaas</security-domain>
    <!-- On demande un acces de la DS avant le deploiement du WAR -->
    <depends>jboss.jca:service=DataSourceBinding,name=MyDS</depends>

</jboss-web>


And finaly (a part of) my web.xml :)


...
<login-config>
    <auth-method>FORM</auth-method>
    <realm-name>MyJaas</realm-name>
    <form-login-config>
     <form-login-page>/MyContext/login.html</form-login-page>
     <form-error-page>/MyContext/nok.html</form-error-page>
    </form-login-config>
</login-config>

...

OK for that conf part :) The probleme is: I Have my form authentification (action = j_security_check with j_username and j_userpassword) but a the submission the server answer me a 404 error and i don't understand why :'(.

All help will be pleased.

Thanks for all

Pierre

A: 

nobody for help me?