Hey Ivan.
On Mon, Feb 10, 2014 at 10:43 AM, Ivan Zhakov <
iv...@visualsvn.com> wrote:
> Hi Lieven,
>
> On 8 February 2014 04:07, Lieven Govaerts <
l...@apache.org> wrote:
>> Hi Michael,
>>
>>
>> Attached patch fixes the problem for me, on Mac OS X using MIT kerberos.
>>
>> What it does is use the hostname as provided by the application,
>> instead of doing a reverse lookup from the address structure the
>> application provided.
> I believe this workaround ...
This is not a workaround, but removal of an unneeded workaround.
> ... should be moved to platform specific code to
> keep current Windows behavior unaffected. Because SSPI based
> implementation already does this lookup internally.
>
It won'tl impact the SSPI implementation negatively, on the contrary,
it'll reduce one lookup when working with a proxy:
What we were doing now before this patch for Negotiate authn over a proxy:
1. application: hostname -> ip address
2. auth_spnego: ip address -> canonical hostname
3. auth_spnego_sspi: canonical hostname -> canonical hostname
4. auth_spnego_sspi: canonical hostname passed to InitializeSecurityContextA
The patch eliminates the second step, which means that the flow for
SPNego with SSPI now becomes:
1. application: hostname -> ip address
2. auth_spnego_sspi: hostname -> canonical hostname
3. auth_spnego_sspi: canonical hostname passed to InitializeSecurityContextA
And for the MIT Kerberos/Heimdal implementation:
1. application: hostname -> ip address
2. auth_spnego_gss: hostname -> gss_init_sec_context
Letting the GSSAPI mechanism do the canonicalisation gives me the
option to bypass the getaddrinfo call in MIT Kerberos via the "rdns =
false" option in the krb5.conf file.
Makes me wonder why you added get_canonical_hostname in the first
place, doesn't SSPI/Negotiation or SSPI/NTLM canonicalise the hostname
already?
regards,
Lieven