From a7d3e6cea3ef08166ba3761970d7b383ad2c9dca Mon Sep 17 00:00:00 2001 From: Shawn Pearce Date: Fri, 23 May 2014 11:50:06 -0700 Subject: [PATCH] OpenID: Remove support for Google Accounts From May 19, 2014[1] Google is no longer allowing new servers to use OpenID API to authenticate user accounts. From April 20, 2015 Google will shut down the OpenID service. Delete Google Account suggestion from the web interface. [1] https://developers.google.com/+/api/auth-migration#timetable Change-Id: Idcf4e5a528e574c0042c897db87ea821fbf89315 --- Documentation/config-contact.txt | 1 - Documentation/config-sso.txt | 4 ++-- .../java/com/google/gerrit/common/auth/openid/OpenIdUrls.java | 2 -- .../com/google/gerrit/client/account/MyIdentitiesScreen.java | 2 +- .../java/com/google/gerrit/httpd/auth/openid/LoginForm.java | 1 - .../com/google/gerrit/httpd/auth/openid/LoginForm.html | 4 ---- 6 files changed, 3 insertions(+), 11 deletions(-) diff --git a/Documentation/config-contact.txt b/Documentation/config-contact.txt index 58df8eab02..e0795be19e 100644 --- a/Documentation/config-contact.txt +++ b/Documentation/config-contact.txt @@ -142,7 +142,6 @@ Date: 2009-02-23 20:32:32.852 UTC Full-Name: John Doe Preferred-Email: jdoe@example.com Identity: jd15@some-isp.com -Identity: jdoe@example.com Identity: jdoe@example.com Address: 123 Any Street diff --git a/Documentation/config-sso.txt b/Documentation/config-sso.txt index 5c7c273c04..561309bfaa 100644 --- a/Documentation/config-sso.txt +++ b/Documentation/config-sso.txt @@ -43,9 +43,9 @@ will match any OpenID provider on the Internet: * `http://` -- trust all OpenID providers using the HTTP protocol * `https://` -- trust all OpenID providers using the HTTPS protocol -To trust only Google Accounts: +To trust only Yahoo!: ==== - git config --file $site_path/etc/gerrit.config auth.trustedOpenID 'https://www.google.com/accounts/o8/id?id=' + git config --file $site_path/etc/gerrit.config auth.trustedOpenID https://me.yahoo.com ==== === Database Schema diff --git a/gerrit-common/src/main/java/com/google/gerrit/common/auth/openid/OpenIdUrls.java b/gerrit-common/src/main/java/com/google/gerrit/common/auth/openid/OpenIdUrls.java index 706f465a25..ba0bb7585e 100644 --- a/gerrit-common/src/main/java/com/google/gerrit/common/auth/openid/OpenIdUrls.java +++ b/gerrit-common/src/main/java/com/google/gerrit/common/auth/openid/OpenIdUrls.java @@ -19,6 +19,4 @@ public class OpenIdUrls { public static final String LASTID_COOKIE = "gerrit.last_openid"; public static final String URL_YAHOO = "https://me.yahoo.com"; - public static final String URL_GOOGLE = - "https://www.google.com/accounts/o8/id"; } diff --git a/gerrit-gwtui/src/main/java/com/google/gerrit/client/account/MyIdentitiesScreen.java b/gerrit-gwtui/src/main/java/com/google/gerrit/client/account/MyIdentitiesScreen.java index 0de353d266..625d01ed21 100644 --- a/gerrit-gwtui/src/main/java/com/google/gerrit/client/account/MyIdentitiesScreen.java +++ b/gerrit-gwtui/src/main/java/com/google/gerrit/client/account/MyIdentitiesScreen.java @@ -245,7 +245,7 @@ public class MyIdentitiesScreen extends SettingsScreen { // return ""; - } else if (k.isScheme(OpenIdUrls.URL_GOOGLE)) { + } else if (k.isScheme("https://www.google.com/accounts/o8/id")) { return OpenIdUtil.C.nameGoogle(); } else if (k.isScheme(OpenIdUrls.URL_YAHOO)) { diff --git a/gerrit-openid/src/main/java/com/google/gerrit/httpd/auth/openid/LoginForm.java b/gerrit-openid/src/main/java/com/google/gerrit/httpd/auth/openid/LoginForm.java index 395b9f2a7a..045835fb55 100644 --- a/gerrit-openid/src/main/java/com/google/gerrit/httpd/auth/openid/LoginForm.java +++ b/gerrit-openid/src/main/java/com/google/gerrit/httpd/auth/openid/LoginForm.java @@ -56,7 +56,6 @@ import javax.servlet.http.HttpServletResponse; class LoginForm extends HttpServlet { private static final Logger log = LoggerFactory.getLogger(LoginForm.class); private static final ImmutableMap ALL_PROVIDERS = ImmutableMap.of( - "google", OpenIdUrls.URL_GOOGLE, "yahoo", OpenIdUrls.URL_YAHOO); private final ImmutableSet suggestProviders; diff --git a/gerrit-openid/src/main/resources/com/google/gerrit/httpd/auth/openid/LoginForm.html b/gerrit-openid/src/main/resources/com/google/gerrit/httpd/auth/openid/LoginForm.html index f5734ffe45..0a2d6abe9d 100644 --- a/gerrit-openid/src/main/resources/com/google/gerrit/httpd/auth/openid/LoginForm.html +++ b/gerrit-openid/src/main/resources/com/google/gerrit/httpd/auth/openid/LoginForm.html @@ -57,10 +57,6 @@ Cancel -