1 2 Previous Next 20 Replies Latest reply on Dec 15, 2007 8:04 PM by anil.saldhana

    ant tests-jacc-security

    anil.saldhana

      Need for validation of local workspaces against hudson for the JACC tests.

      1) Update your AS5 workspace.
      2) Do not start JBoss. The test target will do that.
      3) Add the following to testsuite/local.properties (remember it is node + digit zero)
      
      node0=your_ip_address
      
      4) ant tests-jacc-security
      
      This target will start the JBoss test server with jacc enabled and run the tests.
      


        • 1. Re: ant tests-jacc-security
          sguilhen

          These are my results:

          tests-jacc-security:
           [echo] creating jacc config
           [copy] Copying 199 files to /opt/workspace/JBAS-Trunk/build/output/jboss-5.0.0.Beta3/server/jacc
           [echo] Overwriting config descriptors
           [copy] Copying 5 files to /opt/workspace/JBAS-Trunk/build/output/jboss-5.0.0.Beta3/server/jacc
          [server:start] Starting server "jacc" with command:
          [server:start] /opt/jdk1.5.0_13/bin/java -cp /opt/workspace/JBAS-Trunk/build/output/jboss-5.0.0.Beta3/bin/run.jar:/opt/java/lib/tools.jar -Xmx256m -Djava.net.preferIPv4Stack=true org.jboss.Main -c jacc -b 192.168.1.103
           [delete] Deleting directory /opt/workspace/JBAS-Trunk/build/output/jboss-5.0.0.Beta3/server/jacc/deploy/ROOT.war
           [echo] Starting patternset=jacc.includes config=JACC
           [junit] Running org.jboss.test.cmp2.audit.test.AuditUnitTestCase
           [junit] Tests run: 7, Failures: 0, Errors: 0, Time elapsed: 9.443 sec
           [junit] Running org.jboss.test.cmp2.cmrstress.CMRStressTestCase
           [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 3.729 sec
           [junit] Running org.jboss.test.cmp2.cmrtransaction.test.CMRTransactionUnitTestCase
           [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 1.561 sec
           [junit] Running org.jboss.test.cmp2.commerce.CompleteUnitTestCase
           [junit] Tests run: 32, Failures: 0, Errors: 0, Time elapsed: 9.166 sec
           [junit] Running org.jboss.test.cmp2.perf.test.PerfUnitTestCase
           [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 5.985 sec
           [junit] Running org.jboss.test.cmp2.relationship.RelationshipUnitTestCase
           [junit] Tests run: 21, Failures: 0, Errors: 0, Time elapsed: 4.59 sec
           [junit] Running org.jboss.test.cmp2.simple.SimpleUnitTestCase
           [junit] Tests run: 44, Failures: 0, Errors: 0, Time elapsed: 3.182 sec
           [junit] Running org.jboss.test.jacc.test.CallerInRoleUnitTestCase
           [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 1.34 sec
           [junit] Running org.jboss.test.jacc.test.EJBSpecUnitTestCase
           [junit] Tests run: 23, Failures: 0, Errors: 3, Time elapsed: 29.041 sec
           [junit] Test org.jboss.test.jacc.test.EJBSpecUnitTestCase FAILED
           [junit] Running org.jboss.test.jacc.test.FormAuthUnitTestCase
           [junit] Tests run: 0, Failures: 0, Errors: 1, Time elapsed: 1.074 sec
           [junit] Test org.jboss.test.jacc.test.FormAuthUnitTestCase FAILED
           [junit] Running org.jboss.test.jacc.test.JMXConsoleUnitTestCase
           [junit] Tests run: 3, Failures: 0, Errors: 3, Time elapsed: 0.307 sec
           [junit] Test org.jboss.test.jacc.test.JMXConsoleUnitTestCase FAILED
           [junit] Running org.jboss.test.jacc.test.MissingMethodUnitTestCase
           [junit] Tests run: 2, Failures: 0, Errors: 1, Time elapsed: 1.243 sec
           [junit] Test org.jboss.test.jacc.test.MissingMethodUnitTestCase FAILED
           [junit] Running org.jboss.test.jacc.test.WebConstraintsUnitTestCase
           [junit] Tests run: 4, Failures: 0, Errors: 4, Time elapsed: 10.831 sec
           [junit] Test org.jboss.test.jacc.test.WebConstraintsUnitTestCase FAILED
           [junit] Running org.jboss.test.jacc.test.WebIntegrationUnitTestCase
           [junit] Tests run: 37, Failures: 2, Errors: 30, Time elapsed: 14.13 sec
           [junit] Test org.jboss.test.jacc.test.WebIntegrationUnitTestCase FAILED
           [junit] Running org.jboss.test.jacc.test.WebPermissionsValidationTestCase
           [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 1.693 sec
           [junit] Running org.jboss.test.web.test.UserInRoleUnitTestCase
           [junit] Tests run: 4, Failures: 0, Errors: 3, Time elapsed: 1.036 sec
           [junit] Test org.jboss.test.web.test.UserInRoleUnitTestCase FAILED
           [junit] Running org.jboss.test.webservice.jbws309.JBWS309TestCase
           [junit] Tests run: 5, Failures: 0, Errors: 5, Time elapsed: 3.45 sec
           [junit] Test org.jboss.test.webservice.jbws309.JBWS309TestCase FAILED
          [server:stop] Shutting down server: jacc
          


          • 2. Re: ant tests-jacc-security
            anil.saldhana

            Mine...

            asaldhana~/jboss-5.0/jboss-head/testsuite>ant tests-jacc-security
            Buildfile: build.xml
            tests-jacc-security:
             .0\jboss-head\build\output\jboss-5.0.0.Beta3\bin\run.jar;c:\java\jdk1.5.0_14\lib
            \tools.jar -Xmx256m -Djava.net.preferIPv4Stack=true org.jboss.Main -c jacc -b
            10.xxx.xxx.xxx
             [delete] Deleting directory C:\cygwin\home\asaldhana\jboss-5.0\jboss-head\bui
            ld\output\jboss-5.0.0.Beta3\server\jacc\deploy\ROOT.war
             [echo] Starting patternset=jacc.includes config=JACC
             [junit] Running org.jboss.test.cmp2.audit.test.AuditUnitTestCase
             [junit] Tests run: 7, Failures: 0, Errors: 0, Time elapsed: 26 sec
             [junit] Running org.jboss.test.cmp2.cmrstress.CMRStressTestCase
             [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 7.782 sec
             [junit] Running org.jboss.test.cmp2.cmrtransaction.test.CMRTransactionUnitTe
            stCase
             [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 1.578 sec
             [junit] Running org.jboss.test.cmp2.commerce.CompleteUnitTestCase
             [junit] Tests run: 32, Failures: 0, Errors: 0, Time elapsed: 9.437 sec
             [junit] Running org.jboss.test.cmp2.perf.test.PerfUnitTestCase
             [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 4.781 sec
             [junit] Running org.jboss.test.cmp2.relationship.RelationshipUnitTestCase
             [junit] Tests run: 21, Failures: 0, Errors: 0, Time elapsed: 5.781 sec
             [junit] Running org.jboss.test.cmp2.simple.SimpleUnitTestCase
             [junit] Tests run: 44, Failures: 0, Errors: 0, Time elapsed: 3.219 sec
             [junit] Running org.jboss.test.jacc.test.CallerInRoleUnitTestCase
             [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 1.454 sec
             [junit] Running org.jboss.test.jacc.test.EJBSpecUnitTestCase
             [junit] Tests run: 23, Failures: 0, Errors: 3, Time elapsed: 41.328 sec
             [junit] Test org.jboss.test.jacc.test.EJBSpecUnitTestCase FAILED
             [junit] Running org.jboss.test.jacc.test.FormAuthUnitTestCase
             [junit] Tests run: 5, Failures: 2, Errors: 0, Time elapsed: 18.297 sec
             [junit] Test org.jboss.test.jacc.test.FormAuthUnitTestCase FAILED
             [junit] Running org.jboss.test.jacc.test.JMXConsoleUnitTestCase
             [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 11.594 sec
             [junit] Running org.jboss.test.jacc.test.MissingMethodUnitTestCase
             [junit] Tests run: 2, Failures: 0, Errors: 1, Time elapsed: 2.469 sec
             [junit] Test org.jboss.test.jacc.test.MissingMethodUnitTestCase FAILED
             [junit] Running org.jboss.test.jacc.test.WebConstraintsUnitTestCase
             [junit] Tests run: 4, Failures: 0, Errors: 3, Time elapsed: 11.843 sec
             [junit] Test org.jboss.test.jacc.test.WebConstraintsUnitTestCase FAILED
             [junit] Running org.jboss.test.jacc.test.WebIntegrationUnitTestCase
             [junit] Tests run: 37, Failures: 2, Errors: 4, Time elapsed: 28.859 sec
             [junit] Test org.jboss.test.jacc.test.WebIntegrationUnitTestCase FAILED
             [junit] Running org.jboss.test.jacc.test.WebPermissionsValidationTestCase
             [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 2.344 sec
             [junit] Running org.jboss.test.web.test.UserInRoleUnitTestCase
             [junit] Tests run: 4, Failures: 0, Errors: 1, Time elapsed: 1.953 sec
             [junit] Test org.jboss.test.web.test.UserInRoleUnitTestCase FAILED
             [junit] Running org.jboss.test.webservice.jbws309.JBWS309TestCase
             [junit] Tests run: 5, Failures: 0, Errors: 2, Time elapsed: 28.375 sec
             [junit] Test org.jboss.test.webservice.jbws309.JBWS309TestCase FAILED
            [server:stop] Shutting down server: jacc
            [server:stop] shutdownTimeout will be=45
            


            I do not get why 95% of Jacc tests are failing on hudson (IP or no IP).

            • 3. Re: ant tests-jacc-security
              mmoyses

              Results:

              [mmoyses@mmoyses testsuite]$ ant tests-jacc-security
              Buildfile: build.xml
              Overriding previous definition of reference to apache.commons.classpath
              Overriding previous definition of reference to sax.classpath
              Overriding previous definition of reference to xdoclet.task.classpath
              Overriding previous definition of reference to gjt.jpl-util.classpath
              Overriding previous definition of reference to opennms.joesnmp.classpath
              Overriding previous definition of reference to jacorb.idl.classpath
              Overriding previous definition of reference to sleepycat.classpath
              Overriding previous definition of reference to apache.tomcat55.classpath
              Overriding previous definition of reference to trove.classpath
              Overriding previous definition of reference to qdox.classpath
              Overriding previous definition of reference to javassist.classpath
              Overriding previous definition of reference to hibernate3.classpath
              Overriding previous definition of reference to odmg.classpath
              Overriding previous definition of reference to cglib.classpath
              Overriding previous definition of reference to ejb3-persistence.classpath
              Overriding previous definition of reference to spring.classpath
              Overriding previous definition of reference to apache.ant.classpath
              Overriding previous definition of reference to jboss.test.classpath
              
              tests-jacc-security:
               [echo] creating jacc config
               [copy] Copying 198 files to /opt/workspace/trunk/build/output/jboss-5.0.0.Beta3/server/jacc
               [echo] Overwriting config descriptors
               [copy] Copying 5 files to /opt/workspace/trunk/build/output/jboss-5.0.0.Beta3/server/jacc
              [server:start] Starting server "jacc" with command:
              [server:start] /opt/jdk1.5.0_14/bin/java -cp /opt/workspace/trunk/build/output/jboss-5.0.0.Beta3/bin/run.jar:/opt/java/lib/tools.jar -Xmx256m -Djava.net.preferIPv4Stack=true org.jboss.Main -c jacc -b xxx.xxx.xxx.xxx
               [delete] Deleting directory /opt/workspace/trunk/build/output/jboss-5.0.0.Beta3/server/jacc/deploy/ROOT.war
               [mkdir] Created dir: /opt/workspace/trunk/testsuite/output/log
               [echo] Starting patternset=jacc.includes config=JACC
               [junit] Running org.jboss.test.cmp2.audit.test.AuditUnitTestCase
               [junit] Tests run: 7, Failures: 0, Errors: 0, Time elapsed: 10.163 sec
               [junit] Running org.jboss.test.cmp2.cmrstress.CMRStressTestCase
               [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 3.526 sec
               [junit] Running org.jboss.test.cmp2.cmrtransaction.test.CMRTransactionUnitTestCase
               [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 1.534 sec
               [junit] Running org.jboss.test.cmp2.commerce.CompleteUnitTestCase
               [junit] Tests run: 32, Failures: 0, Errors: 0, Time elapsed: 9.56 sec
               [junit] Running org.jboss.test.cmp2.perf.test.PerfUnitTestCase
               [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 5.081 sec
               [junit] Running org.jboss.test.cmp2.relationship.RelationshipUnitTestCase
               [junit] Tests run: 21, Failures: 0, Errors: 0, Time elapsed: 4.995 sec
               [junit] Running org.jboss.test.cmp2.simple.SimpleUnitTestCase
               [junit] Tests run: 44, Failures: 0, Errors: 0, Time elapsed: 3.593 sec
               [junit] Running org.jboss.test.jacc.test.CallerInRoleUnitTestCase
               [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 1.561 sec
               [junit] Running org.jboss.test.jacc.test.EJBSpecUnitTestCase
               [junit] Tests run: 23, Failures: 0, Errors: 3, Time elapsed: 30.77 sec
               [junit] Test org.jboss.test.jacc.test.EJBSpecUnitTestCase FAILED
               [junit] Running org.jboss.test.jacc.test.FormAuthUnitTestCase
               [junit] Tests run: 5, Failures: 2, Errors: 0, Time elapsed: 6.099 sec
               [junit] Test org.jboss.test.jacc.test.FormAuthUnitTestCase FAILED
               [junit] Running org.jboss.test.jacc.test.JMXConsoleUnitTestCase
               [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 3.958 sec
               [junit] Running org.jboss.test.jacc.test.MissingMethodUnitTestCase
               [junit] Tests run: 2, Failures: 0, Errors: 1, Time elapsed: 1.68 sec
               [junit] Test org.jboss.test.jacc.test.MissingMethodUnitTestCase FAILED
               [junit] Running org.jboss.test.jacc.test.WebConstraintsUnitTestCase
               [junit] Tests run: 4, Failures: 0, Errors: 3, Time elapsed: 11.615 sec
               [junit] Test org.jboss.test.jacc.test.WebConstraintsUnitTestCase FAILED
               [junit] Running org.jboss.test.jacc.test.WebIntegrationUnitTestCase
               [junit] Tests run: 37, Failures: 2, Errors: 4, Time elapsed: 16.844 sec
               [junit] Test org.jboss.test.jacc.test.WebIntegrationUnitTestCase FAILED
               [junit] Running org.jboss.test.jacc.test.WebPermissionsValidationTestCase
               [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 1.362 sec
               [junit] Running org.jboss.test.web.test.UserInRoleUnitTestCase
               [junit] Tests run: 4, Failures: 0, Errors: 1, Time elapsed: 1.784 sec
               [junit] Test org.jboss.test.web.test.UserInRoleUnitTestCase FAILED
               [junit] Running org.jboss.test.webservice.jbws309.JBWS309TestCase
               [junit] Tests run: 5, Failures: 0, Errors: 2, Time elapsed: 11.472 sec
               [junit] Test org.jboss.test.webservice.jbws309.JBWS309TestCase FAILED
              [server:stop] Shutting down server: jacc
              [server:stop] Shutting down server: /opt/jdk1.5.0_14/bin/java -cp /opt/workspace/trunk/build/output/jboss-5.0.0.Beta3/bin/shutdown.jar:/opt/workspace/trunk/build/output/jboss-5.0.0.Beta3/client/jbossall-client.jar:/opt/workspace/trunk/build/output/jboss-5.0.0.Beta3/client/jboss-common.jar org.jboss.Shutdown --server jnp://xxx.xxx.xxx.xxx:1099 --shutdown
              [server:stop] shutdownTimeout will be=45
              
              BUILD SUCCESSFUL
              Total time: 4 minutes 19 seconds
              


              • 4. Re: ant tests-jacc-security
                anil.saldhana

                The problem with the hudson environment is that the permissions are getting created but not available later....

                2007-12-13 15:37:28,869 TRACE [org.jboss.security.jacc.DelegatingPolicy] implies, domain=ProtectionDomain (vfsfile:/qa/services/hudson/hudson_workspace/workspace/JBoss-AS-5.0.x-TestSuite-sun15-noip/trunk/testsuite/output/lib/cmp2-audit.jar <no signer certificates>)
                 null
                 (principals org.jboss.security.SimplePrincipal "user")
                
                 java.security.Permissions@21dd63a8 (
                 (java.util.PropertyPermission java.version read)
                 (java.util.PropertyPermission java.vm.name read)
                 (java.util.PropertyPermission java.vm.vendor read)
                 (java.util.PropertyPermission os.name read)
                 (java.util.PropertyPermission java.vendor.url read)
                 (java.util.PropertyPermission java.vm.specification.vendor read)
                 (java.util.PropertyPermission java.specification.vendor read)
                 (java.util.PropertyPermission os.version read)
                 (java.util.PropertyPermission java.specification.name read)
                 (java.util.PropertyPermission java.class.version read)
                 (java.util.PropertyPermission file.separator read)
                 (java.util.PropertyPermission java.vm.version read)
                 (java.util.PropertyPermission os.arch read)
                 (java.util.PropertyPermission java.vm.specification.name read)
                 (java.util.PropertyPermission java.vm.specification.version read)
                 (java.util.PropertyPermission java.specification.version read)
                 (java.util.PropertyPermission java.vendor read)
                 (java.util.PropertyPermission path.separator read)
                 (java.util.PropertyPermission line.separator read)
                 (java.net.SocketPermission localhost:1024- listen,resolve)
                 (java.net.SocketPermission localhost:1024- listen,resolve)
                 (java.lang.RuntimePermission stopThread)
                )
                
                , permission=(javax.security.jacc.EJBMethodPermission AuditEJB create,LocalHome,java.lang.String)[LocalHome:create(java.lang.String)]
                2007-12-13 15:37:28,869 TRACE [org.jboss.security.jacc.DelegatingPolicy] implies javax.security.auth.Subject.container: Subject:
                 Principal: audituser1
                 Principal: Roles(members:user)
                
                2007-12-13 15:37:28,869 TRACE [org.jboss.security.jacc.DelegatingPolicy] No PolicyContext found for contextID=cmp2-audit.jar
                2007-12-13 15:37:28,869 TRACE [org.jboss.security.jacc.DelegatingPolicy] implied=false
                2007-12-13 15:37:28,869 TRACE [org.jboss.security.authorization.modules.ejb.EJBJACCPolicyModuleDelegate] EJB Jacc Delegate:Denied: (javax.security.jacc.EJBMethodPermission AuditEJB create,LocalHome,java.lang.String)[LocalHome:create(java.lang.String)], caller=Subject:
                 Principal: audituser1
                 Principal: Roles(members:user)
                
                2007-12-13 15:37:28,869 TRACE [org.jboss.security.plugins.authorization.JBossAuthorizationContext] REQUIRED failed for Name=org.jboss.security.authorization.modules.JACCAuthorizationModule:subject=Subject:
                 Principal: audituser1
                 Principal: Roles(members:user)
                
                2007-12-13 15:37:28,870 TRACE [org.jboss.security.plugins.authorization.JBossAuthorizationContext] Error in authorize:
                org.jboss.security.authorization.AuthorizationException: Authorization Failed:
                 at org.jboss.security.plugins.authorization.JBossAuthorizationContext.invokeAuthorize(JBossAuthorizationContext.java:234)
                 at org.jboss.security.plugins.authorization.JBossAuthorizationContext.access$000(JBossAuthorizationContext.java:63)
                 at org.jboss.security.plugins.authorization.JBossAuthorizationContext$1.run(JBossAuthorizationContext.java:123)
                 at java.security.AccessController.doPrivileged(Native Method)
                 at org.jboss.security.plugins.authorization.JBossAuthorizationContext.authorize(JBossAuthorizationContext.java:119)
                 at org.jboss.security.plugins.JBossAuthorizationManager.authorize(JBossAuthorizationManager.java:117)
                 at org.jboss.security.integration.ejb.EJBAuthorizationHelper.authorize(EJBAuthorizationHelper.java:97)
                 at org.jboss.ejb.plugins.SecurityInterceptor.checkSecurityContext(SecurityInterceptor.java:343)
                 at org.jboss.ejb.plugins.SecurityInterceptor.invokeH
                


                The key is:
                [org.jboss.security.jacc.DelegatingPolicy] No PolicyContext found for contextID=cmp2-audit.jar
                


                • 5. Re: ant tests-jacc-security
                  anil.saldhana

                  Same thing on local workspace would show the following:

                  2007-12-13 17:03:14,559 TRACE [org.jboss.security.jacc.DelegatingPolicy] implies, domain=ProtectionDomain (vfsfile:/C:/cygwin/home/asaldhana/jboss-5.0/jboss-head/testsuite/output/lib/cmp2-audit.jar <no signer certificates>)
                   null
                   (principals org.jboss.security.SimplePrincipal "user")
                  
                   java.security.Permissions@1d1d5d2 (
                   (javax.security.jacc.EJBMethodPermission AuditSessionEJB updateAuditCheck,Remote,java.lang.String,java.lang.String,long,long)[Remote:updateAuditCheck(java.lang.String,java.lang.String,long,long)]
                   (javax.security.jacc.EJBMethodPermission AuditSessionEJB updateAuditChangedNames,Remote,java.lang.String,java.lang.String)[Remote:updateAuditChangedNames(java.lang.String,java.lang.String)]
                   (javax.security.jacc.EJBMethodPermission AuditSessionEJB remove,Remote,)[Remote:remove()]
                   (javax.security.jacc.EJBMethodPermission AuditSessionEJB createAuditMappedCheck,Remote,java.lang.String,java.lang.String,long,long)[Remote:createAuditMappedCheck(java.lang.String,java.lang.String,long,long)]
                   (javax.security.jacc.EJBMethodPermission AuditSessionEJB createAuditCheck,Remote,java.lang.String,java.lang.String,long,long)[Remote:createAuditCheck(java.lang.String,java.lang.String,long,long)]
                   (javax.security.jacc.EJBMethodPermission AuditSessionEJB updateAudit,Remote,java.lang.String,java.lang.String)[Remote:updateAudit(java.lang.String,java.lang.String)]
                   (javax.security.jacc.EJBMethodPermission AuditSessionEJB getPrimaryKey,Remote,)[Remote:getPrimaryKey()]
                   (javax.security.jacc.EJBMethodPermission AuditSessionEJB remove,Home,javax.ejb.Handle)[Home:remove(javax.ejb.Handle)]
                   (javax.security.jacc.EJBMethodPermission AuditSessionEJB updateAuditMappedCheck,Remote,java.lang.String,java.lang.String,long,long)[Remote:updateAuditMappedCheck(java.lang.String,java.lang.String,long,long)]
                   (javax.security.jacc.EJBMethodPermission AuditSessionEJB create,Home,)[Home:create()]
                   (javax.security.jacc.EJBMethodPermission AuditSessionEJB getEJBMetaData,Home,)[Home:getEJBMetaData()]
                   (javax.security.jacc.EJBMethodPermission AuditSessionEJB createAuditChangedNames,Remote,java.lang.String)[Remote:createAuditChangedNames(java.lang.String)]
                   (javax.security.jacc.EJBMethodPermission AuditSessionEJB remove,Home,java.lang.Object)[Home:remove(java.lang.Object)]
                   (javax.security.jacc.EJBMethodPermission AuditSessionEJB getHomeHandle,Home,)[Home:getHomeHandle()]
                   (javax.security.jacc.EJBMethodPermission AuditSessionEJB updateAuditChangedNamesCheck,Remote,java.lang.String,java.lang.String,long,long)[Remote:updateAuditChangedNamesCheck(java.lang.String,java.lang.String,long,long)]
                   (javax.security.jacc.EJBMethodPermission AuditSessionEJB createAuditChangedNamesCheck,Remote,java.lang.String,java.lang.String,long,long)[Remote:createAuditChangedNamesCheck(java.lang.String,java.lang.String,long,long)]
                   (javax.security.jacc.EJBMethodPermission AuditSessionEJB createAudit,Remote,java.lang.String)[Remote:createAudit(java.lang.String)]
                   (javax.security.jacc.EJBMethodPermission AuditSessionEJB isIdentical,Remote,javax.ejb.EJBObject)[Remote:isIdentical(javax.ejb.EJBObject)]
                   (javax.security.jacc.EJBMethodPermission AuditSessionEJB getEJBHome,Remote,)[Remote:getEJBHome()]
                   (javax.security.jacc.EJBMethodPermission AuditSessionEJB createAuditMapped,Remote,java.lang.String)[Remote:createAuditMapped(java.lang.String)]
                   (javax.security.jacc.EJBMethodPermission AuditSessionEJB createAuditMappedChangedFields,Remote,java.lang.String,java.lang.String,long)[Remote:createAuditMappedChangedFields(java.lang.String,java.lang.String,long)]
                   (javax.security.jacc.EJBMethodPermission AuditSessionEJB getHandle,Remote,)[Remote:getHandle()]
                   (javax.security.jacc.EJBMethodPermission AuditSessionEJB updateAuditMappedChangedFields,Remote,java.lang.String,java.lang.String,java.lang.String,long)[Remote:updateAuditMappedChangedFields(java.lang.String,java.lang.String,java.lang.String,long)]
                   (javax.security.jacc.EJBMethodPermission AuditSessionEJB fullAuditCheck,Remote,java.lang.String,java.lang.String,long,long)[Remote:fullAuditCheck(java.lang.String,java.lang.String,long,long)]
                   (javax.security.jacc.EJBMethodPermission AuditChangedNamesEJB)[*:*()]
                   (javax.security.jacc.EJBMethodPermission AuditEJB)[*:*()]
                   (javax.security.jacc.EJBMethodPermission AuditMappedEJB)[*:*()]
                   (javax.security.jacc.EJBMethodPermission AuditSessionEJB updateAuditMapped,Remote,java.lang.String,java.lang.String)[Remote:updateAuditMapped(java.lang.String,java.lang.String)]
                   (java.util.PropertyPermission java.version read)
                   (java.util.PropertyPermission java.vm.name read)
                   (java.util.PropertyPermission java.vm.vendor read)
                   (java.util.PropertyPermission os.name read)
                   (java.util.PropertyPermission java.vendor.url read)
                   (java.util.PropertyPermission java.vm.specification.vendor read)
                   (java.util.PropertyPermission os.version read)
                   (java.util.PropertyPermission java.specification.vendor read)
                   (java.util.PropertyPermission java.class.version read)
                   (java.util.PropertyPermission java.specification.name read)
                   (java.util.PropertyPermission file.separator read)
                   (java.util.PropertyPermission os.arch read)
                   (java.util.PropertyPermission java.vm.version read)
                   (java.util.PropertyPermission java.vendor read)
                   (java.util.PropertyPermission java.specification.version read)
                   (java.util.PropertyPermission java.vm.specification.version read)
                   (java.util.PropertyPermission java.vm.specification.name read)
                   (java.util.PropertyPermission path.separator read)
                   (java.util.PropertyPermission line.separator read)
                   [AuditChangedNamesEJB,role-ref=user]
                   [AuditMappedEJB,role-ref=user]
                   [AuditEJB,role-ref=user]
                   (java.lang.RuntimePermission stopThread)
                   (java.net.SocketPermission localhost:1024- listen,resolve)
                  )
                  
                  , permission=(javax.security.jacc.EJBMethodPermission AuditEJB create,LocalHome,java.lang.String)[LocalHome:create(java.lang.String)]
                  2007-12-13 17:03:14,559 TRACE [org.jboss.security.jacc.DelegatingPolicy] implies javax.security.auth.Subject.container: Subject:
                   Principal: audituser1
                   Principal: Roles(members:user)
                  
                  2007-12-13 17:03:14,559 TRACE [org.jboss.security.jacc.ContextPolicy] Checking role=user perms=java.security.Permissions@12cfc0f (
                   (javax.security.jacc.EJBMethodPermission AuditMappedEJB)[*:*()]
                   (javax.security.jacc.EJBMethodPermission AuditEJB)[*:*()]
                   (javax.security.jacc.EJBMethodPermission AuditChangedNamesEJB)[*:*()]
                   [AuditChangedNamesEJB,role-ref=user]
                   [AuditMappedEJB,role-ref=user]
                   [AuditEJB,role-ref=user]
                  )
                  
                  2007-12-13 17:03:14,559 TRACE [org.jboss.security.jacc.ContextPolicy] Allowed: permission=(javax.security.jacc.EJBMethodPermission AuditEJB create,LocalHome,java.lang.String)[LocalHome:create(java.lang.String)]
                  2007-12-13 17:03:14,559 TRACE [org.jboss.security.jacc.DelegatingPolicy] implied=true
                  


                  • 6. Re: ant tests-jacc-security
                    anil.saldhana

                    I have pinged Scott to give a second opinion on why the hudson environment is behaving wierdly wrt JACC.

                    • 7. Re: ant tests-jacc-security
                      starksm64

                      I'm seeing a strange deployment problem on some of the tests, like cmp2-audit.jar

                      2007-12-13 19:28:05,755 DEBUG [org.jboss.deployers.vfs.plugins.structure.AbstractVFSDeploymentContext] Error retrieving meta data: name=null suffix=-aop.xml
                      java.io.IOException: Error listing files: /home/svn/JBossHead/jboss-head/build/output/jboss-5.0.0.Beta3/server/jacc/deploy/ROOT.war/WEB-INF
                       at org.jboss.virtual.plugins.context.file.FileHandler.getChildren(FileHandler.java:146)
                      ...
                      2007-12-13 19:28:05,760 WARN [org.jboss.system.server.profileservice.hotdeploy.HDScanner] Failed to process changes
                      org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
                      
                      *** CONTEXTS MISSING DEPENDENCIES: Name -> Dependency{Required State:Actual State}
                      
                      jboss.j2ee:module="cmp2-audit.jar",service=EjbModule
                      
                      vfsfile:/home/svn/JBossHead/jboss-head/testsuite/output/lib/cmp2-audit.jar
                      
                      
                       at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:576)
                       at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:559)
                      
                      


                      so there are definitely some envionrment diffs causing errors. I don't see this error in the JBoss-AS-5.0.x-TestSuite-sun15 run, so I'm trying to figure out what the real failure is there.


                      • 8. Re: ant tests-jacc-security
                        anil.saldhana

                        http://jira.jboss.com/jira/browse/JBAS-3426

                        To get this test to at least run, I had to add the following in testsuite/build.xml under tests-jacc-security

                         <!-- ROOT.war is needed for confirmation that the server has started. But
                        there is a test case "WebIntegrationUnitTestCase" that tries to replace the root
                         context war. So delete the ROOT.war -->
                         <delete dir="${jboss.dist}/server/jacc/deploy/ROOT.war" />
                        


                        This is because to confirm that the server has started for the ant server task, it probably does some kind of check on http "/". Hence the ROOT.war needs to be there for the jacc server to start.

                        The WebIntegrationtestcase tries to install its own root.war which screws up the entire deployment because it is trying to register another deployment with "/" context. Hence the entire test fails to deploy.

                        A catch-22 situation.

                        The issue for me is why is this not seen on local workspaces. :)

                        • 9. Re: ant tests-jacc-security
                          anil.saldhana

                          http://jira.jboss.com/jira/browse/JBAS-5054

                          You seem to be locally reproducing the hudson environment. Can you verify whether u r getting a better run by commenting out the delete of the ROOT.war done in "tests-jacc-security" target?

                          • 10. Re: ant tests-jacc-security
                            anil.saldhana

                            My latest run (windows xp) which is quite similar to Stefan (Fedora) and Marcus (Fedora)....

                             [junit] Running org.jboss.test.cmp2.audit.test.AuditUnitTestCase
                             [junit] Tests run: 7, Failures: 0, Errors: 0, Time elapsed: 27.219 sec
                             [junit] Running org.jboss.test.cmp2.cmrstress.CMRStressTestCase
                             [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 7.328 sec
                             [junit] Running org.jboss.test.cmp2.cmrtransaction.test.CMRTransactionUnitT
                            tCase
                             [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 1.5 sec
                             [junit] Running org.jboss.test.cmp2.commerce.CompleteUnitTestCase
                             [junit] Tests run: 32, Failures: 0, Errors: 0, Time elapsed: 9 sec
                             [junit] Running org.jboss.test.cmp2.perf.test.PerfUnitTestCase
                             [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 5.047 sec
                             [junit] Running org.jboss.test.cmp2.relationship.RelationshipUnitTestCase
                             [junit] Tests run: 21, Failures: 0, Errors: 0, Time elapsed: 6.563 sec
                             [junit] Running org.jboss.test.cmp2.simple.SimpleUnitTestCase
                             [junit] Tests run: 44, Failures: 0, Errors: 0, Time elapsed: 3.266 sec
                             [junit] Running org.jboss.test.jacc.test.CallerInRoleUnitTestCase
                             [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 1.687 sec
                             [junit] Running org.jboss.test.jacc.test.EJBSpecUnitTestCase
                             [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0 sec
                             [junit] Test org.jboss.test.jacc.test.EJBSpecUnitTestCase FAILED (timeout)
                             [junit] Running org.jboss.test.jacc.test.FormAuthUnitTestCase
                             [junit] Tests run: 5, Failures: 2, Errors: 0, Time elapsed: 24.531 sec
                             [junit] Test org.jboss.test.jacc.test.FormAuthUnitTestCase FAILED
                             [junit] Running org.jboss.test.jacc.test.JMXConsoleUnitTestCase
                             [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 3.484 sec
                             [junit] Running org.jboss.test.jacc.test.MissingMethodUnitTestCase
                             [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 2.891 sec
                             [junit] Running org.jboss.test.jacc.test.WebConstraintsUnitTestCase
                             [junit] Tests run: 4, Failures: 0, Errors: 3, Time elapsed: 12.734 sec
                             [junit] Test org.jboss.test.jacc.test.WebConstraintsUnitTestCase FAILED
                             [junit] Running org.jboss.test.jacc.test.WebIntegrationUnitTestCase
                             [junit] Tests run: 37, Failures: 2, Errors: 4, Time elapsed: 33.125 sec
                             [junit] Test org.jboss.test.jacc.test.WebIntegrationUnitTestCase FAILED
                             [junit] Running org.jboss.test.jacc.test.WebPermissionsValidationTestCase
                             [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 2.547 sec
                             [junit] Running org.jboss.test.web.test.UserInRoleUnitTestCase
                             [junit] Tests run: 4, Failures: 0, Errors: 1, Time elapsed: 1.781 sec
                             [junit] Test org.jboss.test.web.test.UserInRoleUnitTestCase FAILED
                             [junit] Running org.jboss.test.webservice.jbws309.JBWS309TestCase
                             [junit] Tests run: 5, Failures: 0, Errors: 2, Time elapsed: 111.547 sec
                             [junit] Test org.jboss.test.webservice.jbws309.JBWS309TestCase FAILED
                            


                            Even though EJBSpecUnitTestCase is timing out, the run does look better than what hudson (or a server like yours) is seeing.



                            • 11. Re: ant tests-jacc-security
                              anil.saldhana

                              Am wondering if this situation is specific to 64 bit Linux environments. Sorry if I am not making sense because I have spent the entire day on this issue and my wisdom fails me.

                              The Hudson test run was on a server with the following details (Got it from AlexK).

                              
                              dual CPU hyperthreading (so 4 CPU for the OS)
                              RHEL5 x86_64
                              Linux conf1.qa.atl.jboss.com 2.6.18-8.1.1.el5 #1 SMP Mon Feb 26 20:37:57 EST 2007 x86_64 x86_64 x86_64 GNU/Linux
                              


                              • 12. Re: ant tests-jacc-security
                                anil.saldhana

                                The JACC tests on hudson are failing since two days. So it has to be tied to the change I made to testsuite/build.xml to delete the ROOT.war

                                I am going to comment out the delete of ROOT.war and see how the runs go.

                                • 13. Re: ant tests-jacc-security
                                  mmoyses

                                  I'm also running in a 64 bit environment.

                                  [mmoyses@mmoyses ~]$ uname -a
                                  Linux mmoyses 2.6.23.8-63.fc8 #1 SMP Wed Nov 21 17:56:40 EST 2007 x86_64 x86_64 x86_64 GNU/Linux
                                  [mmoyses@mmoyses ~]$ java -version
                                  java version "1.5.0_14"
                                  Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_14-b03)
                                  Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_14-b03, mixed mode)
                                  


                                  • 14. Re: ant tests-jacc-security
                                    brian.stansberry

                                    On my 2 dual core Fedora 7 box -- only pasting AuditUnitTestCase, as you told me on IM that that was what's important:

                                    tests-jacc-security:
                                     [echo] creating jacc config
                                     [copy] Copying 197 files to /home/bes/dev/jboss/clean/trunk/build/output/jboss-5.0.0.Beta3/server/jacc
                                     [echo] Overwriting config descriptors
                                     [copy] Copying 5 files to /home/bes/dev/jboss/clean/trunk/build/output/jboss-5.0.0.Beta3/server/jacc
                                    [server:start] Starting server "jacc" with command:
                                    [server:start] /usr/java/jdk1.5.0_12/bin/java -cp /home/bes/dev/jboss/clean/trunk/build/output/jboss-5.0.0.Beta3/bin/run.jar:/usr/java/default/lib/tools.jar -Xmx256m -Djava.net.preferIPv4Stack=true org.jboss.Main -c jacc -b 192.168.1.145
                                     [echo] Starting patternset=jacc.includes config=JACC
                                     [junit] Running org.jboss.test.cmp2.audit.test.AuditUnitTestCase
                                     [junit] Tests run: 7, Failures: 0, Errors: 0, Time elapsed: 11.114 sec
                                    


                                    1 2 Previous Next