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

Issue 1736009: Preliminary support for GSSAPI (Linux and Mac OS X). (Closed)

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

Description

Preliminary support for GSSAPI (Linux and Mac OS X). Second CL. BUG=33033 . TEST=None. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=48945

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Patch Set 6 : '' #

Patch Set 7 : '' #

Patch Set 8 : '' #

Total comments: 10

Patch Set 9 : '' #

Total comments: 31

Patch Set 10 : '' #

Patch Set 11 : '' #

Patch Set 12 : '' #

Total comments: 16

Patch Set 13 : '' #

Total comments: 6

Patch Set 14 : Fixed hang bug when GSSAPI lib is not present. #

Patch Set 15 : Submitting from correct branch now . . . #

Patch Set 16 : Cleanup. #

Total comments: 26

Patch Set 17 : More cleanup, and Native Library error message improvements. #

Total comments: 45

Patch Set 18 : Suggested changes. #

Patch Set 19 : Removed Native Library changes. #

Patch Set 20 : Removed remainder of Mac changes to Native Library. #

Total comments: 5

Patch Set 21 : Removed Native Library changes. #

Total comments: 20

Patch Set 22 : Bug and style fixes. #

Total comments: 9
Unified diffs Side-by-side diffs Delta from patch set Stats (+681 lines, -0 lines) Patch
A net/http/http_auth_gssapi_posix.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +196 lines, -0 lines 1 comment Download
A net/http/http_auth_gssapi_posix.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +454 lines, -0 lines 8 comments Download
A net/http/http_auth_gssapi_posix_unittest.cc View 1 2 3 4 7 8 9 1 chunk +25 lines, -0 lines 0 comments Download
M net/net.gyp View 1 2 3 4 5 6 7 8 9 11 12 13 14 15 16 17 3 chunks +6 lines, -0 lines 0 comments Download

Messages

Total messages: 27 (0 generated)
ahendrickson
This is the smaller initial code.
10 years, 7 months ago (2010-05-07 14:39:38 UTC) #1
ahendrickson
Added a missing source file.
10 years, 7 months ago (2010-05-07 14:53:13 UTC) #2
ahendrickson
Sigh. Removed extraneous source file.
10 years, 7 months ago (2010-05-07 14:55:09 UTC) #3
cbentzel
Quick first draft of comments. http://codereview.chromium.org/1736009/diff/61001/46009 File base/native_library_linux.cc (right): http://codereview.chromium.org/1736009/diff/61001/46009#newcode48 base/native_library_linux.cc:48: void* pv = dlsym(library, ...
10 years, 7 months ago (2010-05-07 18:09:17 UTC) #4
ahendrickson
http://codereview.chromium.org/1736009/diff/61001/46009 File base/native_library_linux.cc (right): http://codereview.chromium.org/1736009/diff/61001/46009#newcode48 base/native_library_linux.cc:48: void* pv = dlsym(library, name); On 2010/05/07 18:09:17, cbentzel ...
10 years, 7 months ago (2010-05-07 18:44:25 UTC) #5
cbentzel
http://codereview.chromium.org/1736009/diff/61001/46014 File net/http/http_network_transaction.cc (right): http://codereview.chromium.org/1736009/diff/61001/46014#newcode8 net/http/http_network_transaction.cc:8: #include <set> So this is worth doing but should ...
10 years, 7 months ago (2010-05-07 18:51:31 UTC) #6
ahendrickson
http://codereview.chromium.org/1736009/diff/61001/46014 File net/http/http_network_transaction.cc (right): http://codereview.chromium.org/1736009/diff/61001/46014#newcode8 net/http/http_network_transaction.cc:8: #include <set> On 2010/05/07 18:51:31, cbentzel wrote: > So ...
10 years, 7 months ago (2010-05-07 18:52:49 UTC) #7
cbentzel
Can you change this CL to assume that the third_party gssapi change will be approved?
10 years, 7 months ago (2010-05-14 18:37:34 UTC) #8
wtc
Andy, Thanks for the CL! Does this have enough code to work? Please see my ...
10 years, 7 months ago (2010-05-18 23:59:19 UTC) #9
wtc
Please note the bug number (33033) in the Description of this CL.
10 years, 7 months ago (2010-05-19 00:00:29 UTC) #10
cbentzel
wtc: This won't work as is (the http_auth_handler_negotiate_posix will need to be written to use ...
10 years, 7 months ago (2010-05-20 17:40:53 UTC) #11
ahendrickson
http://codereview.chromium.org/1736009/diff/66001/67001 File base/native_library_linux.cc (right): http://codereview.chromium.org/1736009/diff/66001/67001#newcode49 base/native_library_linux.cc:49: void* pv = dlsym(library, name); On 2010/05/18 23:59:19, wtc ...
10 years, 7 months ago (2010-05-28 16:14:04 UTC) #12
wtc
http://codereview.chromium.org/1736009/diff/66001/67003 File net/http/http_auth_gssapi_posix.cc (right): http://codereview.chromium.org/1736009/diff/66001/67003#newcode41 net/http/http_auth_gssapi_posix.cc:41: static const char* kLibraryNames[]; On 2010/05/28 16:14:04, ahendrickson wrote: ...
10 years, 7 months ago (2010-05-28 20:41:14 UTC) #13
cbentzel
Would it make sense to move the native library changes to a separate CL? http://codereview.chromium.org/1736009/diff/66001/67006 ...
10 years, 6 months ago (2010-06-01 17:35:42 UTC) #14
ahendrickson
http://codereview.chromium.org/1736009/diff/66001/67003 File net/http/http_auth_gssapi_posix.cc (right): http://codereview.chromium.org/1736009/diff/66001/67003#newcode41 net/http/http_auth_gssapi_posix.cc:41: static const char* kLibraryNames[]; On 2010/05/28 20:41:14, wtc wrote: ...
10 years, 6 months ago (2010-06-01 20:00:02 UTC) #15
cbentzel
LGTM, with some comments. Please provide more description in the CL text (use "Edit Issue" ...
10 years, 6 months ago (2010-06-01 20:29:57 UTC) #16
ahendrickson
Chris suggested breaking out the native library code into a separate CL, so I plan ...
10 years, 6 months ago (2010-06-01 21:54:15 UTC) #17
wtc
http://codereview.chromium.org/1736009/diff/129001/130005 File net/http/http_auth_gssapi_posix.cc (right): http://codereview.chromium.org/1736009/diff/129001/130005#newcode7 net/http/http_auth_gssapi_posix.cc:7: #include <string> Nit: http_auth_gssapi_posix.h already includes <string> "base/native_library.h" "net/http/http_auth.h" ...
10 years, 6 months ago (2010-06-02 01:38:33 UTC) #18
cbentzel
Sorry, some more comments. http://codereview.chromium.org/1736009/diff/129001/130005 File net/http/http_auth_gssapi_posix.cc (right): http://codereview.chromium.org/1736009/diff/129001/130005#newcode45 net/http/http_auth_gssapi_posix.cc:45: if (gssapi_library_) { I just ...
10 years, 6 months ago (2010-06-02 12:53:10 UTC) #19
wtc
Andy, Please make this CL independent of the NativeLibrary change completely, so that you can ...
10 years, 6 months ago (2010-06-02 19:37:57 UTC) #20
ahendrickson
http://codereview.chromium.org/1736009/diff/129001/130005 File net/http/http_auth_gssapi_posix.cc (right): http://codereview.chromium.org/1736009/diff/129001/130005#newcode7 net/http/http_auth_gssapi_posix.cc:7: #include <string> On 2010/06/02 01:38:33, wtc wrote: > Nit: ...
10 years, 6 months ago (2010-06-03 18:33:29 UTC) #21
cbentzel
LGTM! http://codereview.chromium.org/1736009/diff/142001/143001 File base/native_library.h (right): http://codereview.chromium.org/1736009/diff/142001/143001#newcode1 base/native_library.h:1: // Copyright (c) 2010 The Chromium Authors. All ...
10 years, 6 months ago (2010-06-03 19:47:15 UTC) #22
ahendrickson
http://codereview.chromium.org/1736009/diff/142001/143001 File base/native_library.h (right): http://codereview.chromium.org/1736009/diff/142001/143001#newcode1 base/native_library.h:1: // Copyright (c) 2010 The Chromium Authors. All rights ...
10 years, 6 months ago (2010-06-03 22:30:51 UTC) #23
wtc
I'll review the latest Patch Set. Andy, feel free to commit it first. http://codereview.chromium.org/1736009/diff/142001/143008 File ...
10 years, 6 months ago (2010-06-03 22:39:09 UTC) #24
wtc
LGTM. Some of my suggested changes below can be deferred to a future CL. Please ...
10 years, 6 months ago (2010-06-03 23:24:24 UTC) #25
ahendrickson
http://codereview.chromium.org/1736009/diff/146001/147001 File net/http/http_auth_gssapi_posix.cc (right): http://codereview.chromium.org/1736009/diff/146001/147001#newcode91 net/http/http_auth_gssapi_posix.cc:91: // Waiting for CL that adds error messages to ...
10 years, 6 months ago (2010-06-04 17:08:03 UTC) #26
wtc
10 years, 6 months ago (2010-06-04 21:10:33 UTC) #27
Andy,
ks!
This completes my review of this CL.  Please address these
issues in a follow-up CL.  Thanks!

http://codereview.chromium.org/1736009/diff/153001/154001
File net/http/http_auth_gssapi_posix.cc (right):

http://codereview.chromium.org/1736009/diff/153001/154001#newcode204
net/http/http_auth_gssapi_posix.cc:204: return StringPrintf("0x%08x 0x%08x",
major_status, minor_status);
Nit: be consistent with using either %x or %X in the format
string for major_status/minor_status.  You use %x here but
%X at line 213 below.

http://codereview.chromium.org/1736009/diff/153001/154001#newcode273
net/http/http_auth_gssapi_posix.cc:273: class ScopedBuffer {
ScopedBuffer is not being used.  Are you planning to use it
in the future?

http://codereview.chromium.org/1736009/diff/153001/154001#newcode365
net/http/http_auth_gssapi_posix.cc:365: input_token.length =
decoded_server_auth_token_.length();
We may need to pass GSS_NO_BUFFER instead of &input_token
to the first library_->init_sec_context call.  But it
seems that setting input_token.length to 0 is equivalent.

http://codereview.chromium.org/1736009/diff/153001/154001#newcode407
net/http/http_auth_gssapi_posix.cc:407: spn_buffer.value = const_cast<char
*>(spn_principal.data());
Use c_str() instead of data(), since spn_buffer.length below
has a + 1 for the terminating null byte.

http://codereview.chromium.org/1736009/diff/153001/154001#newcode417
net/http/http_auth_gssapi_posix.cc:417: LOG(WARNING) << "Problem importing name.
"
This log message should be at the ERROR level if we return
ERR_UNEXPECTED, which means a programming error (a bug in
our code).  Same with the LOG(WARNING) message at line 443
below.

http://codereview.chromium.org/1736009/diff/153001/154001#newcode425
net/http/http_auth_gssapi_posix.cc:425: // Create a security context.
This comment may not be accurate...  I think it's only
accurate for the first call to library_->init_sec_context.
In the second call, we just use the sec_context_ created by
the first call.

http://codereview.chromium.org/1736009/diff/153001/154001#newcode430
net/http/http_auth_gssapi_posix.cc:430: &sec_context_,
The returned sec_context_ value should be deleted with a
gss_delete_sec_context call in the destructor.

http://codereview.chromium.org/1736009/diff/153001/154001#newcode450
net/http/http_auth_gssapi_posix.cc:450: return (major_status != GSS_S_COMPLETE)
? ERR_IO_PENDING : OK;
Are you sure it's right to return ERR_IO_PENDING if
major_status is GSS_S_CONTINUE_NEEDED?  This function
doesn't operate in async mode (for example, it doesn't
have a "completion callback" argument that we can use to
notify completion asynchronously).

In HttpAuthSSPI::GetNextSecurityToken, we simply return OK
at this point.

http://codereview.chromium.org/1736009/diff/153001/154002
File net/http/http_auth_gssapi_posix.h (right):

http://codereview.chromium.org/1736009/diff/153001/154002#newcode176
net/http/http_auth_gssapi_posix.h:176: std::string* out_credentials);
Please rename out_credentials to auth_token to match the
comment at line 165 above (or you can change the comment
to match the code).

Powered by Google App Engine
This is Rietveld 408576698