Uploaded image for project: 'Axis2'
  1. Axis2
  2. AXIS2-3839

Java Networking Properties for proxy override HttpTransportProperties and clear authentication information

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.3, 1.4
    • Fix Version/s: None
    • Component/s: kernel
    • Labels:
      None

      Description

      In ProxyConfiguration.configure(), the proxy settings are checked in the following order:

      1. Config values from Axis2.xml
      2. HTTPConstants.PROXY property
      3. Java Networking Properties

      In our case, we have a proxy that requires authentication so we properly set the HTTPConstants.PROXY property. However, for other components in our system we must also set the Java Networking Properties. Thus, on line 185 the credentials that were set via the runtime options are reset to:

      proxyCred = new UsernamePasswordCredentials("","");

      Steps To Recreate:
      1. HttpTransportProperties.ProxyProperties to setup a authenticated proxy
      2. Set Java Networking Properties to the same proxy
      3. Attempt to use connection

      Expected Behavior:
      1. Proxy properties specified via HttpTransportProperties override all other proxy configurations (Axis2.xml and Java Networking)

      Workaround:
      1. Wrap the execute command with code that temporarily removes the Java Networking Properties

        Issue Links

          Activity

          Hide
          maihde Michael Ihde added a comment -

          This is a patch for 1.3 that I used. Because the Java properties are the most generic they are checked first. The proxy configuration precedence is:

          1. Runtime options
          2. Axis2.xml
          3. Java Networking Properties

          Show
          maihde Michael Ihde added a comment - This is a patch for 1.3 that I used. Because the Java properties are the most generic they are checked first. The proxy configuration precedence is: 1. Runtime options 2. Axis2.xml 3. Java Networking Properties
          Hide
          mzert Adam added a comment -

          The described workaround could work just for a single process without concurrent threads!
          How could i run concurrent threads with different proxy credentials? The workaround doesn't give the answer!
          Couldn't this bug get resolved ASAP?! Is there a workaraound for the thread issue?

          Show
          mzert Adam added a comment - The described workaround could work just for a single process without concurrent threads! How could i run concurrent threads with different proxy credentials? The workaround doesn't give the answer! Couldn't this bug get resolved ASAP?! Is there a workaraound for the thread issue?
          Hide
          milinda Milinda Lakmal Pathirage added a comment -

          Fixed in the trunk.

          Show
          milinda Milinda Lakmal Pathirage added a comment - Fixed in the trunk.
          Hide
          milinda Milinda Lakmal Pathirage added a comment -

          Thanks Michael for the patch.

          Show
          milinda Milinda Lakmal Pathirage added a comment - Thanks Michael for the patch.

            People

            • Assignee:
              milinda Milinda Lakmal Pathirage
              Reporter:
              maihde Michael Ihde
            • Votes:
              3 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development