Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-2889

STSClient doesn't seem to apply policies when decoupled from the service that uses the token

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.2.9
    • 2.2.10
    • WS-* Components
    • None
    • Windows XP SP 3; Java 1.6.0_20; CXF 2.2.9; Maven 2.2.1

    Description

      When the STSClient is used as described on the WS-Trust CXF User's guide (http://cxf.apache.org/docs/ws-trust.html) page it obtains a token from an STS and the policies of the STS seem to be applied successfully. However when the STSClient alone to call the STS then the policies don't seem to be applied. See the attached WSTrustTest for a success case and WSTrustManualTest for the failure. The use case is to look at the WS-Trust interaction from the client's viewpoint. Right now I can work around the issue by using the WSS4JOutInterceptor, but I'd like to be able to just use the policies.

      Map<String, Object> outProps = new HashMap<String, Object>();
      outProps.put(WSHandlerConstants.ACTION, WSHandlerConstants.USERNAME_TOKEN);
      outProps.put(WSHandlerConstants.USER, "scott");
      outProps.put(WSHandlerConstants.PASSWORD_TYPE, WSConstants.PW_TEXT);
      outProps.put(WSHandlerConstants.PW_CALLBACK_CLASS, "service.ClientPasswordCallback");
      WSS4JOutInterceptor wssOut = new WSS4JOutInterceptor(outProps);
      client.getOutInterceptors().add(wssOut);

      Attachments

        1. sample.zip
          27 kB
          Brandon Richins

        Activity

          People

            Unassigned Unassigned
            brrichin Brandon Richins
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: