mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 02:31:29 +00:00
[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>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user