0 Replies Latest reply on May 9, 2011 2:08 PM by incomt65

    Usage of PolicyContext from within Seam app

    incomt65

      Hi all,


      I am involved in the development of a Seam web app, and it is reaching a good maturity point after almost a year of developing it. Great work on the Seam Framework on JBoss 4.2.3.  We really enjoy using it.


      We now have the need to integrate a third party component, which contains the following code:


      HttpServletRequest rq = (HttpServletRequest) PolicyContext.getContext(WEB_REQUEST_KEY);



      Within Seam, using Seam security, this does not work as one would expect.  It returns an object, but it does not contain the information I expect.  For example, the following calls return null:


      rq.getRemoteUser();
      rq.getRemoteAddr();



      Does anyone have suggestions on how to ensure that the javax.security.jacc.PolicyContext object returns a proper HttpServletRequest?  Is it even possible with Seam2?  I have seen a few JIRA issues related to security, and providing better integration with the container, but the trail of those JIRA issues doesn't seem to lead anywhere.  Some of them are closed with no fix, or are outdated.


      Looking for any type of advice.


      Thanks,
      -- Damien