From e73ad0d422146d5e9edc4bdb171500474b566ab8 Mon Sep 17 00:00:00 2001 From: Allen Li Date: Wed, 19 Mar 2025 16:00:52 -0700 Subject: [PATCH] [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 Reviewed-by: Josip Sokcevic --- gerrit_util.py | 9 --------- newauth.py | 7 ------- 2 files changed, 16 deletions(-) diff --git a/gerrit_util.py b/gerrit_util.py index f15f9ff972..eef2f57490 100644 --- a/gerrit_util.py +++ b/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 diff --git a/newauth.py b/newauth.py index ac18c25ddc..5a8cf788c5 100644 --- a/newauth.py +++ b/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')