Proposal: Delete the identity service

56 views
Skip to first unread message

James Cook

unread,
Jan 30, 2020, 4:06:47 PM1/30/20
to identity-s...@chromium.org, services-dev, Colin Blundell, xiao...@chromium.org, da...@chromium.org, Sam McNally, slan...@chromium.org, dro...@chromium.org, msa...@chromium.org, bsaz...@chromium.org
//services/identity is ~1000 lines of C++ and mojom. It is compiled and tested on all platforms. It runs in the browser process on the UI thread.

However, it has only 2 consumers, //chromeos/services/assistant and //chromeos/components/drivefs. They use the identity service for access token fetching. These consumers are Chrome OS only, and run in the browser process on the UI thread. Per Xiaohui, there aren't any plans to move this part of the assistant code outside the browser process.

I propose to convert these consumers to directly access the C++ IdentityManager and use PrimaryAccountAccessTokenFetcher. Then we can delete the identity service.

This would make it easier to change the underlying IdentityManager APIs (e.g. for go/consent-aware-api-dd or go/cros-primary-account). In particular, we would not have to write cross-platform support and tests for Chrome OS-only behaviors. See also discussion on this refactoring CL.

Questions:
1. Does the DriveFS team plan to move their code outside the browser process?
2. Are there other services being built right now that need the Identity Service that can't use C++ IdentityManager directly?
3. Could someone on the DriveFS team help out by converting that code? The conversion is straightforward, but I'm not sure how to manually test.

Thanks,
James

Stuart Langley

unread,
Jan 30, 2020, 6:46:45 PM1/30/20
to James Cook, identity-s...@chromium.org, services-dev, Colin Blundell, xiao...@chromium.org, da...@chromium.org, Sam McNally, dro...@chromium.org, msa...@chromium.org, bsaz...@chromium.org

Giovanni Ortuño

unread,
Jan 30, 2020, 7:57:54 PM1/30/20
to Stuart Langley, James Cook, identity-s...@chromium.org, services-dev, Colin Blundell, xiao...@chromium.org, da...@chromium.org, Sam McNally, dro...@chromium.org, Mihai Sardarescu, bsaz...@chromium.org, Edwin Tay
A System Web App recently started looking into using the Identity Service.

+Edwin Tay, we should try to finalize the details about what's needed from Identity Service and how much work would it be to build an alternative on top of IdentityManager.

--
You received this message because you are subscribed to the Google Groups "services-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to services-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/services-dev/CALFY5ZynEMXhZZZcH9oezuPtQtkr4usAU%2Bj-31r6fhMKV6kNYg%40mail.gmail.com.

Sergei Datsenko

unread,
Jan 30, 2020, 9:57:15 PM1/30/20
to Giovanni Ortuño, Stuart Langley, James Cook, identity-s...@chromium.org, services-dev, Colin Blundell, xiao...@chromium.org, Sam McNally, dro...@chromium.org, Mihai Sardarescu, bsaz...@chromium.org, Edwin Tay
DriveFS does not have plans to move outside of the browser process so as long as we can still mint access tokens we are good with that. I assume proposed PrimaryAccountAccessTokenFetcher is a comparable substitute for the API you want to remove, right?

Cheers,

James Cook

unread,
Jan 30, 2020, 11:19:11 PM1/30/20
to Sergei Datsenko, Giovanni Ortuño, Stuart Langley, identity-s...@chromium.org, services-dev, Colin Blundell, xiao...@chromium.org, Sam McNally, dro...@chromium.org, Mihai Sardarescu, bsaz...@chromium.org, Edwin Tay
If the DriveFS code is changed to inject an IdentityManager* it can use the existing signin::AccessTokenFetcher class. Just inline code similar to IdentityAccessorImpl::GetAccessToken (this is where the identity service calls into IdentityManager).

James Cook

unread,
Jan 31, 2020, 12:58:52 AM1/31/20
to Sergei Datsenko, Giovanni Ortuño, Stuart Langley, identity-s...@chromium.org, services-dev, Colin Blundell, xiao...@chromium.org, Sam McNally, dro...@chromium.org, Mihai Sardarescu, bsaz...@chromium.org, Edwin Tay
Actually, it looks like DriveFS waits for the primary account to be available, then requests the token. So perhaps it could use the existing signin::PrimaryAccountAccessTokenFetcher in mode kWaitUntilAvailable.

Colin Blundell

unread,
Jan 31, 2020, 7:49:48 AM1/31/20
to James Cook, Erik Chen, Hidehiko Abe, Sergei Datsenko, Giovanni Ortuño, Stuart Langley, identity-service-dev, services-dev, Colin Blundell, xiao...@chromium.org, Sam McNally, David Roger, Mihai Sardarescu, bsaz...@chromium.org, Edwin Tay
Thanks for starting this thread, James!

If there are use cases for accessing identity from outside the browser process (cf. Giovanni's email), then we should keep the Identity Service rather than delete it and just need to build something that serves the same purpose.

+Erik Chen +Hidehiko Abe who recently had a potential usecase for the Identity Service as well.

If there are no upcoming usecases for the Identity Service and the existing ones can be migrated to IdentityManager (+1 to usage of PAATF whenever possible by the way, as it's extremely convenient), then +1 to removing it. Regardless of whether there are new usecases, the current ones should be migrated if that is possible.

Best,

Colin

James Cook

unread,
Jan 31, 2020, 11:19:02 AM1/31/20
to Colin Blundell, Erik Chen, Hidehiko Abe, Sergei Datsenko, Giovanni Ortuño, Stuart Langley, identity-service-dev, services-dev, xiao...@chromium.org, Sam McNally, David Roger, Mihai Sardarescu, bsaz...@chromium.org, Edwin Tay
Teams with potential use cases for the identity service: Can you clarify your timelines and what platforms you intend to support?

The difficulty I hit recently is that I needed to change the C++ IdentityManager to support a Chrome OS use case, so I had to add support for that use case to Identity Service, which then required cross-platform support and tests.

Hidehiko Abe

unread,
Feb 2, 2020, 10:35:34 PM2/2/20
to James Cook, Colin Blundell, Erik Chen, Sergei Datsenko, Giovanni Ortuño, Stuart Langley, identity-service-dev, services-dev, xiao...@chromium.org, Sam McNally, David Roger, Mihai Sardarescu, bsaz...@chromium.org, Edwin Tay, eisi...@chromium.org, sab...@chromium.org, bar...@chromium.org
As for timeline: LaCrOS is still in the experiment stage, and we're hoping to have the engineering cost estimation by EoQ.
So, I don't think it is necessary that this effort is blocked by LaCrOS and we do not want to, so please feel free to make a decision without considering us.

From technical perspectives, we're still trying to get a better understanding about the identity service, so we're not yet very sure the current architecture works better for LaCrOS.
JFYI: I will have a sync meeting with the browser Signin team this week, and I believe it will help me to understand better.

Thanks,
- hidehiko

Giovanni Ortuño

unread,
Feb 3, 2020, 12:18:01 AM2/3/20
to James Cook, Colin Blundell, Erik Chen, Hidehiko Abe, Sergei Datsenko, Stuart Langley, identity-service-dev, services-dev, xiao...@chromium.org, Sam McNally, David Roger, Mihai Sardarescu, bsaz...@chromium.org, Edwin Tay
On Sat, Feb 1, 2020 at 3:19 AM James Cook <jame...@chromium.org> wrote:
Teams with potential use cases for the identity service: Can you clarify your timelines and what platforms you intend to support?


Our System Web App is Chrome OS only.

Kushagra Sinha

unread,
Feb 3, 2020, 10:23:17 AM2/3/20
to services-dev, Giovanni Ortuño, Colin Blundell, Erik Chen, Hidehiko Abe, Sergei Datsenko, Stuart Langley, identity-service-dev, services-dev, xiao...@chromium.org, Sam McNally, David Roger, Mihai Sardarescu, bsaz...@chromium.org, Edwin Tay, James Cook
James/Colin: How is this going to play out with Dent v2?

IdentityManager is a ProfileKeyed Service. If DriveFS / Assistant / "System-level" apps want access to Identity, which IdentityManager are they going to contact (assuming multiple Profiles, and hence multiple IdentityManagers)?

To unsubscribe from this group and stop receiving emails from it, send an email to services-dev+unsubscribe@chromium.org.

--
You received this message because you are subscribed to the Google Groups "services-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to services-dev+unsubscribe@chromium.org.

--
You received this message because you are subscribed to the Google Groups "services-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to services-dev+unsubscribe@chromium.org.

Colin Blundell

unread,
Feb 3, 2020, 1:47:57 PM2/3/20
to Kushagra Sinha, services-dev, Giovanni Ortuño, Colin Blundell, Erik Chen, Hidehiko Abe, Sergei Datsenko, Stuart Langley, identity-service-dev, xiao...@chromium.org, Sam McNally, David Roger, Mihai Sardarescu, bsaz...@chromium.org, Edwin Tay, James Cook
Hi Kushagra,

Which Google account should these apps be using in a Dent v2 world? 

To unsubscribe from this group and stop receiving emails from it, send an email to services-dev...@chromium.org.

--
You received this message because you are subscribed to the Google Groups "services-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to services-dev...@chromium.org.

--
You received this message because you are subscribed to the Google Groups "services-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to services-dev...@chromium.org.

Kushagra Sinha

unread,
Feb 4, 2020, 5:23:07 AM2/4/20
to Colin Blundell, services-dev, Giovanni Ortuño, Colin Blundell, Erik Chen, Hidehiko Abe, Sergei Datsenko, Stuart Langley, identity-service-dev, xiao...@chromium.org, Sam McNally, David Roger, Mihai Sardarescu, bsaz...@chromium.org, Edwin Tay, James Cook
"Which Google *account*" - Judging from the comments/reviews from the Dent v1 launch, many users are intuitively expecting Chrome OS system apps like Files/Drive to show their Drive folders from all of their accounts added to the system level Account Manager, and not just the Primary/Device Account. I talked to a couple of Files app folks and they would like this too.
Considering this, IMHO the question should be "Which Google *accounts* ..." - and I think these apps should see the view of all Google accounts added to Chrome OS Account Manager.

(Note that Chrome "browser" Profiles will be free to choose a subset (including the null set) of accounts from Chrome OS Account Manager, irrespective of other Profiles or system apps).

WDYT?

Kushagra Sinha

Software Engineer

sin...@google.com
+49 89 839309073


Google Germany GmbH

Erika-Mann-Straße 33

80636 München


Geschäftsführer: Paul Manicle, Halimah DeLaine Prado

Registergericht und -nummer: Hamburg, HRB 86891

Sitz der Gesellschaft: Hamburg


Diese E-Mail ist vertraulich. Falls Sie diese fälschlicherweise erhalten haben sollten, leiten Sie diese bitte nicht an jemand anderes weiter, löschen Sie alle Kopien und Anhänge davon und lassen Sie mich bitte wissen, dass die E-Mail an die falsche Person gesendet wurde. 

     

This e-mail is confidential. If you received this communication by mistake, please don't forward it to anyone else, please erase all copies and attachments, and please let me know that it has gone to the wrong person.


Mihai Sardarescu

unread,
Feb 4, 2020, 8:09:40 AM2/4/20
to Kushagra Sinha, Colin Blundell, services-dev, Giovanni Ortuño, Colin Blundell, Erik Chen, Hidehiko Abe, Sergei Datsenko, Stuart Langley, identity-service-dev, xiao...@chromium.org, Sam McNally, David Roger, bsaz...@chromium.org, Edwin Tay, James Cook
Hi Kushagra,

Then I think we need to change the code and have these services going directly to the ChromeOS AccountManager instead of using the IdentityManager, right? In any case, it would make sense to remove the IdentityService code if these services are running inside the browser process.

Thank you,
- Mihai

You received this message because you are subscribed to the Google Groups "identity-service-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to identity-service...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/identity-service-dev/CAOetdWCaS3wHMJJFG6pkE%3DgqSGYzNK1pdTvHmdKDzC_TDeUBaw%40mail.gmail.com.

Colin Blundell

unread,
Feb 4, 2020, 11:42:03 AM2/4/20
to Mihai Sardarescu, Kushagra Sinha, services-dev, Giovanni Ortuño, Colin Blundell, Erik Chen, Hidehiko Abe, Sergei Datsenko, Stuart Langley, identity-service-dev, xiao...@chromium.org, Sam McNally, David Roger, bsaz...@chromium.org, Edwin Tay, James Cook
+1 to Mihai's response.

James Cook

unread,
Feb 26, 2020, 5:06:18 PM2/26/20
to Colin Blundell, Mihai Sardarescu, Kushagra Sinha, services-dev, Giovanni Ortuño, Colin Blundell, Erik Chen, Hidehiko Abe, Sergei Datsenko, Stuart Langley, identity-service-dev, xiao...@chromium.org, Sam McNally, David Roger, bsaz...@chromium.org, Edwin Tay
Update: I migrated Assistant (CL) and DriveFS (CL) to the C++ IdentityManager. The mojo identity service is now unused, except by its own tests.

I'm planning to delete the identity service code soon. I'll leave the //services/identity directory in place, with a README file, just in case we later decide to recover the code from git history.

Thanks everybody for the advice and code reviews.

K. Moon

unread,
Feb 26, 2020, 5:12:22 PM2/26/20
to James Cook, Colin Blundell, Mihai Sardarescu, Kushagra Sinha, services-dev, Giovanni Ortuño, Colin Blundell, Erik Chen, Hidehiko Abe, Sergei Datsenko, Stuart Langley, identity-service-dev, xiao...@chromium.org, Sam McNally, David Roger, bsaz...@chromium.org, Edwin Tay
Is there a reason to even leave a README behind?

Colin Blundell

unread,
Feb 27, 2020, 3:26:38 AM2/27/20
to K. Moon, James Cook, Mihai Sardarescu, Kushagra Sinha, services-dev, Giovanni Ortuño, Colin Blundell, Erik Chen, Hidehiko Abe, Sergei Datsenko, Stuart Langley, identity-service-dev, xiao...@chromium.org, Sam McNally, David Roger, bsaz...@chromium.org, Edwin Tay
+1 to just deleting //services/identity. Thank you for this code simplification, James!

James Cook

unread,
Feb 27, 2020, 10:16:47 AM2/27/20
to Colin Blundell, K. Moon, Mihai Sardarescu, Kushagra Sinha, services-dev, Giovanni Ortuño, Colin Blundell, Erik Chen, Hidehiko Abe, Sergei Datsenko, Stuart Langley, identity-service-dev, xiao...@chromium.org, Sam McNally, David Roger, bsaz...@chromium.org, Edwin Tay
OK, I'll just delete the directory. Thanks!

Mihai Sardarescu

unread,
Feb 27, 2020, 10:32:22 AM2/27/20
to James Cook, Colin Blundell, K. Moon, Kushagra Sinha, services-dev, Giovanni Ortuño, Colin Blundell, Erik Chen, Hidehiko Abe, Sergei Datsenko, Stuart Langley, identity-service-dev, xiao...@chromium.org, Sam McNally, David Roger, bsaz...@chromium.org, Edwin Tay

K. Moon

unread,
Feb 27, 2020, 12:11:13 PM2/27/20
to Mihai Sardarescu, James Cook, Colin Blundell, Kushagra Sinha, services-dev, Giovanni Ortuño, Colin Blundell, Erik Chen, Hidehiko Abe, Sergei Datsenko, Stuart Langley, identity-service-dev, xiao...@chromium.org, Sam McNally, David Roger, bsaz...@chromium.org, Edwin Tay
+1; thanks for the cleanup!

James Cook

unread,
Mar 3, 2020, 5:14:28 PM3/3/20
to K. Moon, Mihai Sardarescu, Colin Blundell, Kushagra Sinha, services-dev, Giovanni Ortuño, Colin Blundell, Erik Chen, Hidehiko Abe, Sergei Datsenko, Stuart Langley, identity-service-dev, xiao...@chromium.org, Sam McNally, David Roger, bsaz...@chromium.org, Edwin Tay
To close the loop: The identity service is gone as of crrev.com/c/2079795

Colin Blundell

unread,
Mar 4, 2020, 3:25:17 AM3/4/20
to James Cook, K. Moon, Mihai Sardarescu, Kushagra Sinha, services-dev, Giovanni Ortuño, Colin Blundell, Erik Chen, Hidehiko Abe, Sergei Datsenko, Stuart Langley, identity-service-dev, xiao...@chromium.org, Sam McNally, David Roger, bsaz...@chromium.org, Edwin Tay
Thank you, James!
Reply all
Reply to author
Forward
0 new messages