Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(921)

Issue 1535019: Kerberos SPN generation for Negotiate challenges (Closed)

Created:
10 years, 8 months ago by cbentzel
Modified:
9 years, 7 months ago
CC:
chromium-reviews, darin-cc_chromium.org, pam+watch_chromium.org, John Grabowski, ben+cc_chromium.org, Paweł Hajdan Jr.
Visibility:
Public.

Description

Kerberos uses an SPN (Service Principal Name) to identify a server. This is typically in the form "HTTP/host:port", with the ":port" suffix being optional, and the "HTTP/" prefix is fixed regardless of whether the service is accessed over HTTP or HTTPS. The issue this is fixing is that the URL host may be an incomplete domain name, a numerical address, or an alias for a canonical DNS name. By default, Chrome will skip adding the optional port to the SPN, and will use the canonical DNS name for the server (which may be the original server name if it is an A or AAAA record). This matches IE and Firefox's default behavior. Some intranets are set up so the original host name should be used rather than the canonical name. The canonical name resolution can be disabled with the --disable-spnego-cname-lookup command line flag. Some intranets are also set up so the optional port should be specified when it is non-standard (non 80 or 443). Use the --enable-spnego-port command line flag. BUG=29862 TEST=net_unittests.exe --gtest_filter="*CanonicalName*" Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=44526

Patch Set 1 #

Total comments: 3

Patch Set 2 : Numerous changes. #

Patch Set 3 : SPN becomes FQDN #

Patch Set 4 : Command line options for SPN generation. #

Patch Set 5 : Remove unintended executable bit on net.gyp #

Patch Set 6 : Fix posix builds. #

Total comments: 48

Patch Set 7 : Unit test for FQDN. #

Patch Set 8 : Fix issues which wtc raised. #

Patch Set 9 : Merge with head. #

Total comments: 25

Patch Set 10 : Numerous fixes to wtc/eroman's concern. #

Patch Set 11 : Small change to unit test. #

Patch Set 12 : Forgot to include chrome_switches.h changes. #

Total comments: 2

Patch Set 13 : Some formatting tweaks. #

Patch Set 14 : Store the user callback. #

Total comments: 6

Patch Set 15 : Resolving a couple of nits. #

Patch Set 16 : Fix to GetCanonicalName that is another CL. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+480 lines, -32 lines) Patch
M chrome/browser/io_thread.cc View 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +13 lines, -0 lines 0 comments Download
M chrome/common/chrome_switches.h View 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/common/chrome_switches.cc View 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +11 lines, -0 lines 0 comments Download
M net/base/address_list.cc View 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M net/http/http_auth_handler.h View 1 2 3 4 5 6 7 8 9 4 chunks +18 lines, -2 lines 0 comments Download
M net/http/http_auth_handler.cc View 2 3 4 5 6 7 8 9 2 chunks +9 lines, -0 lines 0 comments Download
M net/http/http_auth_handler_factory.h View 2 3 2 chunks +7 lines, -3 lines 0 comments Download
M net/http/http_auth_handler_negotiate.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 8 chunks +39 lines, -1 line 0 comments Download
M net/http/http_auth_handler_negotiate_posix.cc View 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +14 lines, -1 line 0 comments Download
M net/http/http_auth_handler_negotiate_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 5 chunks +112 lines, -6 lines 0 comments Download
M net/http/http_auth_handler_ntlm.h View 1 chunk +3 lines, -0 lines 0 comments Download
M net/http/http_auth_handler_ntlm.cc View 2 3 4 5 6 7 8 9 3 chunks +11 lines, -1 line 0 comments Download
M net/http/http_auth_handler_ntlm_win.cc View 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M net/http/http_auth_sspi_win.h View 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +4 lines, -4 lines 0 comments Download
M net/http/http_auth_sspi_win.cc View 2 3 4 5 6 7 8 9 10 11 12 13 14 5 chunks +4 lines, -11 lines 0 comments Download
M net/http/http_network_transaction.h View 1 2 3 4 5 6 7 8 9 2 chunks +4 lines, -0 lines 0 comments Download
M net/http/http_network_transaction.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +30 lines, -0 lines 0 comments Download
M net/http/http_network_transaction_unittest.cc View 3 4 5 6 7 8 9 10 11 12 2 chunks +197 lines, -1 line 0 comments Download

Messages

Total messages: 23 (0 generated)
cbentzel
This is a rough skeleton of the code to generate a correct SPN for Kerberos ...
10 years, 8 months ago (2010-04-02 20:53:11 UTC) #1
wtc
cbentzel: this approach looks good. The SPN resolution can be done by HttpNetworkTransaction itself rather ...
10 years, 8 months ago (2010-04-02 21:26:01 UTC) #2
cbentzel
wtc: I addressed all of your issues. I've made a number of other updates to ...
10 years, 8 months ago (2010-04-09 15:40:24 UTC) #3
Paweł Hajdan Jr.
Drive-by with a test comment. http://codereview.chromium.org/1535019/diff/11016/8034 File net/http/http_network_transaction_unittest.cc (right): http://codereview.chromium.org/1535019/diff/11016/8034#newcode4682 net/http/http_network_transaction_unittest.cc:4682: #if 0 How about ...
10 years, 8 months ago (2010-04-09 16:53:47 UTC) #4
cbentzel
http://codereview.chromium.org/1535019/diff/11016/8034 File net/http/http_network_transaction_unittest.cc (right): http://codereview.chromium.org/1535019/diff/11016/8034#newcode4682 net/http/http_network_transaction_unittest.cc:4682: #if 0 On 2010/04/09 16:53:50, Paweł Hajdan Jr. wrote: ...
10 years, 8 months ago (2010-04-09 17:27:26 UTC) #5
cbentzel
One other point - this incorrectly changes how the SPNs are generated for the NTLM ...
10 years, 8 months ago (2010-04-09 18:36:53 UTC) #6
wtc
LGTM. I reviewed everything except for the new commented-out http network transaction unit test. We ...
10 years, 8 months ago (2010-04-09 19:42:48 UTC) #7
cbentzel
Thanks - I agree with the need for another round of review. I'm nearly done ...
10 years, 8 months ago (2010-04-09 19:54:45 UTC) #8
cbentzel
http://codereview.chromium.org/1535019/diff/11016/8019 File chrome/common/chrome_switches.cc (right): http://codereview.chromium.org/1535019/diff/11016/8019#newcode46 chrome/common/chrome_switches.cc:46: // Use an alias CNAME record for the Kerberos ...
10 years, 8 months ago (2010-04-09 20:59:37 UTC) #9
wtc
http://codereview.chromium.org/1535019/diff/11016/8021 File net/base/address_list.cc (right): http://codereview.chromium.org/1535019/diff/11016/8021#newcode138 net/base/address_list.cc:138: if (!data_ || !data_->head || !data_->head->ai_canonname) I agree with ...
10 years, 8 months ago (2010-04-09 21:46:38 UTC) #10
cbentzel
Thanks again for the review. I think I'll try to get a unit test for ...
10 years, 8 months ago (2010-04-10 04:03:08 UTC) #11
eroman
WARNING: This is going to crash if the HttpNetworkTransaction is deleted while a CNAME resolution ...
10 years, 8 months ago (2010-04-12 22:55:44 UTC) #12
cbentzel
Ay carumba - good catch! On Apr 12, 2010 6:56 PM, <eroman@chromium.org> wrote: WARNING: This ...
10 years, 8 months ago (2010-04-12 23:20:24 UTC) #13
wtc
LGTM. Please update the CL's description before you check this in. In particular: - the ...
10 years, 8 months ago (2010-04-12 23:21:16 UTC) #14
wtc
On 2010/04/12 22:55:44, eroman wrote: > ... my un-informed gut feeling is that the FQDN ...
10 years, 8 months ago (2010-04-12 23:36:13 UTC) #15
cbentzel
Thanks again for the reviews. I'll definitely fix the crashing problem Eric Roman pointed out. ...
10 years, 8 months ago (2010-04-13 01:36:27 UTC) #16
wtc
Chris, To make code review easier, you can check in this CL first (after cleaning ...
10 years, 8 months ago (2010-04-13 01:41:38 UTC) #17
cbentzel
On 2010/04/12 23:21:16, wtc wrote: > I'd like to see the following two terminology issues ...
10 years, 8 months ago (2010-04-13 15:15:34 UTC) #18
cbentzel
http://codereview.chromium.org/1535019/diff/6002/37002 File chrome/common/chrome_switches.cc (right): http://codereview.chromium.org/1535019/diff/6002/37002#newcode46 chrome/common/chrome_switches.cc:46: // Use an alias instead of trying to determine ...
10 years, 8 months ago (2010-04-13 20:09:30 UTC) #19
cbentzel
http://codereview.chromium.org/1535019/diff/50001/51015 File net/http/http_network_transaction.cc (right): http://codereview.chromium.org/1535019/diff/50001/51015#newcode578 net/http/http_network_transaction.cc:578: rv = DoResolveCanonicalName(); I have a pending change which ...
10 years, 8 months ago (2010-04-13 21:07:16 UTC) #20
wtc
LGTM. http://codereview.chromium.org/1535019/diff/13002/52002 File chrome/common/chrome_switches.cc (right): http://codereview.chromium.org/1535019/diff/13002/52002#newcode175 chrome/common/chrome_switches.cc:175: extern const char kDisableSpnegoCnameLookup[] = "disable-spnego-cname-lookup"; I would ...
10 years, 8 months ago (2010-04-13 23:31:37 UTC) #21
wtc
http://codereview.chromium.org/1535019/diff/50001/51015 File net/http/http_network_transaction.cc (right): http://codereview.chromium.org/1535019/diff/50001/51015#newcode578 net/http/http_network_transaction.cc:578: rv = DoResolveCanonicalName(); On 2010/04/13 21:07:17, cbentzel wrote: > ...
10 years, 8 months ago (2010-04-13 23:34:52 UTC) #22
cbentzel
10 years, 8 months ago (2010-04-14 13:43:31 UTC) #23
The latest patchset resolves your last few concerns and naming suggestions.

I'll commit this (pending trybot success) and make the other changes in separate
CLs.

Powered by Google App Engine
This is Rietveld 408576698