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

Issue 1496573002: Ensure Sync access token is revoked when user is signed out. (Closed)

Created:
5 years ago by bzanotti
Modified:
5 years ago
Reviewers:
Nicolas Zea
CC:
chromium-reviews, tim+watch_chromium.org, pvalenzuela+watch_chromium.org, maxbogue+watch_chromium.org, plaree+watch_chromium.org, zea+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Ensure Sync access token is revoked when user is signed out. This is needed to avoid the same access token to be re-used after the next sign in, even if the account is different. BUG=563416

Patch Set 1 #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+23 lines, -1 line) Patch
M chrome/browser/sync/profile_sync_service_unittest.cc View 1 chunk +21 lines, -0 lines 0 comments Download
M components/browser_sync/browser/profile_sync_service.cc View 1 chunk +2 lines, -1 line 3 comments Download

Messages

Total messages: 11 (4 generated)
bzanotti
Please take a look.
5 years ago (2015-12-02 15:27:06 UTC) #2
Nicolas Zea
https://codereview.chromium.org/1496573002/diff/1/components/browser_sync/browser/profile_sync_service.cc File components/browser_sync/browser/profile_sync_service.cc (right): https://codereview.chromium.org/1496573002/diff/1/components/browser_sync/browser/profile_sync_service.cc#newcode769 components/browser_sync/browser/profile_sync_service.cc:769: !signin_->GetOriginal()->IsAuthenticated()) { Is this the right place to fix ...
5 years ago (2015-12-02 18:57:35 UTC) #4
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1496573002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1496573002/1
5 years ago (2015-12-02 18:58:10 UTC) #5
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: ios_dbg_simulator_ninja on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator_ninja/builds/101905) ios_rel_device_ninja on ...
5 years ago (2015-12-02 19:01:27 UTC) #7
bzanotti
https://codereview.chromium.org/1496573002/diff/1/components/browser_sync/browser/profile_sync_service.cc File components/browser_sync/browser/profile_sync_service.cc (right): https://codereview.chromium.org/1496573002/diff/1/components/browser_sync/browser/profile_sync_service.cc#newcode769 components/browser_sync/browser/profile_sync_service.cc:769: !signin_->GetOriginal()->IsAuthenticated()) { On 2015/12/02 18:57:35, Nicolas Zea wrote: > ...
5 years ago (2015-12-02 22:21:46 UTC) #8
Nicolas Zea
https://codereview.chromium.org/1496573002/diff/1/components/browser_sync/browser/profile_sync_service.cc File components/browser_sync/browser/profile_sync_service.cc (right): https://codereview.chromium.org/1496573002/diff/1/components/browser_sync/browser/profile_sync_service.cc#newcode769 components/browser_sync/browser/profile_sync_service.cc:769: !signin_->GetOriginal()->IsAuthenticated()) { On 2015/12/02 22:21:46, bzanotti wrote: > On ...
5 years ago (2015-12-02 22:27:54 UTC) #9
Nicolas Zea
5 years ago (2015-12-03 03:39:21 UTC) #10
On 2015/12/02 22:27:54, Nicolas Zea wrote:
>
https://codereview.chromium.org/1496573002/diff/1/components/browser_sync/bro...
> File components/browser_sync/browser/profile_sync_service.cc (right):
> 
>
https://codereview.chromium.org/1496573002/diff/1/components/browser_sync/bro...
> components/browser_sync/browser/profile_sync_service.cc:769:
> !signin_->GetOriginal()->IsAuthenticated()) {
> On 2015/12/02 22:21:46, bzanotti wrote:
> > On 2015/12/02 18:57:35, Nicolas Zea wrote:
> > > Is this the right place to fix this? Why isn't the first condition
> sufficient?
> > > It seems like the refresh token should be revoked when you switch
accounts,
> > > right?
> > 
> > Please note that I'm not super familiar with sync code, I was just trying to
> > reintroduce the same logic that was removed in http://crrev.com/1354053004
> > without reintroducing the bug.
> > 
> > Maybe this is not the best place to fix this, but note that due to how
signout
> > works, this notification is received before the OnGoogleSignOut notification
> > (but SigninManager will already return false to IsAuthenticated).
> > 
> > Maybe the access_token should simply be cleared on signout (I have no idea
why
> > this isn't the case, but I can observe this on iOS). If you have more
> > information/context on this, I'm very interested.
> 
> Yeah, I think that OnGoogleSignedOut should also be clearing the access_token_
> (and calling the UpdateAuthErrorState). That seems a more natural fit for this
> logic, and I agree it seems wrong that wasn't happening before.

FYI, https://codereview.chromium.org/1498663002/ is based off this patch.

Powered by Google App Engine
This is Rietveld 408576698