Sfoglia il codice sorgente

[newauth] Remove SkipSSO support

This was only for testing.

Bug: b/404613530
Change-Id: I8e79f14036f027aed91933158805b6ec4c03b266
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6373672
Commit-Queue: Allen Li <ayatane@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Allen Li 5 mesi fa
parent
commit
e73ad0d422
2 ha cambiato i file con 0 aggiunte e 16 eliminazioni
  1. 0 9
      gerrit_util.py
  2. 0 7
      newauth.py

+ 0 - 9
gerrit_util.py

@@ -195,8 +195,6 @@ def CheckShouldUseSSO(host: str, email: str) -> SSOCheckResult:
         return SSOCheckResult(False, 'not opted in')
     if not host.endswith('.googlesource.com'):
         return SSOCheckResult(False, f'non-googlesource host {host}')
-    if newauth.SkipSSO():
-        return SSOCheckResult(False, 'skip SSO is set in config')
     if not ssoHelper.find_cmd():
         return SSOCheckResult(False, 'no SSO command')
     if gclient_utils.IsEnvCog():
@@ -277,9 +275,6 @@ class _Authenticator(object):
 
             use_new_auth = newauth.Enabled()
 
-            # Allow skipping SSOAuthenticator for local testing purposes.
-            skip_sso = newauth.SkipSSO()
-
             if use_new_auth:
                 LOGGER.debug('_Authenticator.get: using new auth stack')
                 if LuciContextAuthenticator.is_applicable():
@@ -296,10 +291,6 @@ class _Authenticator(object):
                         GitCredsAuthenticator(),
                         NoAuthenticator(),
                     ]
-                    if skip_sso:
-                        LOGGER.debug(
-                            'Authenticator.get: skipping SSOAuthenticator.')
-                        a = a[1:]
                     ret = ChainedAuthenticator(a)
                 cls._resolved = ret
                 return ret

+ 0 - 7
newauth.py

@@ -63,10 +63,3 @@ def ExplicitlyDisabled() -> bool:
     return scm.GIT.GetConfig(os.getcwd(),
                              'depot-tools.usenewauthstack') in ('no', 'off',
                                                                 'false', '0')
-
-
-def SkipSSO() -> bool:
-    """Returns True if skip SSO is set."""
-    return scm.GIT.GetConfig(os.getcwd(),
-                             'depot-tools.newauthskipsso') in ('yes', 'on',
-                                                               'true', '1')