Hi All,

I have a user that is trying to use the JAX-RS Client APIs in WebSphere
Liberty (based on CXF 3.1.8) to make a secured HTTPS request to a remote
server via a secured proxy server using authentication.

Here is a snippet of their code:
    MultivaluedMap<String, Object> headers = new
    MultivaluedHashMap<String, Object>();
    headers.add(AUTH_HEADER_NAME, getAuthorizationHeader());

    if (_proxyKey != null) {
        headers.add(PROXY_AUTH_HEADER_NAME,
getProxyAuthorizationHeader());
    }

    MessageResponse msgResponse = _client.target(_endPoint).path(_path)
        .queryParam(VERSION, VERSION_DATE)
        .request(MediaType.APPLICATION_JSON) // expected response mime type
        .headers(headers)
        .post(Entity.entity(msgRequest, MediaType.APPLICATION_JSON),
            MessageResponse.class);


The request is rejected by the Apache proxy server with a 407 error. Note
that they can send the same request using curl and authentication succeeds,
and the request is successfully sent to the end server through the
proxy.

According to the user, the JAX-RS client does not add a valid
Proxy-Authorization header field to the request.

Is this scenario possible with CXF?  Any hints for how to make it work?

Thanks in advance,

Andy

Reply via email to