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

SimpleSecurityManager and JBossCachedAuthenticationManager do not work together correctly when calling remote ejb

    Details

    • Steps to Reproduce:
      Hide

      We have custom login modules. One for the remoting connection ('jas-remote" and one for the ejb's ('jas'):
      <security-realm name="ApplicationRealm">
      <authentication>
      <jaas name="jas-remote"/>
      </authentication>
      </security-realm>

      <security-domain cache-type="default" name="jas-remote">
      <authentication>
      <login-module code="com.os.ee.security.jboss.JBoss7RemotingLoginModule" flag="optional"/>
      </authentication>
      </security-domain>
      <security-domain cache-type="default" name="jas">
      <authentication>
      <login-module code="com.os.ee.security.jboss.JBoss7ServerLoginModule" flag="required"/>
      </authentication>
      </security-domain>

      Show
      We have custom login modules. One for the remoting connection ('jas-remote" and one for the ejb's ('jas'): <security-realm name="ApplicationRealm"> <authentication> <jaas name="jas-remote"/> </authentication> </security-realm> <security-domain cache-type="default" name="jas-remote"> <authentication> <login-module code="com.os.ee.security.jboss.JBoss7RemotingLoginModule" flag="optional"/> </authentication> </security-domain> <security-domain cache-type="default" name="jas"> <authentication> <login-module code="com.os.ee.security.jboss.JBoss7ServerLoginModule" flag="required"/> </authentication> </security-domain>
    • Similar Issues:
      Show 10 results 

      Description

      the method SimpleSecurityManager.push(...) is called for every ejb call and here for every call a new instance of SimplePrincipal is created for the SubjectInfo. Then the method authenticate() is called. Here it delegates to the JBossCachedAuthenticationManager which tries to find an already cached principal, but this cannot work, because the get() function of the cache returns null. It returns null, because of the newly created SimplePrincipal for the current invocation.

        Gliffy Diagrams

          Activity

          Hide
          Jarno Komulainen added a comment -

          We are facing same problem. This is huge performance problem in our environment. Is there any workaround?

          Show
          Jarno Komulainen added a comment - We are facing same problem. This is huge performance problem in our environment. Is there any workaround?
          Hide
          jaikiran pai added a comment -

          Looking into this.

          Show
          jaikiran pai added a comment - Looking into this.
          Hide
          jaikiran pai added a comment -

          I haven't been able to reproduce this against latest upstream. Can you give the latest nightly build a try and see if it fixes the issue. If you still see that issue then please attach an application which reproduces this.

          Show
          jaikiran pai added a comment - I haven't been able to reproduce this against latest upstream. Can you give the latest nightly build a try and see if it fixes the issue. If you still see that issue then please attach an application which reproduces this.
          Hide
          Michael Gronau added a comment -

          Overriding equals() in our Prinicpal class helped! Thanks jaikiran.

          Show
          Michael Gronau added a comment - Overriding equals() in our Prinicpal class helped! Thanks jaikiran.
          Hide
          jaikiran pai added a comment -

          Overriding equals() in our Prinicpal class helped! Thanks jaikiran.

          Thanks for confirming that. I'm closing this as "not a bug".

          Show
          jaikiran pai added a comment - Overriding equals() in our Prinicpal class helped! Thanks jaikiran. Thanks for confirming that. I'm closing this as "not a bug".

            People

            • Assignee:
              jaikiran pai
              Reporter:
              Michael Gronau
            • Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development