You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Murat Citak <mu...@promatis.de> on 2013/10/23 14:50:46 UTC
HTTPS proxy authentication does not work
Hi all,
I‘m trying to use the cxf proxy authentication. Hereby I’ve the following
problem: The proxy authentication over HTTP works fine, but the proxy
authentication over HTTPS doesn’t work.
Here is my code (The class ‘IRefeenceManagerImpl’ contains the
implementation):
*public* *void* setLongConnectionTimeout( IReferenceManagerImpl impl, *
boolean* longTimeOut) {
*if* ( impl *instanceof* Proxy) {
JaxWsClientProxy jaxWsClientProxy = ( JaxWsClientProxy) Proxy.*
getInvocationHandler*( impl);
Client c = jaxWsClientProxy.getClient();
HTTPConduit http = ( HTTPConduit) c.getConduit();
HTTPClientPolicy clPol = http.getClient();
clPol.setAllowChunking( ProxyHelper.*isAllowChunking*());
clPol.setReceiveTimeout( 15000);
clPol.setConnectionTimeout( 3000);
clPol.setProxyServer( ProxyHelper.*getProxyHost*());
clPol.setProxyServerPort( ProxyHelper.*getProxyPort*());
ProxyAuthorizationPolicy proxyAuthPol =
http.getProxyAuthorization();
proxyAuthPol.setUserName( ProxyHelper.*getProxyUsername*());
proxyAuthPol.setPassword( ProxyHelper.*getProxyPassword*());
}
}
Here is the HTTP proxy authentication request:
POST http://wwwXXX.biz/XXX/ HTTP/1.1
Content-Type: text/xml; charset=UTF-8
Accept: */*
Authorization: Basic SXXXg==
Client-Version: 2.5.0.qualifier
Proxy-Authorization: Basic bXXXM=
SOAPAction: ""
User-Agent: Apache CXF 2.6.10
Cache-Control: no-cache
Pragma: no-cache
Host: wwwXXX.biz
Proxy-Connection: keep-alive
Content-Length: 257
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns1:hasChildren
xmlns:ns1="http://interfaces.ws.database.horus.biz/
"><containerId>0</containerId><containerType>0</containerType></ns1:hasChildren></soap:Body></soap:Envelope>
Here is the *HTTPS* proxy authentication request:
CONNECT wwwXXX.biz:443 HTTP/1.1
User-Agent: Java/1.7.0_25
Host: wwwXXX.biz
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Proxy-Connection: keep-alive
Do you have any idea which can help me?
Thanks
Re: HTTPS proxy authentication does not work
Posted by Johannes Michler <or...@gmail.com>.
Dear Murat,
have you seen the following Issue:
https://issues.apache.org/jira/browse/CXF-2223
This seems to describe exactly your problem. Unfortunately the Issue is
marked as fix which it obviously isn't.
The Issue also references some workaround:
http://www.mail-archive.com/users@cxf.apache.org/msg06422.html
However I cannot see any real workaround in this mailing-list-entry.
Maybe you could try do directly address the CXF-2223-Issue or Daniel Kulp
especially?
Regards,
Johannes
2013/10/23 Murat Citak <mu...@promatis.de>
> Hi all,
>
>
>
> I‘m trying to use the cxf proxy authentication. Hereby I’ve the following
> problem: The proxy authentication over HTTP works fine, but the proxy
> authentication over HTTPS doesn’t work.
>
> Here is my code (The class ‘IRefeenceManagerImpl’ contains the
> implementation):
>
>
>
> *public* *void* setLongConnectionTimeout( IReferenceManagerImpl impl, *
> boolean* longTimeOut) {
>
> *if* ( impl *instanceof* Proxy) {
>
> JaxWsClientProxy jaxWsClientProxy = ( JaxWsClientProxy) Proxy.*
> getInvocationHandler*( impl);
>
> Client c = jaxWsClientProxy.getClient();
>
> HTTPConduit http = ( HTTPConduit) c.getConduit();
>
> HTTPClientPolicy clPol = http.getClient();
>
>
>
> clPol.setAllowChunking( ProxyHelper.*isAllowChunking*());
>
> clPol.setReceiveTimeout( 15000);
>
> clPol.setConnectionTimeout( 3000);
>
>
>
> clPol.setProxyServer( ProxyHelper.*getProxyHost*());
>
> clPol.setProxyServerPort( ProxyHelper.*getProxyPort*());
>
>
>
> ProxyAuthorizationPolicy proxyAuthPol =
> http.getProxyAuthorization();
>
> proxyAuthPol.setUserName( ProxyHelper.*getProxyUsername*());
>
> proxyAuthPol.setPassword( ProxyHelper.*getProxyPassword*());
>
>
>
>
>
> }
>
> }
>
>
>
> Here is the HTTP proxy authentication request:
>
>
>
> POST http://wwwXXX.biz/XXX/ HTTP/1.1
>
> Content-Type: text/xml; charset=UTF-8
>
> Accept: */*
>
> Authorization: Basic SXXXg==
>
> Client-Version: 2.5.0.qualifier
>
> Proxy-Authorization: Basic bXXXM=
>
> SOAPAction: ""
>
> User-Agent: Apache CXF 2.6.10
>
> Cache-Control: no-cache
>
> Pragma: no-cache
>
> Host: wwwXXX.biz
>
> Proxy-Connection: keep-alive
>
> Content-Length: 257
>
>
>
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/
> "><soap:Body><ns1:hasChildren
> xmlns:ns1="http://interfaces.ws.database.horus.biz/
>
> "><containerId>0</containerId><containerType>0</containerType></ns1:hasChildren></soap:Body></soap:Envelope>
>
>
>
> Here is the *HTTPS* proxy authentication request:
>
>
>
> CONNECT wwwXXX.biz:443 HTTP/1.1
>
> User-Agent: Java/1.7.0_25
>
> Host: wwwXXX.biz
>
> Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
>
> Proxy-Connection: keep-alive
>
>
>
> Do you have any idea which can help me?
>
>
>
> Thanks
>