summaryrefslogtreecommitdiffstats
path: root/net/http/url_security_manager.h
diff options
context:
space:
mode:
authorcbentzel@chromium.org <cbentzel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-19 20:04:56 +0000
committercbentzel@chromium.org <cbentzel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-19 20:04:56 +0000
commit597313aef807e2040bdfacbc0641edf499510a53 (patch)
tree118df8a05a1a4d0294f1a0f6ccffb4d3d58f928d /net/http/url_security_manager.h
parente4ee7557d7764c9b83db15ed0c9659f404a9071b (diff)
downloadchromium_src-597313aef807e2040bdfacbc0641edf499510a53.zip
chromium_src-597313aef807e2040bdfacbc0641edf499510a53.tar.gz
chromium_src-597313aef807e2040bdfacbc0641edf499510a53.tar.bz2
Don't do Negotiate with GSSAPI if default credentials are not allowed.
GSSAPI does not provide a mechanism for the user to specify username/password to obtain a TGT. If default credentials are not allowed for an end site, skip negotiate and use a different scheme. Arguably in this case it may make sense to simply prompt the user whether they want to use their existing Kerberos credentials to authenticate to the server and use the existing TGT, but we'll need UI changes. BUG=33033 TEST=net_unittests, try to authenticate to a Kerberized server which is not in the whitelist. Review URL: http://codereview.chromium.org/3013003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52943 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/url_security_manager.h')
-rw-r--r--net/http/url_security_manager.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/net/http/url_security_manager.h b/net/http/url_security_manager.h
index 5f68e3a..cd80a7d 100644
--- a/net/http/url_security_manager.h
+++ b/net/http/url_security_manager.h
@@ -47,6 +47,22 @@ class URLSecurityManagerWhitelist : public URLSecurityManager {
DISALLOW_COPY_AND_ASSIGN(URLSecurityManagerWhitelist);
};
+#if defined(UNIT_TEST)
+// An URLSecurityManager which always allows default credentials.
+class URLSecurityManagerAllow : public URLSecurityManager {
+ public:
+ URLSecurityManagerAllow() {}
+ virtual ~URLSecurityManagerAllow() {}
+
+ virtual bool CanUseDefaultCredentials(const GURL& auth_origin) {
+ return true;
+ }
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(URLSecurityManagerAllow);
+};
+#endif // defined(UNIT_TEST)
+
} // namespace net
#endif // NET_HTTP_URL_SECURITY_MANAGER_H_