You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by Deepak Mishra <dk...@gmail.com> on 2012/11/06 04:05:59 UTC

getting error in using kerberos authentication with proxy server

Hi,
I need to communicate to a URL on internet through a proxy server. The
proxy server has kerberos authentication integrated with an Active
Directory. In my program I specify the "Proxy server" and a valid Active
Directory user account for the Proxy Server but communication fails with an
error that Proxy Authentication Required. By debugging I see that
InitSecContext method has been called and a service ticket have been
fetched. PFA programOutput.txt the output of program.
It seems to me that code in GGSSchemeBase is inconsistent. In the method
authenticate, the state is set to TOKEN_GENERATED; but when parseChallenge
method is called again by the HttpAthenticator class, the state is set to
FAILED. Following is the code in GGSSchemeBase.java method parseChallenge

if (state == State.UNINITIATED) {
    token = base64codec.decode(challenge.getBytes());
    state = State.CHALLENGE_RECEIVED;
} else {
    log.debug("Authentication already attempted");
    state = State.FAILED;
}

If some one has already used Kerberos authentication with proxy server or
target server, please give me some sample code.

Thank you for help.
Deepak