Commit Graph

11 Commits (1fe11ccfe0ee780a0807ec8e2c023a30e3709316)

Author SHA1 Message Date
Allen Li acdf15a207 [newauth] Enable by default (reland) (include bots)
Originally
https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6418563

Bug: 404613530
Bug: 408427309
Change-Id: Ida2663110c8e2d4dbd50589bd88e81edb66a9c81
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6440133
Reviewed-by: Gavin Mak <gavinmak@google.com>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Allen Li <ayatane@chromium.org>
3 weeks ago
Allen Li 18bf67bbf5 [newauth] Enable by default (reland) (skip bots)
Originally
https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6418563

Bug: 404613530
Bug: 408427309
Change-Id: I17bf758f2dd342493d42c1b2dd233696f3ebef47
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6440137
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Allen Li <ayatane@chromium.org>
3 weeks ago
Allen Li 649a5cb26b [newauth] Recommend creds-check in warning
Dissuade users from removing their .gitcookies manually.

Just to create a single UX path and prevent possible issues.

Bug: 408225524
Change-Id: Ief48806dccf759ead8d145424c854561e09d43ea
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6440131
Commit-Queue: Allen Li <ayatane@chromium.org>
Reviewed-by: Gavin Mak <gavinmak@google.com>
3 weeks ago
Allen Li 47701fdcd0 [git_cl] Fix creds_check new auth switch logic pt 3
Third time's the charm.  The issue is still the "multi-valued boolean"
logic.  I introduce a new "switched on" concept to clarify things.

If new auth is "switched off", then all new auth related things are
off.  Simple enough.

There are two ways for new auth to be "switched on".  Either it is
explicitly enabled in the user's config, or we rolled out the default
to on.

When it is "switched on", we still rely on the presence of .gitcookies
to determine whether we enable new auth for depot_tools.  HOWEVER, we
must use the new git cl creds-check, because that is the intended way
for users to remove their .gitcookies file.

                     | auth logic | creds-check |
switched off         | old        | old         |
switched on +cookies | old        | new         |
switched on -cookies | new        | new         |

Change-Id: I311089960d78d8be2cdffd00e4515bfebf0f8f58
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6439385
Commit-Queue: Allen Li <ayatane@chromium.org>
Reviewed-by: Gavin Mak <gavinmak@google.com>
3 weeks ago
Scott Lee 36bfafbc82 Revert "[newauth] Enable by default"
This reverts commit 2e9d2d7ebe.

Reason for revert: this is the possible culprit for b/408427309

Original change's description:
> [newauth] Enable by default
>
> Bug: 404613530
> Change-Id: If0a214fe074d7e7591b5d37417ca447525c983b6
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6418563
> Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
> Commit-Queue: Allen Li <ayatane@chromium.org>

Bug: 404613530, 408427309
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: Ib919b2f3d852709c0e80622b4ad97327ac2ea5bf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6434729
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Ben Pastene <bpastene@chromium.org>
Reviewed-by: Scott Lee <ddoman@chromium.org>
Commit-Queue: Scott Lee <ddoman@chromium.org>
4 weeks ago
Allen Li 2e9d2d7ebe [newauth] Enable by default
Bug: 404613530
Change-Id: If0a214fe074d7e7591b5d37417ca447525c983b6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6418563
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Allen Li <ayatane@chromium.org>
4 weeks ago
Allen Li e73ad0d422 [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>
1 month ago
Allen Li 2bfa28f442 [newauth] Print warning for .gitcookies file
This will print a warning and disable new auth if .gitcookies file
exists.

This ensures we don't break bots once we default new auth on while
pushing human users away from .gitcookies.

Bug: b/404613530
Change-Id: Ia2d05bb7e5d2bf11e5605a26ef492954acbd9833
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6367723
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Allen Li <ayatane@chromium.org>
1 month ago
Allen Li 8715e8e64d [git_cl] Let creds-check revert new auth config changes
Gated this behind new auth flag explicitly being set (so people who
haven't set anything = default off don't run this, just in case)

Bug: b/351024645
Change-Id: I8498b98404ad89d3ca390d3baa798daee0b4b53b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5698379
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Allen Li <ayatane@chromium.org>
10 months ago
Allen Li 1e4251b6ea [newauth] Accept standard Git bool values
Just some "syntactic" sugar (at the very least we should probably have
used 'true' from the beginning)

https://git-scm.com/docs/git-config#Documentation/git-config.txt-boolean

Bug: b/348024314
Change-Id: I9ec3b12012444662289619ac955885e732945fe2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5641085
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Allen Li <ayatane@chromium.org>
10 months ago
Allen Li fa1bba51d7 [gerrit_util] Add newauth.py helper
These checks will be needed in git_cl.py and probably other places.

Make it easy to change the default to opt-in as some point (and for
deletion later).

Bug: b/348024314
Change-Id: I768986e47ec2e86604268d74ca2b632458263bba
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5641084
Commit-Queue: Allen Li <ayatane@chromium.org>
Reviewed-by: Gavin Mak <gavinmak@google.com>
10 months ago