You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xmlrpc-dev@ws.apache.org by Markus <ax...@googlemail.com> on 2006/02/17 09:11:04 UTC
proxy problems using xmlrpc
Hi,
I recently experienced some problems using xmlrpc 2.0.1 within applets
behind firewalls and proxies, especially those who use ntlm
authentication. While connecting directly via URLConnection works, the
xmlrpc-calls fail.
I took a look at the xmlrpc-code and found this in
DefaultXmlRpcTransport.sendXmlRpc(byte [] request):
con.setAllowUserInteraction(false);
Why would there be no UserInteraction i.e. authentication dialogs?
Could anyone confirm that this is the reason that anything that goes
beyond basic authentiation would fail?
Re: proxy problems using xmlrpc
Posted by Jochen Wiedmann <jo...@gmail.com>.
On 2/27/06, Markus <ax...@googlemail.com> wrote:
> There were multiple issues concerning http/https-tunneling. All I know
> of got fixed when 6226610 got fixed.
Markus, I am sorry. You want us to care for your problem. I am ready
to look at it, but if it is indeed a known problem with the Sun JDK,
then I expect you to do the research and find the right bug report.
This will allow us to consider our options.
Jochen
--
Whenever you find yourself on the side of the
majority, it is time to pause and reflect.
(Mark Twain)
Re: proxy problems using xmlrpc
Posted by Markus <ax...@googlemail.com>.
> But that is only a security problem, as I understand it, because HTTP
> headers are exposed without reason?
There were multiple issues concerning http/https-tunneling. All I know
of got fixed when 6226610 got fixed.
Re: proxy problems using xmlrpc
Posted by Jochen Wiedmann <jo...@gmail.com>.
On 2/27/06, Markus <ax...@googlemail.com> wrote:
> The bug id at sun is: 6226610
You mean:
Bug ID: 6226610 HTTP tunnel connections send user headers to proxy
But that is only a security problem, as I understand it, because HTTP
headers are exposed without reason?
Jochen
--
Whenever you find yourself on the side of the
majority, it is time to pause and reflect.
(Mark Twain)
Re: proxy problems using xmlrpc
Posted by Markus <ax...@googlemail.com>.
The bug id at sun is: 6226610
Re: proxy problems using xmlrpc
Posted by Jochen Wiedmann <jo...@gmail.com>.
On 2/23/06, Markus <ax...@googlemail.com> wrote:
> However, I identified the reason that caused xmlrpc-calls to fail if
> the client is behind a NTLM-Proxy using ssl. There is a bug in the
> java_net classes for java 1.4 and 1.5 (they say it's fixed in 1.6)
> that causes this (*) line in DefaultXmlRpcTransport to block any
> further network traffic:
Do you have a pointer to the bug entry at sun.com?
Jochen
--
Whenever you find yourself on the side of the
majority, it is time to pause and reflect.
(Mark Twain)
Re: proxy problems using xmlrpc
Posted by Henri Gomez <he...@gmail.com>.
Well it should be configurable.
Let's see how to do it
2006/2/23, Markus <ax...@googlemail.com>:
> > What does "supported by jre" mean? Not even Basic Authentication is
> > supported in the sense, that I have to create an "Authorization"
> > header anyways.
>
> I think of "supported by" in a way that the java plugin is able to use
> the browser proxy settings and supports NTLM authentication for
> URLConnections without additional configuration.
>
> However, I identified the reason that caused xmlrpc-calls to fail if
> the client is behind a NTLM-Proxy using ssl. There is a bug in the
> java_net classes for java 1.4 and 1.5 (they say it's fixed in 1.6)
> that causes this (*) line in DefaultXmlRpcTransport to block any
> further network traffic:
>
> public InputStream sendXmlRpc(byte [] request)
> throws IOException
> {
> con = url.openConnection();
> con.setDoInput(true);
> con.setDoOutput(true);
> con.setUseCaches(false);
> con.setAllowUserInteraction(false);
> // (*) con.setRequestProperty("Content-Length",
> Integer.toString(request.length)); <- EVIL jdk java_net Bug
> con.setRequestProperty("Content-Type", "text/xml");
> if (auth != null)
> {
> con.setRequestProperty("Authorization", "Basic " + auth);
> }
> OutputStream out = con.getOutputStream();
> out.write(request);
> out.flush();
> out.close();
> return con.getInputStream();
> }
>
> After patching the xmlrpc library and commenting this line, everything
> works as expected.
>
> This problem is not your fault, but as this is an issue for many
> people behind microsoft firewalls/proxies, I'd like to encourage you
> to omit the explicit setting of the Content-Length.
>
> Markus
>
Re: proxy problems using xmlrpc
Posted by Markus <ax...@googlemail.com>.
> What does "supported by jre" mean? Not even Basic Authentication is
> supported in the sense, that I have to create an "Authorization"
> header anyways.
I think of "supported by" in a way that the java plugin is able to use
the browser proxy settings and supports NTLM authentication for
URLConnections without additional configuration.
However, I identified the reason that caused xmlrpc-calls to fail if
the client is behind a NTLM-Proxy using ssl. There is a bug in the
java_net classes for java 1.4 and 1.5 (they say it's fixed in 1.6)
that causes this (*) line in DefaultXmlRpcTransport to block any
further network traffic:
public InputStream sendXmlRpc(byte [] request)
throws IOException
{
con = url.openConnection();
con.setDoInput(true);
con.setDoOutput(true);
con.setUseCaches(false);
con.setAllowUserInteraction(false);
// (*) con.setRequestProperty("Content-Length",
Integer.toString(request.length)); <- EVIL jdk java_net Bug
con.setRequestProperty("Content-Type", "text/xml");
if (auth != null)
{
con.setRequestProperty("Authorization", "Basic " + auth);
}
OutputStream out = con.getOutputStream();
out.write(request);
out.flush();
out.close();
return con.getInputStream();
}
After patching the xmlrpc library and commenting this line, everything
works as expected.
This problem is not your fault, but as this is an issue for many
people behind microsoft firewalls/proxies, I'd like to encourage you
to omit the explicit setting of the Content-Length.
Markus
Re: proxy problems using xmlrpc
Posted by Jochen Wiedmann <jo...@gmail.com>.
On 2/17/06, Markus <ax...@googlemail.com> wrote:
> Yes, but the problem is the same for xmlrpc-lite.
What the heck is xmlrpc-lite?
> ntlm is supported via jre 1.4.?+. Microsoft is (mis?)using the 403
> response codes for authentication, the auth process:
> 1. request, response 403 - please use ntml
> 2. request with ntlm userid, response 403 - here's some random data
> 3. request with signed random data, resonse: 200 here you go
What does "supported by jre" mean? Not even Basic Authentication is
supported in the sense, that I have to create an "Authorization"
header anyways.
Jochen
--
Whenever you find yourself on the side of the
majority, it is time to pause and reflect.
(Mark Twain)
Re: proxy problems using xmlrpc
Posted by Markus <ax...@googlemail.com>.
> > Why would there be no UserInteraction i.e. authentication dialogs?
>
> Because XML-RPC is supposed not to run in a browser or something
> similar, but interactively. I doubt that it has any effect, though,
> the exception being within an applet or something similar. Is that the
> case?
Yes, but the problem is the same for xmlrpc-lite.
>
>
> > Could anyone confirm that this is the reason that anything that goes
> > beyond basic authentiation would fail?
>
> I have absolutely *no* idea about NTLM authentication.
ntlm is supported via jre 1.4.?+. Microsoft is (mis?)using the 403
response codes for authentication, the auth process:
1. request, response 403 - please use ntml
2. request with ntlm userid, response 403 - here's some random data
3. request with signed random data, resonse: 200 here you go
Re: proxy problems using xmlrpc
Posted by Jochen Wiedmann <jo...@gmail.com>.
On 2/17/06, Markus <ax...@googlemail.com> wrote:
> Why would there be no UserInteraction i.e. authentication dialogs?
Because XML-RPC is supposed not to run in a browser or something
similar, but interactively. I doubt that it has any effect, though,
the exception being within an applet or something similar. Is that the
case?
> Could anyone confirm that this is the reason that anything that goes
> beyond basic authentiation would fail?
I have absolutely *no* idea about NTLM authentication.
Jochen
--
If you obey all the rules you miss all the fun. (Katharine Hepburn)