User: starksm 
  Date: 01/05/01 11:21:45

  Modified:    src/docs howtojaas.xml
  Log:
  Update the tutorial to better demonstrate the method permission usage
  
  Revision  Changes    Path
  1.7       +227 -73   manual/src/docs/howtojaas.xml
  
  Index: howtojaas.xml
  ===================================================================
  RCS file: /cvsroot/jboss/manual/src/docs/howtojaas.xml,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- howtojaas.xml     2001/05/01 01:33:24     1.6
  +++ howtojaas.xml     2001/05/01 18:21:45     1.7
  @@ -403,6 +403,7 @@
   public interface Session extends EJBObject
   {
       public String echo(String arg) throws RemoteException;
  +    public void noop() throws RemoteException;
   }</programlisting>
                </figure>
                <figure id = "SessionHome.java">
  @@ -461,6 +462,12 @@
           System.out.println("StatelessSessionBean.echo, callerPrincipal="+p);
           return arg;
       }
  +    public void noop() throws RemoteException
  +    {
  +        System.out.println("StatelessSessionBean.noop");
  +        Principal p = sessionContext.getCallerPrincipal();
  +        System.out.println("StatelessSessionBean.noop, callerPrincipal="+p);
  +    }
   
   }</programlisting>
                </figure>
  @@ -510,6 +517,13 @@
           System.out.println("StatefulSessionBean.echo, callerPrincipal="+p);
           return arg;
       }
  +    public void noop() throws RemoteException
  +    {
  +        System.out.println("StatefulSessionBean.noop");
  +        Principal p = sessionContext.getCallerPrincipal();
  +        System.out.println("StatefulSessionBean.noop, callerPrincipal="+p);
  +    }
  +
   }</programlisting>
                </figure>
                <figure id = "ejb-jar.xml">
  @@ -554,15 +568,28 @@
                   <ejb-name>StatelessSession</ejb-name>
                   <method-name>*</method-name>
               </method>
  +            <method>
  +                <ejb-name>StatefulSession</ejb-name>
  +                <method-name>*</method-name>
  +            </method>
           </method-permission>
   
           <method-permission>
  -            <role-name>Echo</role-name>
  +            <role-name>Coder</role-name>
               <method>
                   <ejb-name>StatefulSession</ejb-name>
  -                <method-name>*</method-name>
  +                <method-name>create</method-name>
  +            </method>
  +            <method>
  +                <ejb-name>StatefulSession</ejb-name>
  +                <method-name>remove</method-name>
  +            </method>
  +            <method>
  +                <ejb-name>StatefulSession</ejb-name>
  +                <method-name>noop</method-name>
               </method>
           </method-permission>
  +
       </assembly-descriptor>
   </ejb-jar>
   ]]></programlisting>
  @@ -580,7 +607,7 @@
   where ${jboss_home} is the location of your JBoss distribution.
   
   @author [EMAIL PROTECTED]
  -@version $Revision: 1.6 $
  +@version $Revision: 1.7 $
   */
   public class SessionClient
   {
  @@ -647,11 +674,21 @@
               System.out.println("Created StatelessSession");
               System.out.println("Bean.echo('Hello') -> "+bean.echo("Hello"));
               bean.remove();
  +        }
  +        catch(Exception e)
  +        {
  +            e.printStackTrace();
  +        }
   
  -            home = (SessionHome) iniContext.lookup("StatefulSession");
  +        try
  +        {
  +            InitialContext iniContext = new InitialContext();
  +            SessionHome home = (SessionHome) iniContext.lookup("StatefulSession");
               System.out.println("Found StatefulSessionHome");
  -            bean = home.create();
  +            Session bean = home.create();
               System.out.println("Created StatefulSession");
  +            bean.noop();
  +            System.out.println("Bean.noop() called");
               System.out.println("Bean.echo('Hello') -> "+bean.echo("Hello"));
               bean.remove();
           }
  @@ -669,6 +706,7 @@
   establishes the username and password that is sent to JBoss.
   Now, finally let's put everything together and deploy the session bean.</para>
        </section>
  +
        <section id = "jaas5">
                <title>Deploying a Bean with Security</title>
                <para>This section details the procedure for building, deploying and 
testing
  @@ -761,7 +799,8 @@
       fresh build from cvs and jboss_home=/tmp/cvs/jboss/dist.
       </para>    
                                                <literallayout>
  -                                                     <command>    howto-jaas 
1055>export jboss_home=/tmp/cvs/jboss/dist
  +                                                     <command><![CDATA[
  +    howto-jaas 1055>export jboss_home=/tmp/cvs/jboss/dist
       howto-jaas 1056>export CLASSPATH="${jboss_home}/client/jaas.jar"
       howto-jaas 1057>CLASSPATH="${CLASSPATH};${jboss_home}/client/ejb.jar"
       howto-jaas 1058>CLASSPATH="${CLASSPATH};${jboss_home}/client/jnp-client.jar"
  @@ -770,13 +809,14 @@
       howto-jaas 1061>CLASSPATH="${CLASSPATH};."
       howto-jaas 1062>echo $CLASSPATH
       
/tmp/cvs/jboss/dist/client/jaas.jar;/tmp/cvs/jboss/dist/client/ejb.jar;/tmp/cvs/jboss/dist/client/jnp-client.jar;/tmp/cvs/jboss/dist/client/jboss-client.jar;/tmp/cvs/jboss/dist/client/jbosssx-client.jar;.
  -    </command>
  +]]>    </command>
                                                </literallayout>    
                                        </step>    
                                        <step>    
                                                <para>Next, compile all of the source. 
</para>    
                                                <literallayout>
  -                                                     <command>    howto-jaas 
1087>javac -g *.java
  +                                                     <command><![CDATA[
  +    howto-jaas 1087>javac -g *.java
       howto-jaas 1088>ls
       Session.class                           StatefulSessionBean.java
       Session.java                            StatelessSessionBean.class
  @@ -786,7 +826,7 @@
       SessionHome.class                       jboss.xml
       SessionHome.java                        roles.properties
       StatefulSessionBean.class               users.properties
  -    </command>
  +]]>    </command>
                                                </literallayout>    
                                        </step>    
                                </substeps>
  @@ -798,7 +838,8 @@
                                <substeps>    
                                        <step>    
                                                <literallayout>
  -                                                     <command>    howto-jaas 
1089>mkdir META-INF
  +                                                     <command><![CDATA[
  +    howto-jaas 1089>mkdir META-INF
       howto-jaas 1090>mv *.xml META-INF
       howto-jaas 1091>jar -cf $jboss_home/deploy/ssbean.jar Session.class 
SessionHome.class StatefulSessionBean.class StatelessSessionBean.class 
roles.properties users.properties META-INF
       howto-jaas 1092>jar -tf $jboss_home/deploy/ssbean.jar
  @@ -812,7 +853,7 @@
       users.properties
       META-INF/ejb-jar.xml
       META-INF/jboss.xml
  -    </command>
  +]]>    </command>
                                                </literallayout>    
                                        </step>    
                                </substeps>
  @@ -840,9 +881,10 @@
                                                <para>Copy the auth.conf that you 
created from <xref linkend = "server.auth.conf"/> to
       $jboss_home/conf/default and overwrite the existing file.</para>    
                                                <literallayout>
  -                                                     <computeroutput>    howto-jaas 
1103>cp auth.conf $jboss_home/conf/default
  +                                                     <computeroutput><![CDATA[
  +    howto-jaas 1103>cp auth.conf $jboss_home/conf/default
       cp: overwrite '/tmp/cvs/jboss/dist/conf/default/auth.conf'? y
  -    </computeroutput>
  +]]>    </computeroutput>
                                                </literallayout>    
                                        </step>    
                                </substeps>
  @@ -854,7 +896,8 @@
   deal of ouput on your console. Below is some console output and I have
   emphasized the session bean deployment output.</para>
                                <literallayout>
  -                                     <computeroutput>bin 608>run.bat
  +                                     <computeroutput>bin 608>
  +run.bat
   Using configuration "default"
   [Info] Java version: 1.3.0_01,Sun Microsystems Inc.
   [Info] Java VM: Java HotSpot(TM) Client VM 1.3.0_01,Sun Microsystems Inc.
  @@ -886,7 +929,7 @@
   [J2EE Deployer Default] J2EE application: 
file:/D:/tmp/cvs/jboss/dist/deploy/ssbean.jar is deployed.</emphasis>
                                        <computeroutput>...
   [Service Control] Started 24 services
  -[Default] JBoss PRE-2.1 Started in 0m:10s</computeroutput>
  +[Default] JBoss 2.2.1 Started in 0m:10s</computeroutput>
                                </literallayout>
                        </step>
                        <step>
  @@ -906,12 +949,13 @@
       file should look like the following for the server running on the localhost with
       the default name service port: </para>    
                                                <literallayout>
  -                                                     <computeroutput>bash 1108>cat 
jndi.properties
  -    # JNDI initial context properties for jboss app server
  -    java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
  -    java.naming.provider.url=localhost
  -    java.naming.factory.url.pkgs=org.jboss.naming
  -    </computeroutput>
  +                                                     <computeroutput><![CDATA[
  +bash 1108>cat jndi.properties
  +# JNDI initial context properties for jboss app server
  +java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
  +java.naming.provider.url=localhost
  +java.naming.factory.url.pkgs=org.jboss.naming
  +]]>    </computeroutput>
                                                </literallayout>    
                                                <para>    Create this file in the same 
directory as your SessionClient.java file since
       this directory is on the classpath we setup earlier.</para>    
  @@ -922,7 +966,8 @@
   and should contain the 'other' entry as shown in <xref linkend = 
"client.auth.conf"/>. If it does not
   add it.  Run the client as follows: </para>    
                                                <literallayout>
  -                                                     <computeroutput>    --- Client:
  +                                                     <computeroutput><![CDATA[
  +    --- Client:
       howto-jaas 1133>java 
-Djava.security.auth.login.config=file://${jboss_home}/client/auth.conf SessionClient 
scott echoman
       Created LoginContext
       Found StatelessSessionHome
  @@ -930,6 +975,7 @@
       Bean.echo('Hello') -> Hello
       Found StatefulSessionHome
       Created StatefulSession
  +    Bean.noop() called
       Bean.echo('Hello') -> Hello
   
       --- Server console:
  @@ -938,11 +984,13 @@
       [StatelessSession] StatelessSessionBean.ejbCreate() called
       [StatelessSession] StatelessSessionBean.echo, arg=Hello
       [StatelessSession] StatelessSessionBean.echo, callerPrincipal=caller_scott
  -    [StatefulSession] StatelessSessionBean.ejbCreate() called
  -    [StatefulSession] StatelessSessionBean.echo, arg=Hello
  -    [StatefulSession] StatelessSessionBean.echo, callerPrincipal=scott
  -    [StatefulSession] StatelessSessionBean.ejbRemove() called
  -    </computeroutput>
  +    [StatefulSession] StatefulSessionBean.ejbCreate() called
  +    [StatefulSession] StatefulSessionBean.noop
  +    [StatefulSession] StatefulSessionBean.noop, callerPrincipal=scott
  +    [StatefulSession] StatefulSessionBean.echo, arg=Hello
  +    [StatefulSession] StatefulSessionBean.echo, callerPrincipal=scott
  +    [StatefulSession] StatefulSessionBean.ejbRemove() called
  +]]></computeroutput>
                                                </literallayout>    
                                        </step>    
                                        <step>    
  @@ -951,59 +999,131 @@
   
       
                                                <literallayout>
  -                                                     <computeroutput>    --- Client:
  +                                                     <computeroutput><![CDATA[
  +    --- Client:
       howto-jaas 1135>java 
-Djava.security.auth.login.config=file://${jboss_home}/client/auth.conf SessionClient 
stark javaman
  -    Created LoginContext
  -    Found StatelessSessionHome
  -    java.rmi.ServerException: RemoteException occurred in server thread; nested 
exception is:
  -        java.rmi.RemoteException: checkSecurityAssociation; nested exception is:
  + Created LoginContext
  + Found StatelessSessionHome
  + java.rmi.ServerException: RemoteException occurred in server thread; nested 
exception is:
  +     java.rmi.RemoteException: checkSecurityAssociation; nested exception is:
  +     java.lang.SecurityException: Illegal access exception
  + java.rmi.RemoteException: checkSecurityAssociation; nested exception is:
  +     java.lang.SecurityException: Illegal access exception
  + java.lang.SecurityException: Illegal access exception
  +     at 
sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:245)
  +     at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:220)
  +     at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:122)
  +     at 
org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker_Stub.invokeHome(Unknown Source)
  +     at org.jboss.ejb.plugins.jrmp.interfaces.HomeProxy.invoke(HomeProxy.java:248)
  +     at $Proxy0.create(Unknown Source)
  +     at SessionClient.main(SessionClient.java:74)
  + Found StatefulSessionHome
  + Created StatefulSession
  + Bean.noop() called
  + java.rmi.ServerException: RemoteException occurred in server thread;
  + nested exception is:
  +     javax.transaction.TransactionRolledbackException: checkSecurityAssociation; 
nested exception is:
  +     java.lang.SecurityException: Illegal access exception; nested exception is:
  +     java.rmi.RemoteException: checkSecurityAssociation; nested exception is:
  +     java.lang.SecurityException: Illegal access exception
  + javax.transaction.TransactionRolledbackException: checkSecurityAssociation; nested 
exception is:
  +     java.lang.SecurityException: Illegal access exception; nested exception is:
  +     java.rmi.RemoteException: checkSecurityAssociation; nested exception is:
  +     java.lang.SecurityException: Illegal access exception
  + java.rmi.RemoteException: checkSecurityAssociation; nested exception is:
  +     java.lang.SecurityException: Illegal access exception
  + java.lang.SecurityException: Illegal access exception
  +     at 
sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:245)
  +     at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:220)
  +     at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:122)
  +     at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker_Stub.invoke(Unknown 
Source)
  +     at 
org.jboss.ejb.plugins.jrmp.interfaces.StatefulSessionProxy.invoke(StatefulSessionProxy.java:186)
  +     at $Proxy1.echo(Unknown Source)
  +     at SessionClient.main(SessionClient.java:93)
   
  -        java.lang.SecurityException: Illegal access exception
  -java.rmi.RemoteException: checkSecurityAssociation; nested exception is:
  -        java.lang.SecurityException: Illegal access exception
  -java.lang.SecurityException: Illegal access exception
  -        at 
sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:245)
  -        at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:220)
  -        at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:122)
  -        at 
org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker_Stub.invokeHome(Unknown Source)
  -        at 
org.jboss.ejb.plugins.jrmp.interfaces.HomeProxy.invoke(HomeProxy.java:248)
  -        at $Proxy0.create(Unknown Source)
  -        at SessionClient.main(SessionClient.java:74)
  -
       --- Server console:
       [JAASSecurity] User 'stark' authenticated.
       [JAASSecurity] User 'stark' authenticated.
  -    [StatelessSession] Illegal access, principal=stark
  -    </computeroutput>
  +    [StatelessSession] Illegal access, principal=stark method=create
  +    [StatefulSession] StatefulSessionBean.ejbCreate() called
  +    [StatefulSession] StatefulSessionBean.noop
  +    [StatefulSession] StatefulSessionBean.noop, callerPrincipal=stark
  +    [StatefulSession] Illegal access, principal=stark method=echo
  +    [StatefulSession] TRANSACTION ROLLBACK EXCEPTION:checkSecurityAssociation; 
nested exception is:
  +        java.lang.SecurityException: Illegal access exception; nested exception is:
  +        java.rmi.RemoteException: checkSecurityAssociation; nested exception is:
  +        java.lang.SecurityException: Illegal access exception
  +    [StatefulSession] java.rmi.RemoteException: checkSecurityAssociation; nested 
exception is:
  +    [StatefulSession]       java.lang.SecurityException: Illegal access exception
  +    [StatefulSession] java.lang.SecurityException: Illegal access exception
  +    [StatefulSession]       at 
org.jboss.ejb.plugins.SecurityInterceptor.checkSecurityAssociation(SecurityInterceptor.java:229)
  +    [StatefulSession]       at 
org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:169)
  +    [StatefulSession]       at 
org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invoke(StatefulSessionInstanceInterceptor.java:209)
  +    [StatefulSession]       at 
org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxInterceptorCMT.java:133)
  +    [StatefulSession]       at 
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions (TxInterceptorCMT.java:263)
  +    [StatefulSession]       at 
org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:99)
  +    [StatefulSession]       at 
org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:195)
  +    [StatefulSession]       at 
org.jboss.ejb.StatefulSessionContainer.invoke(StatefulSessionContainer.java:326)
  +    [StatefulSession]       at 
org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPContainerInvoker.java:392)
  +    [StatefulSession]       at java.lang.reflect.Method.invoke(Native Method)
  +    [StatefulSession]       at 
sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:241)
  +    [StatefulSession]       at sun.rmi.transport.Transport$1.run(Transport.java:142)
  +    [StatefulSession]       at java.security.AccessController.doPrivileged(Native 
Method)
  +    [StatefulSession]       at 
sun.rmi.transport.Transport.serviceCall(Transport.java:139)
  +    [StatefulSession]       at 
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:443)
  +    [StatefulSession]       at 
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:643)
  +    [StatefulSession]       at java.lang.Thread.run(Thread.java:484)
  +
  +]]></computeroutput>
                                                </literallayout>    
                                        </step>    
                                        <step>    
                                                <para>Alright, seems secure. Let's try 
user scott with an invalid password: </para>    
                                                <literallayout>
  -                                                     <computeroutput>    --- Client:
  +                                                     <computeroutput><![CDATA[
  +    --- Client:
       howto-jaas 1137>java 
-Djava.security.auth.login.config=file://${jboss_home}/client/auth.conf SessionClient 
scott badpass
  -    Created LoginContext
  -    Found StatelessSessionHome
  -    java.rmi.ServerException: RemoteException occurred in server thread; nested 
exception is:
  -        java.rmi.RemoteException: checkSecurityAssociation; nested exception is:
  + Created LoginContext
  + Found StatelessSessionHome
  + java.rmi.ServerException: RemoteException occurred in server thread; nested 
exception is:
  +     java.rmi.RemoteException: checkSecurityAssociation; nested exception is:
  +     java.lang.SecurityException: Authentication exception
  + java.rmi.RemoteException: checkSecurityAssociation; nested exception is:
  +     java.lang.SecurityException: Authentication exception
  + java.lang.SecurityException: Authentication exception
  +     at 
sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:245)
  +     at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:220)
  +     at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:122)
  +     at 
org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker_Stub.invokeHome(Unknown Source)
  +     at org.jboss.ejb.plugins.jrmp.interfaces.HomeProxy.invoke(HomeProxy.java:248)
  +     at $Proxy0.create(Unknown Source)
  +     at SessionClient.main(SessionClient.java:74)
  + Found StatefulSessionHome
  + java.rmi.ServerException: RemoteException occurred in server thread; nested 
exception is:
  +     javax.transaction.TransactionRolledbackException: checkSecurityAssociation; 
nested exception is:
  +     java.lang.SecurityException: Authentication exception; nested exception is:
  +     java.rmi.RemoteException: checkSecurityAssociation; nested exception is:
  +     java.lang.SecurityException: Authentication exception
  + javax.transaction.TransactionRolledbackException: checkSecurityAssociation; nested 
exception is:
  +     java.lang.SecurityException: Authentication exception; nested exception is:
  +     java.rmi.RemoteException: checkSecurityAssociation; nested exception is:
  +     java.lang.SecurityException: Authentication exception
  + java.rmi.RemoteException: checkSecurityAssociation; nested exception is:
  +     java.lang.SecurityException: Authentication exception
  + java.lang.SecurityException: Authentication exception
  +     at 
sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:245)
  +     at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:220)
  +     at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:122)
  +     at 
org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker_Stub.invokeHome(Unknown Source)
  +     at org.jboss.ejb.plugins.jrmp.interfaces.HomeProxy.invoke(HomeProxy.java:248)
  +     at $Proxy0.create(Unknown Source)
  +     at SessionClient.main(SessionClient.java:89)
   
  -        java.lang.SecurityException: Authentication exception
  -    java.rmi.RemoteException: checkSecurityAssociation; nested exception is:
  -        java.lang.SecurityException: Authentication exception
  -    java.lang.SecurityException: Authentication exception
  -        at 
sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:245)
  -        at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:220)
  -        at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:122)
  -        at 
org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker_Stub.invokeHome(Unknown Source)
  -        at 
org.jboss.ejb.plugins.jrmp.interfaces.HomeProxy.invoke(HomeProxy.java:248)
  -        at $Proxy0.create(Unknown Source)
  -        at SessionClient.main(SessionClient.java:74)
  -
       --- Server console:
  -    [JAASSecurity] Bad password.
  +    [StatelessSession]     [JAASSecurity] Bad password.
       [StatelessSession] javax.security.auth.login.FailedLoginException: Password 
Incorrect/Password Required
  -    [StatelessSession]      at 
org.jboss.security.plugins.AbstractServerLoginModule.login(AbstractServerLoginModule.java:141)
  -    [StatelessSession]      at 
org.jboss.security.plugins.samples.JaasServerLoginModule.login(JaasServerLoginModule.java:94)
  +    [StatelessSession]      at 
org.jboss.security.plugins.samples.UsernamePasswordLoginModule.login(UsernamePasswordLoginModule.java:86)
  +    [StatelessSession]      at 
org.jboss.security.plugins.samples.JaasServerLoginModule.login(JaasServerLoginModule.java:105)
       [StatelessSession]      at java.lang.reflect.Method.invoke(Native Method)
       [StatelessSession]      at 
javax.security.auth.login.LoginContext.invoke(LoginContext.java:595)
       [StatelessSession]      at 
javax.security.auth.login.LoginContext.access$000(LoginContext.java:125)
  @@ -1011,14 +1131,14 @@
       [StatelessSession]      at java.security.AccessController.doPrivileged(Native 
Method)
       [StatelessSession]      at 
javax.security.auth.login.LoginContext.invokeModule(LoginContext.java:528)
       [StatelessSession]      at 
javax.security.auth.login.LoginContext.login(LoginContext.java:449)
  -    [StatelessSession]      at 
org.jboss.security.plugins.JaasSecurityManager.defaultLogin(JaasSecurityManager.java:291)
  -    [StatelessSession]      at 
org.jboss.security.plugins.JaasSecurityManager.authenticate(JaasSecurityManager.java:260)
  -    [StatelessSession]      at 
org.jboss.security.plugins.JaasSecurityManager.isValid(JaasSecurityManager.java:149)
  -    [StatelessSession]      at 
org.jboss.ejb.plugins.SecurityInterceptor.checkSecurityAssociation(SecurityInterceptor.java:196)
  -    [StatelessSession]      at 
org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:131)
  +    [StatelessSession]      at 
org.jboss.security.plugins.JaasSecurityManager.defaultLogin(JaasSecurityManager.java:332)
  +    [StatelessSession]      at 
org.jboss.security.plugins.JaasSecurityManager.authenticate(JaasSecurityManager.java:301)
  +    [StatelessSession]      at 
org.jboss.security.plugins.JaasSecurityManager.isValid(JaasSecurityManager.java:193)
  +    [StatelessSession]      at 
org.jboss.ejb.plugins.SecurityInterceptor.checkSecurityAssociation(SecurityInterceptor.java:209)
  +    [StatelessSession]      at 
org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:144)
       [StatelessSession]      at 
org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:106)
       [StatelessSession]      at 
org.jboss.ejb.StatelessSessionContainer.invokeHome(StatelessSessionContainer.java:253)
  -    [StatelessSession]      at 
org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invokeHome(JRMPContainerInvoker.java:358)
  +    [StatelessSession]      at 
org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invokeHome(JRMPContainerInvoker.java:369)
       [StatelessSession]      at java.lang.reflect.Method.invoke(Native Method)
       [StatelessSession]      at 
sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:241)
       [StatelessSession]      at sun.rmi.transport.Transport$1.run(Transport.java:142)
  @@ -1028,13 +1148,47 @@
       [StatelessSession]      at 
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:643)
       [StatelessSession]      at java.lang.Thread.run(Thread.java:484)
       [StatelessSession] Authentication exception, principal=scott
  -    </computeroutput>
  +    [StatefulSession]     [JAASSecurity] Bad password.
  +    [StatefulSession] javax.security.auth.login.FailedLoginException: Password 
Incorrect/Password Required
  +    [StatefulSession]       at 
org.jboss.security.plugins.samples.UsernamePasswordLoginModule.login(UsernamePasswordLoginModule.java:86)
  +    [StatefulSession]       at 
org.jboss.security.plugins.samples.JaasServerLoginModule.login(JaasServerLoginModule.java:105)
  +    [StatefulSession]       at java.lang.reflect.Method.invoke(Native Method)
  +    [StatefulSession]       at 
javax.security.auth.login.LoginContext.invoke(LoginContext.java:595)
  +    [StatefulSession]       at 
javax.security.auth.login.LoginContext.access$000(LoginContext.java:125)
  +    [StatefulSession]       at 
javax.security.auth.login.LoginContext$3.run(LoginContext.java:531)
  +    [StatefulSession]       at java.security.AccessController.doPrivileged(Native 
Method)
  +    [StatefulSession]       at 
javax.security.auth.login.LoginContext.invokeModule(LoginContext.java:528)
  +    [StatefulSession]       at 
javax.security.auth.login.LoginContext.login(LoginContext.java:449)
  +    [StatefulSession]       at 
org.jboss.security.plugins.JaasSecurityManager.defaultLogin(JaasSecurityManager.java:332)
  +    [StatefulSession]       at 
org.jboss.security.plugins.JaasSecurityManager.authenticate(JaasSecurityManager.java:301)
  +    [StatefulSession]       at 
org.jboss.security.plugins.JaasSecurityManager.isValid(JaasSecurityManager.java:193)
  +    [StatefulSession]       at 
org.jboss.ejb.plugins.SecurityInterceptor.checkSecurityAssociation(SecurityInterceptor.java:209)
  +    [StatefulSession]       at 
org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:144)
  +    [StatefulSession]       at 
org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invokeHome(StatefulSessionInstanceInterceptor.java:99)
  +    [StatefulSession]       at 
org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxInterceptorCMT.java:135)
  +    [StatefulSession]       at 
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:263)
  +    [StatefulSession]       at 
org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:86)
  +    [StatefulSession]       at 
org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:106)
  +    [StatefulSession]       at 
org.jboss.ejb.StatefulSessionContainer.invokeHome(StatefulSessionContainer.java:311)
  +    [StatefulSession]       at 
org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invokeHome(JRMPContainerInvoker.java:369)
  +    [StatefulSession]       at java.lang.reflect.Method.invoke(Native Method)
  +    [StatefulSession]       at 
sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:241)
  +    [StatefulSession]       at sun.rmi.transport.Transport$1.run(Transport.java:142)
  +    [StatefulSession]       at java.security.AccessController.doPrivileged(Native 
Method)
  +    [StatefulSession]       at 
sun.rmi.transport.Transport.serviceCall(Transport.java:139)
  +    [StatefulSession]       at 
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:443)
  +    [StatefulSession]       at 
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:643)
  +    [StatefulSession]       at java.lang.Thread.run(Thread.java:484)
  +    [StatefulSession] Authentication exception, principal=scott
  +    ...
  +]]></computeroutput>
                                                </literallayout>    
                                        </step>    
                                </substeps>
                        </step>
                </procedure>
        </section>
  +
        <section>
                <title>Wrap Up</title>
                <para>This has been an introduction to the steps required to enable 
security
  
  
  

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to