1 Reply Latest reply on Dec 2, 2011 10:37 AM by Vitaliy Gonchar

    JBoss AS 7 Security problems. Basic Authentication

    Vitaliy Gonchar Newbie

      Hi Jaikiran! I hope you will help me.

      I have problems with security in EJB marked as Webservice.

       

       

      @Stateless
      @WebService(targetNamespace="ws.test.com", serviceName="TestWebService")
      @org.jboss.ejb3.annotation.SecurityDomain("test-domain")

      @RolesAllowed("test")

      @WebContext(urlPattern="/TestWebService",

      secureWSDLAccess=false,

      authMethod="BASIC",

      transportGuarantee="CONFIDENTIAL")

      public class TestWebServiceBean {

      ...

       

       

       

      I have also configured security domain in standalone.xml.

      But it looks like basic auth isn't working, and finaly i got exception because authentication wasn't performed.

       

      Caused by: javax.ejb.EJBAccessException: JBAS014502: Invocation on method: public com.test..OutputCustomerValueArrayHolder com.test.TestWebServiceBean.findAllCustomers() throws com.test.exceptions.InternalException of bean: TestWebServiceBean is not allowed

       

      What is going on?