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

WS-Security policies placed on bus level are not registered

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 3.2.5
    • WS-* Components
    • None
    • Unknown

    Description

      Hi, I configured a WS-Consumer with WSS Interceptors successfully. Now I wanted to switch to WSS configuration via policies. I did this successfully for WSRM.
      My bus.xml is attached to the ticket.
      I am using CXF 3.2.0-SNAPSHOT.

      Within the .java class I am loading the config:

      SpringBusFactory bf = new SpringBusFactory();
      URL busFile = ClientWSSviaPolicies.class.getResource("clientWSSviaPoliciesWithAtt_WSRM_4jira_ticket.xml");
      Bus bus = bf.createBus(busFile.toString());
      BusFactory.setDefaultBus(bus);

      plus I am setting the needed properties
      ((BindingProvider)port).getRequestContext().put("ws-security.username", "wss");
      ((BindingProvider)port).getRequestContext().put("ws-security.callback-handler", "demo.ws_rm.client.CallBack");
      ((BindingProvider)port).getRequestContext().put("ws-security.signature.username", "wss");
      ((BindingProvider)port).getRequestContext().put("ws-security.signature.properties", "jks/client.properties");
      ((BindingProvider)port).getRequestContext().put("ws-security.encryption.username", "wss");
      ((BindingProvider)port).getRequestContext().put("ws-security.encryption.properties", "jks/client.properties");

      But the message which my client creates, is not signed nor encrypted.

      WSRM policies are active, WSS policies not. Any ideas?

      Best regards
      Kai

      Attachments

        Activity

          People

            coheigea Colm O hEigeartaigh
            kairo Kai Rommel
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: