Uploaded image for project: 'Application Server 7'
  1. Application Server 7
  2. AS7-3072

SecurityException deploying login quickstart on a server with signed jars

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Blocker Blocker
    • 7.1.0.Final
    • 7.1.0.Beta1b
    • CDI / Weld
    • None
    • Hide

      0. Create your own key if you don't have one

      keytool -genkey -alias my-test-key

      This will create a new key called "my-test-key" in the default keystore location ~/.keystore
      1. Build AS 7
      2. Sign all jars in jboss dist directory with your new key

      find . -name "*.jar" -exec jarsigner -storepass <yourpassword> '{}' my-test-key \; 

      3. build and try to deploy the "login" quickstart from AS7 quickstarts.

      Show
      0. Create your own key if you don't have one keytool -genkey -alias my-test-key This will create a new key called "my-test-key" in the default keystore location ~/.keystore 1. Build AS 7 2. Sign all jars in jboss dist directory with your new key find . -name "*.jar" -exec jarsigner -storepass <yourpassword> '{}' my-test-key \; 3. build and try to deploy the "login" quickstart from AS7 quickstarts.

      Attempting to deploy the "login" quickstart on AS7 with signed modules fails with the following exception:

      17:35:11,860 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC00001: Failed to start service jboss.deployment.unit."jboss-as-login.war".WeldService: org.jboss.msc.service.StartException in service jboss.deployment.unit."jboss-as-login.war".WeldService: org.jboss.weld.exceptions.WeldException: by java.lang.SecurityException: class "org.jboss.as.quickstarts.login.UserManager$-2022604038$Proxy$_$$_Weld$Proxy$"'s signer information does not match signer information of other classes in the same package
      	at org.jboss.as.weld.services.WeldService.start(WeldService.java:96)
      	at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824) [jboss-msc-1.0.1.GA.jar:]
      	at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759) [jboss-msc-1.0.1.GA.jar:]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_24]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_24]
      	at java.lang.Thread.run(Thread.java:662) [:1.6.0_24]
      Caused by: org.jboss.weld.exceptions.WeldException: by java.lang.SecurityException: class "org.jboss.as.quickstarts.login.UserManager$-2022604038$Proxy$_$$_Weld$Proxy$"'s signer information does not match signer information of other classes in the same package
      	at org.jboss.weld.bean.proxy.ProxyFactory.getProxyClass(ProxyFactory.java:273)
      	at org.jboss.weld.bean.SessionBean.initProxyClass(SessionBean.java:231)
      	at org.jboss.weld.bean.SessionBean.initialize(SessionBean.java:164)
      	at org.jboss.weld.bean.AbstractProducerBean.initialize(AbstractProducerBean.java:174)
      	at org.jboss.weld.bean.ProducerMethod.initialize(ProducerMethod.java:115)
      	at org.jboss.weld.bootstrap.AbstractBeanDeployer.deploy(AbstractBeanDeployer.java:115)
      	at org.jboss.weld.bootstrap.BeanDeployment.deployBeans(BeanDeployment.java:204)
      	at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:344)
      	at org.jboss.as.weld.WeldContainer.start(WeldContainer.java:81)
      	at org.jboss.as.weld.services.WeldService.start(WeldService.java:89)
      	... 5 more
      Caused by: javassist.CannotCompileException: by java.lang.SecurityException: class "org.jboss.as.quickstarts.login.UserManager$-2022604038$Proxy$_$$_Weld$Proxy$"'s signer information does not match signer information of other classes in the same package
      	at org.jboss.weld.util.bytecode.ClassFileUtils.toClass(ClassFileUtils.java:99)
      	at org.jboss.weld.bean.proxy.ProxyFactory.createProxyClass(ProxyFactory.java:374)
      	at org.jboss.weld.bean.proxy.ProxyFactory.getProxyClass(ProxyFactory.java:271)
      	... 14 more
      Caused by: java.lang.SecurityException: class "org.jboss.as.quickstarts.login.UserManager$-2022604038$Proxy$_$$_Weld$Proxy$"'s signer information does not match signer information of other classes in the same package
      	at java.lang.ClassLoader.checkCerts(ClassLoader.java:807) [:1.6.0_24]
      	at java.lang.ClassLoader.preDefineClass(ClassLoader.java:488) [:1.6.0_24]
      	at java.lang.ClassLoader.defineClassCond(ClassLoader.java:626) [:1.6.0_24]
      	at java.lang.ClassLoader.defineClass(ClassLoader.java:616) [:1.6.0_24]
      	at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source) [:1.6.0_24]
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_24]
      	at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_24]
      	at org.jboss.weld.util.bytecode.ClassFileUtils.toClass2(ClassFileUtils.java:118)
      	at org.jboss.weld.util.bytecode.ClassFileUtils.toClass(ClassFileUtils.java:95)
      	... 16 more
      
      

              rhn-support-nagetsum Norito Agetsuma
              maschmid@redhat.com Marek Schmidt
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: