7 Replies Latest reply on Mar 25, 2008 12:28 PM by asoldano

    @SecurityDomain changes from AS42 to AS5

    asoldano

      Hi,
      I was recently taking a look at some failing tests of JBossWS on JBoss AS 5.0 (http://jbws.dyndns.org:8180/hudson/job/Native-Core-AS-5.0.0/33/testReport/org.jboss.test.ws.jaxws.jbws1991/UsernameAuthTestCase/testWrongPasswordAuth/ for instance). The problem seems to me that we're using the org.jboss.annotation.security.SecurityDomain to declare the security domain to be used, while the AS5 ejb3 aop interceptor (should be Ejb3AuthenticationInterceptorv2, right?) looks for the new org.jboss.ejb3.annotation.SecurityDomain. So no authentication actually happens.
      Of course using the new annotation make the test pass on AS5, but our testsuite is supposed to work on different containers; so we were wondering if you have any interesting suggestion about this or since AS 5 is a major release we can't do nothing else than using different annotations for different containers. Are there real differences among the two annotations, or is it really a package refactoring only?

      Thank you

        • 1. Re: @SecurityDomain changes from AS42 to AS5
          anil.saldhana

          I have been handling the EJB3 security for JBoss5. I will have to take a look at why there are two different annotations representing the same.

          • 2. Re: @SecurityDomain changes from AS42 to AS5
            asoldano

            OK, thanks.

            • 3. Re: @SecurityDomain changes from AS42 to AS5
              anil.saldhana

              This is a package correction done by the ejb3 team. For AS5, I can move the annotation to "org.jboss.security.annotation.SecurityDomain" as this is the right place for the annotation.

              For the code in Branch_4, I am not sure how much the ejb3 team wants to change things.

              Carlo/BillD, comments.

              • 4. Re: @SecurityDomain changes from AS42 to AS5
                asoldano

                 

                "anil.saldhana@jboss.com" wrote:
                This is a package correction done by the ejb3 team. For AS5, I can move the annotation to "org.jboss.security.annotation.SecurityDomain" as this is the right place for the annotation.


                Do you mean that the 4.2 package (org.jboss.annotation.security.SecurityDomain) was theoretically not good too?

                • 5. Re: @SecurityDomain changes from AS42 to AS5
                  anil.saldhana

                  I did not create the annotation. I also did not refactor them or move them. I have just taken the task of cleaning up the ejb3 security integration for AS5. Given this, I feel for AS5, the annotation should be in the security spi project.

                  I do not handle ejb3 stuff for Branch_4_2. That is where the issues for you exist. This is where Carlo/BillD/Scott should opine.

                  • 6. Re: @SecurityDomain changes from AS42 to AS5
                    wolfc

                     

                    "alessio.soldano@jboss.com" wrote:
                    Do you mean that the 4.2 package (org.jboss.annotation.security.SecurityDomain) was theoretically not good too?

                    Yes, the package name should reflect the defining artifact or domain. Thus we can make sure there is no class name overlap.
                    "anil.saldhana@jboss.com" wrote:
                    I did not create the annotation. I also did not refactor them or move them. I have just taken the task of cleaning up the ejb3 security integration for AS5. Given this, I feel for AS5, the annotation should be in the security spi project.

                    As long as this doesn't create a dependency loop that would be perfect.
                    "anil.saldhana@jboss.com" wrote:
                    I do not handle ejb3 stuff for Branch_4_2. That is where the issues for you exist. This is where Carlo/BillD/Scott should opine.

                    Branch_4_2 is no longer being maintained.

                    As for the original issue, just put both the annotations on your class. It requires that you have both versions of the jar on your classpath during compile, but not during runtime.

                    • 7. Re: @SecurityDomain changes from AS42 to AS5
                      asoldano

                       

                      "wolfc" wrote:
                      "alessio.soldano@jboss.com" wrote:
                      Do you mean that the 4.2 package (org.jboss.annotation.security.SecurityDomain) was theoretically not good too?

                      Yes, the package name should reflect the defining artifact or domain. Thus we can make sure there is no class name overlap.
                      "anil.saldhana@jboss.com" wrote:
                      I did not create the annotation. I also did not refactor them or move them. I have just taken the task of cleaning up the ejb3 security integration for AS5. Given this, I feel for AS5, the annotation should be in the security spi project.

                      As long as this doesn't create a dependency loop that would be perfect.

                      OK, thanks, if/when the annotation is actually moved to the security spi project, could you please link this to a jira issue and post it here?