Application Server 7
  1. Application Server 7
  2. AS7-2809

security-domain in jboss-ejb3.xml does not work with service endpoint.

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved (View Workflow)
    • Priority: Blocker Blocker
    • Resolution: Done
    • Affects Version/s: 7.1.0.Beta1
    • Fix Version/s: 7.1.0.CR1
    • Component/s: EJB
    • Labels:
      None
    • Similar Issues:
      Show 10 results 

      Description

      The security-domain in jboss-ejb3.xml doesn't work with ejb2x webservice endpoint and throws following exception :

      Caused by: java.lang.RuntimeException: JBAS014497: Method named remove with params [interface javax.ejb.Handle] not found on component class class com.sun.ts.tests.webservices.sec.ejb.certificate.HelloCertificateBean
          at org.jboss.as.ejb3.security.EJBMethodSecurityMetaData.findComponentMethod(EJBMethodSecurityMetaData.java:223)
          at org.jboss.as.ejb3.security.EJBMethodSecurityMetaData.isAccessDenied(EJBMethodSecurityMetaData.java:114)
          at org.jboss.as.ejb3.security.EJBMethodSecurityMetaData.<init>(EJBMethodSecurityMetaData.java:72)
          at org.jboss.as.ejb3.security.EJBSecurityViewConfigurator.configure(EJBSecurityViewConfigurator.java:76)
          at org.jboss.as.ee.component.ComponentDescription$DefaultComponentConfigurator.configure(ComponentDescription.java:917)
          at org.jboss.as.ee.component.deployers.EEModuleConfigurationProcessor.deploy(EEModuleConfigurationProcessor.java:81)
          ... 6 more 
      
      jboss-ejb3.xml
      <jboss:jboss>
        <jboss:enterprise-beans>
          <jboss:ejb>
            <ejb-name xmlns="http://java.sun.com/xml/ns/javaee">SecEjbHello</ejb-name>
            <jboss:destination-jndi-name>SecEjbCertificate</jboss:destination-jndi-name>
          </jboss:ejb>
        </jboss:enterprise-beans>
        <assembly-descriptor xmlns="http://java.sun.com/xml/ns/javaee">
          <security:security xmlns:security="urn:security">
            <security:security-domain>cert</security:security-domain>
            <ejb-name>SecEjbHello</ejb-name>
          </security:security>
        </assembly-descriptor>
      </jboss:jboss>
      
      ejb-jar.xml
      <?xml version="1.0" encoding="UTF-8"?>
      <ejb-jar version="2.1"
               xmlns="http://java.sun.com/xml/ns/j2ee"
      	 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      	 xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd">
      
        <display-name>SecEjbHello</display-name>
        <enterprise-beans>
          <session>
            <display-name>SecEjbHello</display-name>
            <ejb-name>SecEjbHello</ejb-name>
            <home>org.jboss.test.HelloHome</home>
            <remote>org.jboss.test.HelloRemote</remote>
            <service-endpoint>org.jboss.test.HelloInterface</service-endpoint>
            <ejb-class>org.jboss.test.HelloBean</ejb-class>
            <session-type>Stateless</session-type>
            <transaction-type>Bean</transaction-type>
            <security-identity>
              <description></description>
              <use-caller-identity></use-caller-identity>
            </security-identity>
          </session>
        </enterprise-beans>
      </ejb-jar>
      
      jboss-webservices.xml
      <?xml version="1.0" encoding="utf-8"?>
      <webservices xmlns="http://www.jboss.com/xml/ns/javaee">
        <port-component>
          <ejb-name>SecEjbHello</ejb-name>
          <port-component-name>HelloPC</port-component-name>
          <port-component-uri>Hello/ejb</port-component-uri>
          <auth-method>CLIENT-CERT</auth-method>
          <transport-guarantee>CONFIDENTIAL</transport-guarantee>
        </port-component>
        <webservice-description>
          <webservice-description-name>Hello</webservice-description-name>
          <wsdl-publish-location>file:/tmp/hello.wsdl</wsdl-publish-location>
        </webservice-description>
      </webservices>
      

        Activity

        Carlo de Wolf
        made changes -
        Field Original Value New Value
        Git Pull Request https://github.com/wolfc/jboss-as/tree/AS7-2809
        Carlo de Wolf
        made changes -
        Git Pull Request https://github.com/wolfc/jboss-as/tree/AS7-2809 https://github.com/wolfc/jboss-as/tree/AS7-2809
        Description The security-domain in jboss-ejb3.xml doesn't work with ejb2x webservice endpoint and throws following exception :
        Caused by: java.lang.RuntimeException: JBAS014497: Method named remove with params [interface javax.ejb.Handle] not found on component class class com.sun.ts.tests.webservices.sec.ejb.certificate.HelloCertificateBean
            at org.jboss.as.ejb3.security.EJBMethodSecurityMetaData.findComponentMethod(EJBMethodSecurityMetaData.java:223)
            at org.jboss.as.ejb3.security.EJBMethodSecurityMetaData.isAccessDenied(EJBMethodSecurityMetaData.java:114)
            at org.jboss.as.ejb3.security.EJBMethodSecurityMetaData.<init>(EJBMethodSecurityMetaData.java:72)
            at org.jboss.as.ejb3.security.EJBSecurityViewConfigurator.configure(EJBSecurityViewConfigurator.java:76)
            at org.jboss.as.ee.component.ComponentDescription$DefaultComponentConfigurator.configure(ComponentDescription.java:917)
            at org.jboss.as.ee.component.deployers.EEModuleConfigurationProcessor.deploy(EEModuleConfigurationProcessor.java:81)
            ... 6 more


        ---jboss-ejb3.xml--
        <jboss:jboss>
        <jboss:enterprise-beans>
        <jboss:ejb>
        <ejb-name xmlns="http://java.sun.com/xml/ns/javaee">SecEjbHello</ejb-name>
        <jboss:destination-jndi-name>SecEjbCertificate</jboss:destination-jndi-name>
        </jboss:ejb>
        </jboss:enterprise-beans>
        <assembly-descriptor xmlns="http://java.sun.com/xml/ns/javaee">
        <security:security xmlns:security="urn:security">
        <security:security-domain>cert</security:security-domain>
        <ejb-name>SecEjbHello</ejb-name>
        </security:security>
        </assembly-descriptor>
        </jboss:jboss>

        ----ejb-jar.xml----
        <?xml version="1.0" encoding="UTF-8"?>
        <ejb-jar version="2.1"
                 xmlns="http://java.sun.com/xml/ns/j2ee"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd">

          <display-name>SecEjbHello</display-name>
          <enterprise-beans>
            <session>
              <display-name>SecEjbHello</display-name>
              <ejb-name>SecEjbHello</ejb-name>
              <home>org.jboss.test.HelloHome</home>
              <remote>org.jboss.test.HelloRemote</remote>
              <service-endpoint>org.jboss.test.HelloInterface</service-endpoint>
              <ejb-class>org.jboss.test.HelloBean</ejb-class>
              <session-type>Stateless</session-type>
              <transaction-type>Bean</transaction-type>
              <security-identity>
                <description></description>
                <use-caller-identity></use-caller-identity>
              </security-identity>
            </session>
          </enterprise-beans>
        </ejb-jar>


        ---jboss-webservices.xml--

        <?xml version="1.0" encoding="utf-8"?>
        <webservices xmlns="http://www.jboss.com/xml/ns/javaee">
          <port-component>
            <ejb-name>SecEjbHello</ejb-name>
            <port-component-name>HelloPC</port-component-name>
            <port-component-uri>Hello/ejb</port-component-uri>
            <auth-method>CLIENT-CERT</auth-method>
            <transport-guarantee>CONFIDENTIAL</transport-guarantee>
          </port-component>
          <webservice-description>
            <webservice-description-name>Hello</webservice-description-name>
            <wsdl-publish-location>file:/tmp/hello.wsdl</wsdl-publish-location>
          </webservice-description>
        </webservices>
        The security-domain in jboss-ejb3.xml doesn't work with ejb2x webservice endpoint and throws following exception :
        {noformat}
        Caused by: java.lang.RuntimeException: JBAS014497: Method named remove with params [interface javax.ejb.Handle] not found on component class class com.sun.ts.tests.webservices.sec.ejb.certificate.HelloCertificateBean
            at org.jboss.as.ejb3.security.EJBMethodSecurityMetaData.findComponentMethod(EJBMethodSecurityMetaData.java:223)
            at org.jboss.as.ejb3.security.EJBMethodSecurityMetaData.isAccessDenied(EJBMethodSecurityMetaData.java:114)
            at org.jboss.as.ejb3.security.EJBMethodSecurityMetaData.<init>(EJBMethodSecurityMetaData.java:72)
            at org.jboss.as.ejb3.security.EJBSecurityViewConfigurator.configure(EJBSecurityViewConfigurator.java:76)
            at org.jboss.as.ee.component.ComponentDescription$DefaultComponentConfigurator.configure(ComponentDescription.java:917)
            at org.jboss.as.ee.component.deployers.EEModuleConfigurationProcessor.deploy(EEModuleConfigurationProcessor.java:81)
            ... 6 more
        {noformat}

        {code:xml|title=jboss-ejb3.xml}
        <jboss:jboss>
          <jboss:enterprise-beans>
            <jboss:ejb>
              <ejb-name xmlns="http://java.sun.com/xml/ns/javaee">SecEjbHello</ejb-name>
              <jboss:destination-jndi-name>SecEjbCertificate</jboss:destination-jndi-name>
            </jboss:ejb>
          </jboss:enterprise-beans>
          <assembly-descriptor xmlns="http://java.sun.com/xml/ns/javaee">
            <security:security xmlns:security="urn:security">
              <security:security-domain>cert</security:security-domain>
              <ejb-name>SecEjbHello</ejb-name>
            </security:security>
          </assembly-descriptor>
        </jboss:jboss>
        {code}

        {code:xml|title=ejb-jar.xml}
        <?xml version="1.0" encoding="UTF-8"?>
        <ejb-jar version="2.1"
                 xmlns="http://java.sun.com/xml/ns/j2ee"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd">

          <display-name>SecEjbHello</display-name>
          <enterprise-beans>
            <session>
              <display-name>SecEjbHello</display-name>
              <ejb-name>SecEjbHello</ejb-name>
              <home>org.jboss.test.HelloHome</home>
              <remote>org.jboss.test.HelloRemote</remote>
              <service-endpoint>org.jboss.test.HelloInterface</service-endpoint>
              <ejb-class>org.jboss.test.HelloBean</ejb-class>
              <session-type>Stateless</session-type>
              <transaction-type>Bean</transaction-type>
              <security-identity>
                <description></description>
                <use-caller-identity></use-caller-identity>
              </security-identity>
            </session>
          </enterprise-beans>
        </ejb-jar>
        {code}

        {code:xml|title=jboss-webservices.xml}
        <?xml version="1.0" encoding="utf-8"?>
        <webservices xmlns="http://www.jboss.com/xml/ns/javaee">
          <port-component>
            <ejb-name>SecEjbHello</ejb-name>
            <port-component-name>HelloPC</port-component-name>
            <port-component-uri>Hello/ejb</port-component-uri>
            <auth-method>CLIENT-CERT</auth-method>
            <transport-guarantee>CONFIDENTIAL</transport-guarantee>
          </port-component>
          <webservice-description>
            <webservice-description-name>Hello</webservice-description-name>
            <wsdl-publish-location>file:/tmp/hello.wsdl</wsdl-publish-location>
          </webservice-description>
        </webservices>
        {code}
        Richard Opalka
        made changes -
        Carlo de Wolf
        01/Dec/11 8:36 AM
        Carlo de Wolf <cdewolf@redhat.com> committed 467c54a260eccf988e8092f739148fb4ce8d2284 (1 file)
        Carlo de Wolf
        01/Dec/11 8:37 AM
        Carlo de Wolf <cdewolf@redhat.com> committed edbbfda0226840f4de118893932d87a03f096646 (1 file)
        Carlo de Wolf
        01/Dec/11 8:59 AM
        Carlo de Wolf <cdewolf@redhat.com> committed d35bee0d8fb627036566671019f8b1bf8c9657be (1 file)
        Carlo de Wolf
        01/Dec/11 8:59 AM
        Carlo de Wolf <cdewolf@redhat.com> committed 614b6b5fedea9489493f3570ef826d015bb2bbe6 (1 file)
        Carlo de Wolf
        made changes -
        Status Open [ 1 ] Pull Request Sent [ 10011 ]
        Git Pull Request https://github.com/wolfc/jboss-as/tree/AS7-2809 https://github.com/jbossas/jboss-as/pull/778
        Carlo de Wolf
        made changes -
        Status Pull Request Sent [ 10011 ] Resolved [ 5 ]
        Fix Version/s 7.1.0.CR1 [ 12316687 ]
        Fix Version/s 7.1.0.Final [ 12318489 ]
        Resolution Done [ 1 ]

          People

          • Assignee:
            Carlo de Wolf
            Reporter:
            Jim Ma
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: