Uploaded image for project: 'Spring Security OAuth'
  1. Spring Security OAuth
  2. SECOAUTH-114

Weblogic does not allow repeat execution of filter chain

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Complete
    • Affects Version/s: 1.0.0.M3
    • Fix Version/s: 1.0.0.M4
    • Component/s: OAuth 2
    • Labels:
      None

      Description

      Weblogic does not allow repeat execution of filter chain, so OAuth2ClientContextFilter doesn't work (http://forum.springsource.org/showthread.php?113899-Broken-Filter-Chain-in-WebLogic-in-OAuth2ClientContextFilter). There doesn't seem to be any way round this other than a re-design, if possible, of the client interceptor features. The filter chain is only repeated when a new access token is acquired, so my guess is we could move that recovery down the stack into the OAuth2RestTemplate itself somehow.

        Activity

        Hide
        david_syer Dave Syer added a comment -

        The forum post contains a workaround involving a redirect as an alternative to re-executing the filter chain. So if that works, we could put that in as a supported behaviour in our filter, and allow the user to switch that behaviour on if necessary. That will result in potentially a lot of chatter between browser and client app while the tokens are being acquired, so we wouldn't want that to be the default.

        Show
        david_syer Dave Syer added a comment - The forum post contains a workaround involving a redirect as an alternative to re-executing the filter chain. So if that works, we could put that in as a supported behaviour in our filter, and allow the user to switch that behaviour on if necessary. That will result in potentially a lot of chatter between browser and client app while the tokens are being acquired, so we wouldn't want that to be the default.
        Hide
        david_syer Dave Syer added a comment -

        Fixed with a boolean flag <oauth:client redirect-on-error="true" .../> for 1.0.0.M4. We might want to revisit this later, but that can be another issue.

        Show
        david_syer Dave Syer added a comment - Fixed with a boolean flag <oauth:client redirect-on-error="true" .../> for 1.0.0.M4. We might want to revisit this later, but that can be another issue.
        Hide
        rheaton Ryan Heaton added a comment -

        Closed with 1.0.0.M4.

        Show
        rheaton Ryan Heaton added a comment - Closed with 1.0.0.M4.
        Hide
        dante Markus Langenbahn added a comment -

        In release 1.0.0.M5 the flag is still there in the XSD and in the filter, but it isn't initiallized anymore in the OAuth2ClientBeanDefinitionParser. The result is, that OAuth2 again isn't working in WebLogic.

        Could you please add the initialization of the redirectOnError flag in the OAuth2ClientBeanDefinitionParser again?

        String redirectOnError = element.getAttribute("redirect-on-error");

        if (StringUtils.hasText(redirectOnError))

        { clientContextFilterBean.addPropertyValue("redirectOnError", redirectOnError); }

        Many thanks in advance.

        Show
        dante Markus Langenbahn added a comment - In release 1.0.0.M5 the flag is still there in the XSD and in the filter, but it isn't initiallized anymore in the OAuth2ClientBeanDefinitionParser. The result is, that OAuth2 again isn't working in WebLogic. Could you please add the initialization of the redirectOnError flag in the OAuth2ClientBeanDefinitionParser again? String redirectOnError = element.getAttribute("redirect-on-error"); if (StringUtils.hasText(redirectOnError)) { clientContextFilterBean.addPropertyValue("redirectOnError", redirectOnError); } Many thanks in advance.
        Hide
        david_syer Dave Syer added a comment -

        Works for me on master. M5 must be a blip.

        Show
        david_syer Dave Syer added a comment - Works for me on master. M5 must be a blip.

          People

          • Assignee:
            david_syer Dave Syer
            Reporter:
            david_syer Dave Syer
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development