New issue
Advanced search Search tips

Issue 885278 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Oct 22
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 3
Type: Bug



Sign in to add a comment

Credential provider email to username transformation

Project Member Reported by rogerta@chromium.org, Sep 18

Issue description

The credential provider must transform a google account email address into a well formed Windows username.  The current algorithm strips of the trailing TLD, replaces invalid characters with underscore (_) and truncates the resulting string to 20 characters.  We may want to revisit this algorithm.

For stripping TLDs, chrome has code for this at https://cs.chromium.org/chromium/src/net/base/registry_controlled_domains/registry_controlled_domain.h
 
Might also need to handle the case of renamed gsuite domains.
One more thing that I thought about today - do you rely on a stable mapping from email to username right now? What would happen if in the future you map those differently? Say new gTLDs appear or disappear or the rules what is a valid username change? I think you might need to store the current mapping somewhere or otherwise you will need to be able to probe older mappings and potentially run into collisions due to that.
There is a request that if the user does not remember that they created a local OS user based on their google account and sign in again with the credential provider, it should just work.  Since the gaiaid<->local OS user mapping is stored on the machine, the plan is to use that.  I think this mapping can also be used to handle changes in domain or email address.

When this happens though, the local OS username likely won't change though.
Labels: gcpw
Components: Enterprise>CredentialProvider
Components: -Enterprise
Labels: -gcpw
Status: Started (was: Assigned)
Project Member

Comment 9 by bugdroid1@chromium.org, Oct 22

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

commit 764c66480e4534a84991fed0c27c40127fc31867
Author: Roger Tawa <rogerta@chromium.org>
Date: Mon Oct 22 18:31:41 2018

Allow the credential provider to logon again with the same google account.

Improve handling of google account to username mapping, taking into account
that the email address of a google account can change.

Bug:  894604 ,  885278 
Change-Id: If0013e717819f3edaad0c2e485af9c124b11c787
Reviewed-on: https://chromium-review.googlesource.com/c/1284695
Commit-Queue: Roger Tawa <rogerta@chromium.org>
Reviewed-by: Julian Pastarmov <pastarmovj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#601661}
[modify] https://crrev.com/764c66480e4534a84991fed0c27c40127fc31867/chrome/credential_provider/gaiacp/gaia_credential.cc
[modify] https://crrev.com/764c66480e4534a84991fed0c27c40127fc31867/chrome/credential_provider/gaiacp/gaia_credential_base.cc
[modify] https://crrev.com/764c66480e4534a84991fed0c27c40127fc31867/chrome/credential_provider/gaiacp/gaia_credential_base.h
[add] https://crrev.com/764c66480e4534a84991fed0c27c40127fc31867/chrome/credential_provider/gaiacp/gaia_credential_base_unittests.cc
[modify] https://crrev.com/764c66480e4534a84991fed0c27c40127fc31867/chrome/credential_provider/gaiacp/gaia_credential_provider.cc
[modify] https://crrev.com/764c66480e4534a84991fed0c27c40127fc31867/chrome/credential_provider/gaiacp/gaia_credential_unittests.cc
[modify] https://crrev.com/764c66480e4534a84991fed0c27c40127fc31867/chrome/credential_provider/gaiacp/gcp_strings.cc
[modify] https://crrev.com/764c66480e4534a84991fed0c27c40127fc31867/chrome/credential_provider/gaiacp/gcp_strings.h
[modify] https://crrev.com/764c66480e4534a84991fed0c27c40127fc31867/chrome/credential_provider/gaiacp/gcp_utils.cc
[modify] https://crrev.com/764c66480e4534a84991fed0c27c40127fc31867/chrome/credential_provider/gaiacp/gcp_utils.h
[modify] https://crrev.com/764c66480e4534a84991fed0c27c40127fc31867/chrome/credential_provider/gaiacp/gcp_utils_unittests.cc
[modify] https://crrev.com/764c66480e4534a84991fed0c27c40127fc31867/chrome/credential_provider/gaiacp/os_process_manager.cc
[modify] https://crrev.com/764c66480e4534a84991fed0c27c40127fc31867/chrome/credential_provider/gaiacp/os_process_manager.h
[modify] https://crrev.com/764c66480e4534a84991fed0c27c40127fc31867/chrome/credential_provider/gaiacp/os_user_manager.cc
[modify] https://crrev.com/764c66480e4534a84991fed0c27c40127fc31867/chrome/credential_provider/gaiacp/os_user_manager.h
[modify] https://crrev.com/764c66480e4534a84991fed0c27c40127fc31867/chrome/credential_provider/gaiacp/reg_utils.cc
[modify] https://crrev.com/764c66480e4534a84991fed0c27c40127fc31867/chrome/credential_provider/gaiacp/reg_utils.h
[modify] https://crrev.com/764c66480e4534a84991fed0c27c40127fc31867/chrome/credential_provider/gaiacp/scoped_user_profile.cc
[modify] https://crrev.com/764c66480e4534a84991fed0c27c40127fc31867/chrome/credential_provider/gaiacp/scoped_user_profile.h
[modify] https://crrev.com/764c66480e4534a84991fed0c27c40127fc31867/chrome/credential_provider/test/BUILD.gn
[modify] https://crrev.com/764c66480e4534a84991fed0c27c40127fc31867/chrome/credential_provider/test/gcp_fakes.cc
[modify] https://crrev.com/764c66480e4534a84991fed0c27c40127fc31867/chrome/credential_provider/test/gcp_fakes.h

Status: Fixed (was: Started)

Sign in to add a comment