0 Replies Latest reply on Aug 26, 2004 9:31 AM by Stephan Wolff

    Jaas Works also for services ?

    Stephan Wolff Newbie

      Hallo my name is stephan
      i'm student ..... and i have done some experiments with jboss.

      I have build an simple EJB and have done the Jaas configuration.
      I have edit service-login.config and add my own security-domain
      with UserRolesLoginModule.
      than I deploy my EJB with user,roles properties and add the ejb to the security-domain in jboss.xml.

      I have also build an example client wich creates a login context and calls the create method via jndi of the ejb for testing ... this works fine.

      Now I have Programm my own Service. It is also a simple Protokolladaptor for socket transmissions and deploy them on jboss.

      I access the Service via a socket connection and send some stuff. The service creates a thread to handle transaction and creates also a login context and calls the create method of the secured ejb but this doesnt work.

      i get an authentfication exception (without security the call works)
      principal = null. from the security manger

      Then i have think, ok service is not a ejb client and i have to add
      the service to the security domain but this is also not possible the Service Mbean is not an EJB (jboss.xml is not available).

      How can my adaptor access an secured ejb method ?
      What must i do ?

      Can every one explain this ?

      I have read some related documents from sun, jboss,samples book but I have no solution for this problem found.

      (if everyone have interrrest i can post some sample code, it is relativ small)

      THanks for the help
      cu
      Stephan