Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(39)

Issue 1074673002: Add OAuth2 support for end users (i.e. 3-legged flow with the browser). (Closed)

Created:
5 years, 8 months ago by Vadim Sh.
Modified:
5 years, 8 months ago
Reviewers:
M-A Ruel
CC:
chromium-reviews, dpranke+depot_tools_chromium.org, iannucci+depot_tools_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Target Ref:
refs/remotes/origin/master
Project:
tools
Visibility:
Public.

Description

Add OAuth2 support for end users (i.e. 3-legged flow with the browser). This CL introduces new top level command for managing cached auth tokens: $ depot-tools-auth login codereview.chromium.org $ depot-tools-auth info codereview.chromium.org $ depot-tools-auth logout codereview.chromium.org All scripts that use rietveld.Rietveld internally should be able to use cached credentials created by 'depot-tools-auth' subcommand. Also 'depot-tools-auth' is the only way to run login flow. If some scripts stumbles over expired or revoked token, it dies with the error, asking user to run 'depot-tools-auth login <hostname>'. Password login is still default. OAuth2 can be enabled by passing --oauth2 to all scripts. R=maruel@chromium.org BUG=356813 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=294764

Patch Set 1 #

Total comments: 32

Patch Set 2 : #

Total comments: 2

Patch Set 3 : forgout to commit multistore_file.py modification #

Patch Set 4 : #

Total comments: 1

Patch Set 5 : fix bugs #

Total comments: 2

Patch Set 6 : #

Patch Set 7 : windows lineendings for depot-tools-auth.bat #

Unified diffs Side-by-side diffs Delta from patch set Stats (+668 lines, -351 lines) Patch
M .gitignore View 1 2 3 4 5 1 chunk +4 lines, -0 lines 0 comments Download
M auth.py View 1 2 3 5 chunks +466 lines, -16 lines 0 comments Download
A + depot-tools-auth View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
A + depot-tools-auth.bat View 1 2 3 4 5 6 2 chunks +2 lines, -2 lines 0 comments Download
A depot-tools-auth.py View 1 2 3 1 chunk +102 lines, -0 lines 0 comments Download
M git_cl.py View 1 2 chunks +11 lines, -0 lines 0 comments Download
D oauth2.py View 1 2 3 1 chunk +0 lines, -103 lines 0 comments Download
M tests/git_cl_test.py View 1 7 chunks +11 lines, -5 lines 0 comments Download
M third_party/oauth2client/MODIFICATIONS.diff View 1 3 chunks +32 lines, -2 lines 0 comments Download
M third_party/oauth2client/locked_file.py View 1 chunk +1 line, -1 line 0 comments Download
M third_party/oauth2client/multistore_file.py View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
M third_party/upload.py View 1 2 3 4 12 chunks +34 lines, -217 lines 0 comments Download

Messages

Total messages: 19 (6 generated)
Vadim Sh.
PTAL for general approach. I'll finish this CL tomorrow. Uploaded with --oauth2 :) Server side ...
5 years, 8 months ago (2015-04-09 06:21:59 UTC) #1
M-A Ruel
https://codereview.chromium.org/1074673002/diff/1/auth.py File auth.py (right): https://codereview.chromium.org/1074673002/diff/1/auth.py#newcode40 auth.py:40: OAUTH_CLIENT_SECRET = 'uBfbay2KCy9t4QveJ-dOqHtp' On 2015/04/09 06:21:59, Vadim Sh. wrote: ...
5 years, 8 months ago (2015-04-09 20:00:40 UTC) #2
Vadim Sh.
PTAL This CL is now complete (also rebased). USE_OAUTH2 file can be put into depot_tools/ ...
5 years, 8 months ago (2015-04-10 01:18:43 UTC) #3
M-A Ruel
lgtm https://codereview.chromium.org/1074673002/diff/1/auth.py File auth.py (right): https://codereview.chromium.org/1074673002/diff/1/auth.py#newcode129 auth.py:129: '--auth-tokens-cache', On 2015/04/10 01:18:42, Vadim Sh. wrote: > ...
5 years, 8 months ago (2015-04-10 01:25:56 UTC) #4
Vadim Sh.
Also removed (unused) oauth2.py since it was completely superseded by auth.py in functionality. https://codereview.chromium.org/1074673002/diff/20001/depot-tools-auth.bat File ...
5 years, 8 months ago (2015-04-10 02:11:56 UTC) #5
Vadim Sh.
I've tried to use OAuth2 with internal rietveld (that is not yet configured) and found ...
5 years, 8 months ago (2015-04-10 03:08:58 UTC) #6
M-A Ruel
lgtm https://codereview.chromium.org/1074673002/diff/80001/.gitignore File .gitignore (right): https://codereview.chromium.org/1074673002/diff/80001/.gitignore#newcode50 .gitignore:50: # Ignore "flag" file used by auth.py. This ...
5 years, 8 months ago (2015-04-10 13:40:59 UTC) #7
Vadim Sh.
https://codereview.chromium.org/1074673002/diff/80001/.gitignore File .gitignore (right): https://codereview.chromium.org/1074673002/diff/80001/.gitignore#newcode50 .gitignore:50: # Ignore "flag" file used by auth.py. On 2015/04/10 ...
5 years, 8 months ago (2015-04-10 18:45:27 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1074673002/100001
5 years, 8 months ago (2015-04-10 21:19:21 UTC) #11
commit-bot: I haz the power
Failed to apply patch for depot_tools/depot-tools-auth.bat: While running patch -p1 --forward --force --no-backup-if-mismatch; A depot_tools/depot-tools-auth.bat ...
5 years, 8 months ago (2015-04-10 21:19:34 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1074673002/120001
5 years, 8 months ago (2015-04-10 21:27:57 UTC) #16
commit-bot: I haz the power
Failed to apply patch for depot_tools/depot-tools-auth.bat: While running patch -p1 --forward --force --no-backup-if-mismatch; A depot_tools/depot-tools-auth.bat ...
5 years, 8 months ago (2015-04-10 21:28:13 UTC) #18
Vadim Sh.
5 years, 8 months ago (2015-04-10 21:30:25 UTC) #19
Message was sent while issue was closed.
Committed patchset #7 (id:120001) manually as 294764.

Powered by Google App Engine
This is Rietveld 408576698