hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ka-Lok Fung (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HTTPCLIENT-1541) Use correct service principle name (HTTP/hostname) for WinHttpClients
Date Thu, 21 Aug 2014 01:55:37 GMT

     [ https://issues.apache.org/jira/browse/HTTPCLIENT-1541?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Ka-Lok Fung updated HTTPCLIENT-1541:
------------------------------------

    Attachment: HTTPCLIENT-1541.patch.diff

If the user hasn't provided an explicit SPN, this patch calculates the default SPN based upon
{{HttpContext}}. Note that I am changing the previously default SPN names (user, localhost)
because I believe they are incorrect based upon [the documentation|http://httpclient-users.markmail.org/message/kaq4bao6eoz4k6ri].
Furthermore, the user can always override them if they choose to do so.

This patch has 2 additional changes:
* I've have taken some initial steps in logging some useful things. I think the requirements
of logging should be driven by what users commonly encounter in the wild.
* I also updated {{parseChallenge}} so {{dispose}} is called before the exception is thrown,
to allow things held by Windows to be cleaned up.

All comments are welcome.

> Use correct service principle name (HTTP/hostname) for WinHttpClients
> ---------------------------------------------------------------------
>
>                 Key: HTTPCLIENT-1541
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1541
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpAuth
>    Affects Versions: 4.4 Alpha1
>         Environment: Windows
>            Reporter: Ka-Lok Fung
>             Fix For: 4.4 Final
>
>         Attachments: HTTPCLIENT-1541.patch.diff
>
>
> If we use {{WinHttpClients}} as is, HTTP Negotiate authentication won't work because
the ticket being generated always uses 'null' as the service principle name (SPN).
> According to the informational [RFC 4559|http://www.rfc-editor.org/rfc/rfc4559.txt],
the service principle name (SPN) should be in the following form: {{HTTP/hostname}}.
> Users can work around it ourselves if we did something similar to http://stackoverflow.com/a/22865583
but it would be great if the sample code works out of the box :-)



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Mime
View raw message