0 Replies Latest reply on Sep 10, 2005 8:26 AM by evrim

    programatic security: How to get current (String)SecurityDom

    evrim

      Hi,

      I'm trying to implement accounting service with single sign on. My question is, i need to put some programatic security. (i'm currently not using any security proxies)

      Setup is simple, a web app having security domain java:/jaas/X and an session bean having security domain java:/jaas/Y. I call ejb methods from servlet as usual.

      I need a code segment to find in which security domain i am executing. The reason for this is, i'm having multiple web archives accessing the same ejb and i have to know from which domain my client is, so that i can code some programatic security.

      What i've tried and failed:
      i) "jboss.mq:server=SecurityManager", server.getAttribute("SecurityDomain");
      gave me jboss.mq
      ii) "jboss.security=JaasSecurityManager"
      couldn't found any property related to securitydomain but invoked server.getDefaultDomain()
      which gave me "jboss".

      Thnx.