hinoka@chromium.org c6a2ee6930 Adds SSO auth to gsutil
Code path:
1. plugins.sso_auth is imported, which adds the AuthHandler class to the global state.
2. HasConfiguredCredentials() in gslib/utils.py is called by gsutil, and will return true if "prodaccess" exists on the system, which tells the system that we don't want a no-op auth handler.
3. When a command is called, all the auth handlers are cycled through and sso_auth.SSOAuth is called, which calls a stubby command to emit a gaiamint'ed oauth2 access token, which is then used as the Authorization Header

if --bypass_prodaccess is passed in, then:
1. HasConfiguredCredentials() will bypass the check for prodaccess, as if it didn't exist.
2. plugins.sso_auth does not get imported.
Which will essentially cause gsutil to behave as if this patch never existed.

So the expected behavior is:
=.boto file does not exist, prodaccess exists, but unauthenticated=
Failure: No handler was ready to authenticate. 3 handlers were checked. ['OAuth2Auth', 'HmacAuthV1Handler', 'SSOAuth'] Check your credentials.

=.boto file exists, prodaccess exists, but unauthenticated=
sso_auth will raise NotReadyToAuthenticate, and the .boto file will be used instead

=.boto file exists, prodaccess exists, authenticated=
sso_auth will be run _after_ the default gsutil authenticator, which causes the sso_auth to be used over whatever the default authentication is.

bypass_prodaccess is passed in by default to upload_to_google_storage because we expect people who use upload_to_google_storage to not need prodaccess and have their own boto file already.  Also the sso_auth plugin will only request a readonlyi token, which will not work for uploading.

BUG=258152

Review URL: https://codereview.chromium.org/86123002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@240266 0039d316-1c4b-4281-b951-d872f2087c98
2013-12-12 08:26:18 +00:00
2013-05-04 00:45:09 +00:00
2013-12-12 08:26:18 +00:00
2013-12-12 08:26:18 +00:00
2012-03-23 19:33:18 +00:00
2012-03-23 19:33:18 +00:00
2011-09-27 23:38:46 +00:00
2011-09-27 23:38:46 +00:00
2011-09-27 23:38:46 +00:00
2013-06-07 01:04:53 +00:00
2012-12-17 18:20:02 +00:00
2012-03-23 19:33:18 +00:00
2013-11-25 14:44:39 +00:00
2013-04-04 07:51:07 +00:00
2013-12-09 15:05:32 +00:00
2011-12-13 20:44:10 +00:00
2013-11-01 22:58:54 +00:00
2013-03-22 22:26:04 +00:00
2013-03-21 12:04:52 +00:00
2013-01-26 04:09:50 +00:00
2011-09-27 23:38:46 +00:00
2013-10-16 22:00:36 +00:00
2013-11-01 22:58:54 +00:00
2012-04-13 15:39:49 +00:00
2011-09-27 23:38:46 +00:00
2013-07-04 20:33:11 +00:00
2012-09-12 21:02:02 +00:00

This package contains tools for working with Chromium development.

The "gclient" wrapper knows how to keep this repository updated to
the latest versions of these tools as found at:

    http://src.chromium.org/svn/trunk/tools/depot_tools

This package contains:

  chrome-update-create-task.bat
    Creates a scheduled task to do an automatic local chromium build every day.

  cpplint.py
    A copy of our linting tool which enforces Google style. Fetched from
    http://google-styleguide.googlecode.com/svn/trunk/cpplint/cpplint.py

  gcl
    A tool for uploading and managing code reviews on the Chromium
    project, using the Rietveld code review tool.  More info at:
    http://code.google.com/p/rietveld/

  gclient
    A script for managing a workspace with modular dependencies that
    are each checked out independently from different repositories.
    More info at:
    http://code.google.com/p/gclient/

  hammer
    A wrapper script for building Chromium with the SCons software
    construction tool.  More info at:
    http://www.scons.org/

Note: svn and python will be installed automatically if not accessible (on
Windows only).

To update this distribution manually, run .\update_depot_tools.bat on Windows,
or ./update_depot_tools on Linux or Mac.

To disable automatic updating, set the environment variable DEPOT_TOOLS_UPDATE=0
Description
No description provided
Readme BSD-3-Clause 210 MiB
Languages
Python 97.1%
Shell 1.1%
Roff 1.1%
Batchfile 0.7%