New issue
Advanced search Search tips

Issue 683124 link

Starred by 2 users

Issue metadata

Status: Available
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Bug


Sign in to add a comment

Convert Identity extension API implementation to be customer of Identity Service

Project Member Reported by blundell@chromium.org, Jan 20 2017

Issue description

The Identity extension API implementation (//chrome/browser/extensions/api/identity) should be moved from depending on {//components, //chrome/browser}/signin to instead being a customer of the Identity Service.
 
Labels: -Pri-3 OS-Linux OS-Mac OS-Windows Pri-2
Blockedon: 685654

Comment 3 by st...@chromium.org, Feb 8 2017

Cc: st...@chromium.org michae...@chromium.org

Comment 4 by st...@chromium.org, Mar 3 2017

Cc: r...@chromium.org

Comment 5 by st...@chromium.org, Mar 3 2017

Cc: -st...@chromium.org
Project Member

Comment 6 by bugdroid1@chromium.org, Mar 24 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b85bd3b039159890285ab7df4bf280f89cd9980f

commit b85bd3b039159890285ab7df4bf280f89cd9980f
Author: blundell <blundell@chromium.org>
Date: Fri Mar 24 13:56:27 2017

Introduce Identity Service and its initial usage

This CL introduces the Identity Service and converts the implementation
of the chrome.identity.GetProfileUserInfo() extension function to use
the new service. Notable points:

- The Identity Service is embedded in //chrome rather than //content,
  as it needs access to per-Profile classes with //chrome-level
  factories.
- The initial API is simply enough to satisfy the needs of the initial
  consumer. We will build out this API by incrementally converting
  further consumers.
- In the long term, the //components/signin classes on which the
  Identity Service depends will be folded into the Identity Service
  implementation, and their consumers will be converted to consume the
  Identity Service.
- The Identity Service makes use of the existing AccountId Mojo struct.
  It extends that struct to be nullable, as the Identity Service needs
  to be able to convey to a requesting client that the user is not
  signed in. Note that a separate HasPrimaryAccount() => bool method
  would not suffice here: since the communication is asynchronous, the
  user could always have signed out by the time that the Identity
  Service receives the GetPrimaryAccountId() call.

BUG= 683120 , 683124
TEST=Install a Chrome extension with the identity and identity.email
permissions in its manifest. Go to chrome://extensions, enable developer mode,
and inspect the background page of the above app. At the JS console that that
brings up, execute:
chrome.identity.getProfileUserInfo((account) => {console.log(account)})
Verify that the printout corresponds to the information of the account
being used for sync.

Review-Url: https://codereview.chromium.org/2753753007
Cr-Commit-Position: refs/heads/master@{#459410}

[modify] https://crrev.com/b85bd3b039159890285ab7df4bf280f89cd9980f/chrome/app/BUILD.gn
[modify] https://crrev.com/b85bd3b039159890285ab7df4bf280f89cd9980f/chrome/browser/BUILD.gn
[modify] https://crrev.com/b85bd3b039159890285ab7df4bf280f89cd9980f/chrome/browser/DEPS
[modify] https://crrev.com/b85bd3b039159890285ab7df4bf280f89cd9980f/chrome/browser/chrome_content_browser_manifest_overlay.json
[modify] https://crrev.com/b85bd3b039159890285ab7df4bf280f89cd9980f/chrome/browser/extensions/BUILD.gn
[modify] https://crrev.com/b85bd3b039159890285ab7df4bf280f89cd9980f/chrome/browser/extensions/api/identity/identity_get_profile_user_info_function.cc
[modify] https://crrev.com/b85bd3b039159890285ab7df4bf280f89cd9980f/chrome/browser/extensions/api/identity/identity_get_profile_user_info_function.h
[modify] https://crrev.com/b85bd3b039159890285ab7df4bf280f89cd9980f/chrome/browser/profiles/DEPS
[modify] https://crrev.com/b85bd3b039159890285ab7df4bf280f89cd9980f/chrome/browser/profiles/profile_impl.cc
[modify] https://crrev.com/b85bd3b039159890285ab7df4bf280f89cd9980f/chrome/browser/profiles/profile_impl.h
[modify] https://crrev.com/b85bd3b039159890285ab7df4bf280f89cd9980f/components/signin/public/interfaces/account_id_traits.h
[modify] https://crrev.com/b85bd3b039159890285ab7df4bf280f89cd9980f/services/device/device_service.cc
[add] https://crrev.com/b85bd3b039159890285ab7df4bf280f89cd9980f/services/identity/BUILD.gn
[add] https://crrev.com/b85bd3b039159890285ab7df4bf280f89cd9980f/services/identity/DEPS
[add] https://crrev.com/b85bd3b039159890285ab7df4bf280f89cd9980f/services/identity/OWNERS
[add] https://crrev.com/b85bd3b039159890285ab7df4bf280f89cd9980f/services/identity/README.md
[add] https://crrev.com/b85bd3b039159890285ab7df4bf280f89cd9980f/services/identity/identity_manager.cc
[add] https://crrev.com/b85bd3b039159890285ab7df4bf280f89cd9980f/services/identity/identity_manager.h
[add] https://crrev.com/b85bd3b039159890285ab7df4bf280f89cd9980f/services/identity/identity_service.cc
[add] https://crrev.com/b85bd3b039159890285ab7df4bf280f89cd9980f/services/identity/identity_service.h
[add] https://crrev.com/b85bd3b039159890285ab7df4bf280f89cd9980f/services/identity/manifest.json
[add] https://crrev.com/b85bd3b039159890285ab7df4bf280f89cd9980f/services/identity/public/interfaces/BUILD.gn
[add] https://crrev.com/b85bd3b039159890285ab7df4bf280f89cd9980f/services/identity/public/interfaces/OWNERS
[add] https://crrev.com/b85bd3b039159890285ab7df4bf280f89cd9980f/services/identity/public/interfaces/constants.mojom
[add] https://crrev.com/b85bd3b039159890285ab7df4bf280f89cd9980f/services/identity/public/interfaces/identity_manager.mojom

Project Member

Comment 7 by bugdroid1@chromium.org, May 29 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/535b6156d10f03d8da4f0115773120f7ba694f01

commit 535b6156d10f03d8da4f0115773120f7ba694f01
Author: Colin Blundell <blundell@chromium.org>
Date: Mon May 29 08:42:28 2017

Flesh out browsertests of GetAuthTokenFunction's obtaining of access tokens.

In preparation for refactoring GetAuthTokenFunction to use the Identity
Service to obtain access tokens, this CL augments the browsertests in this
area. It also removes the current assumption of the browsertests that the
OAuth2TokenService synchronously receives the request for an access token;
when the request is made via the Identity Service, this assumption will
not be valid.

Bug: 683124
Change-Id: I230284edeb5564048016e5e737ea740bf973c833
Reviewed-on: https://chromium-review.googlesource.com/514067
Commit-Queue: Colin Blundell <blundell@chromium.org>
Reviewed-by: Ken Rockot <rockot@chromium.org>
Cr-Commit-Position: refs/heads/master@{#475313}
[modify] https://crrev.com/535b6156d10f03d8da4f0115773120f7ba694f01/chrome/browser/extensions/api/identity/identity_apitest.cc

Project Member

Comment 8 by bugdroid1@chromium.org, Jun 5 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/52148d9dec33be3f66dc01010b8309bcb247e64c

commit 52148d9dec33be3f66dc01010b8309bcb247e64c
Author: Colin Blundell <blundell@chromium.org>
Date: Mon Jun 05 12:58:00 2017

[Identity Service] Introduce typemaps for a couple core types

We will shortly be adding an interface to obtain access tokens to the
Identity Service. This interface requires a set specifying the requested
scopes and must pass back an error in case of failure. This CL adds
typemaps of the underlying types that OAuth2TokenService uses for this
functionality.

TBR=yzshen@chromium.org

Bug: 683124
Change-Id: Iec1e3eca143e16c5dbdbe34fdb0c5850866f6218
Reviewed-on: https://chromium-review.googlesource.com/514006
Commit-Queue: Colin Blundell <blundell@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Mihai Sardarescu <msarda@chromium.org>
Cr-Commit-Position: refs/heads/master@{#476974}
[modify] https://crrev.com/52148d9dec33be3f66dc01010b8309bcb247e64c/google_apis/BUILD.gn
[add] https://crrev.com/52148d9dec33be3f66dc01010b8309bcb247e64c/google_apis/gaia/DEPS
[modify] https://crrev.com/52148d9dec33be3f66dc01010b8309bcb247e64c/google_apis/gaia/google_service_auth_error.cc
[modify] https://crrev.com/52148d9dec33be3f66dc01010b8309bcb247e64c/google_apis/gaia/google_service_auth_error.h
[modify] https://crrev.com/52148d9dec33be3f66dc01010b8309bcb247e64c/mojo/public/tools/bindings/chromium_bindings_configuration.gni
[add] https://crrev.com/52148d9dec33be3f66dc01010b8309bcb247e64c/services/identity/public/cpp/BUILD.gn
[add] https://crrev.com/52148d9dec33be3f66dc01010b8309bcb247e64c/services/identity/public/cpp/DEPS
[add] https://crrev.com/52148d9dec33be3f66dc01010b8309bcb247e64c/services/identity/public/cpp/OWNERS
[add] https://crrev.com/52148d9dec33be3f66dc01010b8309bcb247e64c/services/identity/public/cpp/google_service_auth_error.typemap
[add] https://crrev.com/52148d9dec33be3f66dc01010b8309bcb247e64c/services/identity/public/cpp/google_service_auth_error_struct_traits.cc
[add] https://crrev.com/52148d9dec33be3f66dc01010b8309bcb247e64c/services/identity/public/cpp/google_service_auth_error_struct_traits.h
[add] https://crrev.com/52148d9dec33be3f66dc01010b8309bcb247e64c/services/identity/public/cpp/scope_set.h
[add] https://crrev.com/52148d9dec33be3f66dc01010b8309bcb247e64c/services/identity/public/cpp/scope_set.typemap
[add] https://crrev.com/52148d9dec33be3f66dc01010b8309bcb247e64c/services/identity/public/cpp/scope_set_struct_traits.h
[add] https://crrev.com/52148d9dec33be3f66dc01010b8309bcb247e64c/services/identity/public/cpp/typemaps.gni
[modify] https://crrev.com/52148d9dec33be3f66dc01010b8309bcb247e64c/services/identity/public/interfaces/BUILD.gn
[add] https://crrev.com/52148d9dec33be3f66dc01010b8309bcb247e64c/services/identity/public/interfaces/google_service_auth_error.mojom
[add] https://crrev.com/52148d9dec33be3f66dc01010b8309bcb247e64c/services/identity/public/interfaces/scope_set.mojom

Labels: IdentityService
Blockedon: 729589
Blockedon: 729594
Blockedon: 729598
Blockedon: 729966
Blockedon: 729970
Blockedon: 729973
Blocking: 729546
Blocking: 729976
Project Member

Comment 18 by bugdroid1@chromium.org, Jun 12 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e89886a7e1f30554f68f9907608c00d37bc3de3f

commit e89886a7e1f30554f68f9907608c00d37bc3de3f
Author: Colin Blundell <blundell@chromium.org>
Date: Mon Jun 12 14:04:26 2017

[Identity Service] Add interface for obtaining access tokens

This CL adds an interface for obtaining access tokens to the Identity
Service. The CL also partially ports the implementation of the
chrome.identity.getAuthToken() extension function to use it as a initial
client.

TBR=thakis

Go to chrome://extensions, enable developer mode, and inspect the background
page of the above app. At the JS console that that brings up, execute:
chrome.identity.getAuthToken((token) => {console.log(token);} )
Verify that a long alphanumeric string appears rather than an error being
reported.

Bug: 683124
Test: Install a Chrome extension with the identity permissions in its manifest.
Change-Id: I902dde8ff6d817575f07b0e3f1df1e35ed398891
Reviewed-on: https://chromium-review.googlesource.com/514047
Commit-Queue: Colin Blundell <blundell@chromium.org>
Reviewed-by: Mihai Sardarescu <msarda@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Ken Rockot <rockot@chromium.org>
Cr-Commit-Position: refs/heads/master@{#478606}
[modify] https://crrev.com/e89886a7e1f30554f68f9907608c00d37bc3de3f/chrome/browser/DEPS
[modify] https://crrev.com/e89886a7e1f30554f68f9907608c00d37bc3de3f/chrome/browser/extensions/api/identity/identity_apitest.cc
[modify] https://crrev.com/e89886a7e1f30554f68f9907608c00d37bc3de3f/chrome/browser/extensions/api/identity/identity_get_auth_token_function.cc
[modify] https://crrev.com/e89886a7e1f30554f68f9907608c00d37bc3de3f/chrome/browser/extensions/api/identity/identity_get_auth_token_function.h
[modify] https://crrev.com/e89886a7e1f30554f68f9907608c00d37bc3de3f/chrome/browser/profiles/profile_impl.cc
[modify] https://crrev.com/e89886a7e1f30554f68f9907608c00d37bc3de3f/services/identity/BUILD.gn
[modify] https://crrev.com/e89886a7e1f30554f68f9907608c00d37bc3de3f/services/identity/DEPS
[modify] https://crrev.com/e89886a7e1f30554f68f9907608c00d37bc3de3f/services/identity/identity_manager.cc
[modify] https://crrev.com/e89886a7e1f30554f68f9907608c00d37bc3de3f/services/identity/identity_manager.h
[modify] https://crrev.com/e89886a7e1f30554f68f9907608c00d37bc3de3f/services/identity/identity_manager_unittest.cc
[modify] https://crrev.com/e89886a7e1f30554f68f9907608c00d37bc3de3f/services/identity/identity_service.cc
[modify] https://crrev.com/e89886a7e1f30554f68f9907608c00d37bc3de3f/services/identity/identity_service.h
[modify] https://crrev.com/e89886a7e1f30554f68f9907608c00d37bc3de3f/services/identity/public/interfaces/identity_manager.mojom

Project Member

Comment 19 by bugdroid1@chromium.org, Jun 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/243ccfd740aa35f3653006680c179cc1e460afc6

commit 243ccfd740aa35f3653006680c179cc1e460afc6
Author: Colin Blundell <blundell@chromium.org>
Date: Tue Jun 13 06:49:55 2017

[Identity Service] Introduce typemap of AccountInfo

This core struct will be exposed to Identity Service consumers in a
forthcoming CL.

Bug: 683124
Change-Id: I62b3793171586735fcf2d89fe3e3f7554d49bb77
Reviewed-on: https://chromium-review.googlesource.com/518149
Commit-Queue: Colin Blundell <blundell@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Mihai Sardarescu <msarda@chromium.org>
Cr-Commit-Position: refs/heads/master@{#478916}
[modify] https://crrev.com/243ccfd740aa35f3653006680c179cc1e460afc6/components/signin/core/browser/BUILD.gn
[modify] https://crrev.com/243ccfd740aa35f3653006680c179cc1e460afc6/services/identity/public/cpp/DEPS
[add] https://crrev.com/243ccfd740aa35f3653006680c179cc1e460afc6/services/identity/public/cpp/account_info.typemap
[add] https://crrev.com/243ccfd740aa35f3653006680c179cc1e460afc6/services/identity/public/cpp/account_info_struct_traits.cc
[add] https://crrev.com/243ccfd740aa35f3653006680c179cc1e460afc6/services/identity/public/cpp/account_info_struct_traits.h
[modify] https://crrev.com/243ccfd740aa35f3653006680c179cc1e460afc6/services/identity/public/cpp/typemaps.gni
[modify] https://crrev.com/243ccfd740aa35f3653006680c179cc1e460afc6/services/identity/public/interfaces/BUILD.gn
[add] https://crrev.com/243ccfd740aa35f3653006680c179cc1e460afc6/services/identity/public/interfaces/account_info.mojom

Project Member

Comment 20 by bugdroid1@chromium.org, Jun 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/704d198e46a38cc05f80e1757e56aa47c6beb81b

commit 704d198e46a38cc05f80e1757e56aa47c6beb81b
Author: Colin Blundell <blundell@chromium.org>
Date: Tue Jun 13 09:17:50 2017

[Identity Service] Move from using AccountId to using AccountInfo

Initially it seemed like a good idea to use AccountId, since that was
an existing Mojo type. However, that type was created for authentication
in ARC++ and is specific to that use case. It makes more sense for the
Identity Service to talk in terms of AccountInfo, the mainline struct
for account information that the core signin code uses. In the long
term we'll flesh out what the right relationship between AccountId and
AccountInfo should be.

TBR=rockot@chromium.org

Bug: 683124
Change-Id: I150c59762a370a9a209dc92a215a19ae1c8c953f
Reviewed-on: https://chromium-review.googlesource.com/517490
Commit-Queue: Colin Blundell <blundell@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Mihai Sardarescu <msarda@chromium.org>
Cr-Commit-Position: refs/heads/master@{#478946}
[modify] https://crrev.com/704d198e46a38cc05f80e1757e56aa47c6beb81b/chrome/browser/extensions/api/identity/identity_get_profile_user_info_function.cc
[modify] https://crrev.com/704d198e46a38cc05f80e1757e56aa47c6beb81b/chrome/browser/extensions/api/identity/identity_get_profile_user_info_function.h
[modify] https://crrev.com/704d198e46a38cc05f80e1757e56aa47c6beb81b/services/identity/BUILD.gn
[modify] https://crrev.com/704d198e46a38cc05f80e1757e56aa47c6beb81b/services/identity/DEPS
[modify] https://crrev.com/704d198e46a38cc05f80e1757e56aa47c6beb81b/services/identity/identity_manager.cc
[modify] https://crrev.com/704d198e46a38cc05f80e1757e56aa47c6beb81b/services/identity/identity_manager.h
[modify] https://crrev.com/704d198e46a38cc05f80e1757e56aa47c6beb81b/services/identity/identity_manager_unittest.cc
[modify] https://crrev.com/704d198e46a38cc05f80e1757e56aa47c6beb81b/services/identity/public/interfaces/BUILD.gn
[modify] https://crrev.com/704d198e46a38cc05f80e1757e56aa47c6beb81b/services/identity/public/interfaces/identity_manager.mojom

Components: Services>SignIn
Components: Internals>Services>Identity
Project Member

Comment 23 by sheriffbot@chromium.org, Dec 7 2017

Status: Available (was: Assigned)
--Chrome Identity automated triaging--

This bug is Assigned and has gone one month without any activity, so it is being moved to Available to indicate that it is not actively being worked on. If you are working on this bug, please mark yourself as the owner and move back to Assigned. Please see https://goo.gl/78kbny for more details. Please remove the Services>SignIn or UI>Browser>Profiles components if this bug isn't related to Chrome Identity.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Status: Assigned (was: Available)
Project Member

Comment 25 by sheriffbot@chromium.org, Sep 3

Status: Available (was: Assigned)
--Chrome Identity automated triaging--

This bug is Assigned and has gone one month without any activity, so it is being moved to Available to indicate that it is not actively being worked on. If you are working on this bug, please mark yourself as the owner and move back to Assigned. Please see https://goo.gl/78kbny for more details. Please remove the Services>SignIn or UI>Browser>Profiles components if this bug isn't related to Chrome Identity.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Sign in to add a comment