New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 651249 link

Starred by 7 users

Issue metadata

Status: Verified
Owner:
Closed: Mar 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Feature

Blocking:
issue 687435



Sign in to add a comment

Fake oobe login doesn't work with enterprise_enroll

Project Member Reported by kathrelk...@chromium.org, Sep 28 2016

Issue description

login_shared.js

https://cs.chromium.org/chromium/src/chrome/browser/resources/chromeos/login/login_shared.js?rcl=0&l=310

Passing in enterpriseEnroll as True appears to do nothing - browser logs in with fake user but is not enrolled.
 
Cc: dchan@chromium.org
Note - Krishna can help out getting any logs, if needed!
Project Member

Comment 2 by bugdroid1@chromium.org, Oct 4 2016

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

commit 05a20df278d2c80c177ce0202506c6c1acfb703a
Author: catapult-deps-roller <catapult-deps-roller@chromium.org>
Date: Tue Oct 04 20:22:49 2016

Roll src/third_party/catapult/ 9d498f565..da2a4758c (3 commits).

https://chromium.googlesource.com/external/github.com/catapult-project/catapult.git/+log/9d498f565765..da2a4758cdc2

$ git log 9d498f565..da2a4758c --date=short --no-merges --format='%ad %ae %s'
2016-10-04 achuith Fix a bug in credentials parsing, add tests.
2016-10-04 petrcermak [tracing] Change breakdown view dimension upon pressing left/right arrows
2016-10-04 dproy Add a method to access renderer with largest pid

BUG= 651249 

CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_optional_gpu_tests_rel
TBR=catapult-sheriff@chromium.org

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

[modify] https://crrev.com/05a20df278d2c80c177ce0202506c6c1acfb703a/DEPS

We need a telemetry method that mocks out the Gaia request during the ChromeOS enterprise enrollment flow.

A simplified high level enterprise enrollment flow involves:
1) On the enterprise enrollment screen on ChromeOS - send user/name password to Gaia. Gaia responds back with an OAUTH/Gaia Auth token token.
2) Send the Gaia Auth token along with device_id to the DM server -- The DM server responds back with a DM token.
3) Use the DM token to fetch device policy.
Enrollment complete

In Enterprise Policy test Autotest Framework we are mocking out the DM server with the policy_testserver.py. 
The policy_test server provides support for steps 2 and 3. It doesn't require an actual OAUTH/Gaia Auth token.

We would like a method to mock out the gaia request/response during the enterprise_enrollment process. Maybe implemented in the NavigateFakeLogin() method in oobe.py(/telemetry/telemetry/internal/backends/chrome/oobe.py).

As far as I can tell the current NavigateFakeLogin() method skips the entire sign in flow(as opposed to the NavigateGaiaLogin() method which simulates an user entering a username/password and clicking on Next button in the enrollment flow- which results in the device sending the request to actual Gaia. NavigateGaiaLogin works if we want to enroll with a prod domain but doesn't work when attempting to enroll with a Fake Gaia ie,bypassing/mocking the Gaia request and retrieving a fake oauth token.)
Cc: -scunning...@chromium.org
Cc: rohi...@chromium.org
Blocking: 687435
Components: Enterprise
Owner: jen...@chromium.org
jennyz@ can you take a look at this since you're gardening this week?
Cc: achuith@chromium.org
Labels: -Type-Bug Type-Feature
Owner: achuith@chromium.org
Chatted with achuith. This is a quite complicated issue which needs quite a lot background to ramp up. I am doing chromeOS gardening duty this week and needs to get the reef dual mic feature in asap. So I will give this bug back to achuith@, he has more knowledge on this issue.

Comment 11 by dchan@google.com, Feb 17 2017

Cc: kathrelk...@chromium.org
Cc: abodenha@chromium.org
Given that Achuith doesn't have the time right now, is there someone else who could own this?

Comment 13 by dchan@google.com, Feb 21 2017

Labels: -Pri-2 Pri-1

Comment 14 by dchan@google.com, May 31 2017

+achuith, any update on this ? 
Sorry, have been occupied with higher priority tasks so far.
Any thoughts here achuith? We recently had some P0s come up that could have been prevented with the tests this will enable.
Status: Started (was: Assigned)
Actively working on this - hope to have something by end of next week.
achuith@ please advise re status of this?
I got distracted for a bit on hotrod test failures and a few other issues, but am currently working on this bug.

I tried to stub out the calls to the dm server, but this turned out to not be a good solution. I'm investigating using the fake python dm server we use in browser tests for enrollment. It's gotten a bit more complicated.
thanks for the update!
Cc: harpreet@chromium.org
Cc: dtosic@chromium.org
Happy to help if I can be of any assistance with gaia and accounts managements (we got some background in that area as we dynamically create enterprise and robot accounts in our hangouts integration tests)

Comment 24 by malmnas@google.com, Sep 26 2017

Cc: -abodenha@chromium.org malmnas@google.com
Cc: abodenha@chromium.org
Project Member

Comment 26 by bugdroid1@chromium.org, Oct 3 2017

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

commit 54aab8f19f34099d5054e14ec9c66202470aca4f
Author: Achuith Bhandarkar <achuith@chromium.org>
Date: Tue Oct 03 00:34:18 2017

Support for fake enterprise enrollment.

* Add WizardController::SkipEnrollmentPromptsForTesting to skip
enrollment prompts.
* Do not automatically log in after enrollment.
* Some additional logging.

BUG= chromium:651249 
TEST=enterprise_FakeEnrollment

Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: Ie8516d3b97055c9435697a0071ddf66e5e7dac07
Reviewed-on: https://chromium-review.googlesource.com/696296
Reviewed-by: Jacob Dufault <jdufault@chromium.org>
Commit-Queue: Achuith Bhandarkar <achuith@chromium.org>
Cr-Commit-Position: refs/heads/master@{#505882}
[modify] https://crrev.com/54aab8f19f34099d5054e14ec9c66202470aca4f/chrome/browser/chromeos/login/enrollment/enrollment_screen.cc
[modify] https://crrev.com/54aab8f19f34099d5054e14ec9c66202470aca4f/chrome/browser/chromeos/login/wizard_controller.cc
[modify] https://crrev.com/54aab8f19f34099d5054e14ec9c66202470aca4f/chrome/browser/chromeos/login/wizard_controller.h
[modify] https://crrev.com/54aab8f19f34099d5054e14ec9c66202470aca4f/chrome/browser/resources/chromeos/login/login_shared.js
[modify] https://crrev.com/54aab8f19f34099d5054e14ec9c66202470aca4f/chrome/browser/resources/chromeos/login/md_login_shared.js
[modify] https://crrev.com/54aab8f19f34099d5054e14ec9c66202470aca4f/chrome/browser/ui/webui/chromeos/login/enrollment_screen_handler.cc
[modify] https://crrev.com/54aab8f19f34099d5054e14ec9c66202470aca4f/chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.cc

Project Member

Comment 27 by bugdroid1@chromium.org, Oct 3 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/catapult/+/086a927c4c2fa0a96e54ccc17879b82d673e6ffd

commit 086a927c4c2fa0a96e54ccc17879b82d673e6ffd
Author: Achuith Bhandarkar <achuith@chromium.org>
Date: Tue Oct 03 18:41:03 2017

Support for fake enrollment.

BUG= chromium:651249 
TEST=enterprise_FakeEnrollment

Change-Id: Ia0264cc37226211be7d0f0a2234a879696bbd007
Reviewed-on: https://chromium-review.googlesource.com/696422
Reviewed-by: Ned Nguyen <nednguyen@google.com>
Commit-Queue: Achuith Bhandarkar <achuith@chromium.org>

[modify] https://crrev.com/086a927c4c2fa0a96e54ccc17879b82d673e6ffd/telemetry/telemetry/internal/backends/chrome/oobe.py

Project Member

Comment 28 by bugdroid1@chromium.org, Oct 3 2017

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

commit 2c9b8c9cdc5b80952f7fa1b48bc7daba0c356c4e
Author: catapult-deps-roller@chromium.org <catapult-deps-roller@chromium.org>
Date: Tue Oct 03 20:55:33 2017

Roll src/third_party/catapult/ 6ac12947a..086a927c4 (3 commits)

https://chromium.googlesource.com/catapult.git/+log/6ac12947a48a..086a927c4c2f

$ git log 6ac12947a..086a927c4 --date=short --no-merges --format='%ad %ae %s'
2017-10-02 achuith Support for fake enrollment.
2017-10-03 simonhatch Dashboard - Optimize /edit_config_handler
2017-10-02 dtu [pinpoint] Emphasize the logo. Improve messaging.

Created with:
  roll-dep src/third_party/catapult
BUG= 651249 


Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, see:
http://www.chromium.org/developers/tree-sheriffs/sheriff-details-chromium#TOC-Failures-due-to-DEPS-rolls


CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_optional_gpu_tests_rel
TBR=sullivan@chromium.org

Change-Id: Ia21d69ff67b6713933fbc2fcc21e56349e7e9b68
Reviewed-on: https://chromium-review.googlesource.com/698278
Reviewed-by: <catapult-deps-roller@chromium.org>
Commit-Queue: <catapult-deps-roller@chromium.org>
Cr-Commit-Position: refs/heads/master@{#506167}
[modify] https://crrev.com/2c9b8c9cdc5b80952f7fa1b48bc7daba0c356c4e/DEPS

Project Member

Comment 29 by bugdroid1@chromium.org, Oct 5 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/catapult/+/7048c9a0c02f025c47807c40d8ee9dd004cdf0ee

commit 7048c9a0c02f025c47807c40d8ee9dd004cdf0ee
Author: Achuith Bhandarkar <achuith@chromium.org>
Date: Thu Oct 05 18:59:26 2017

Catch DevtoolTargetCrashException.

Oobe can vanish during enrollment.

BUG= chromium:651249 
TEST=manual

Change-Id: I192b28947ea858218b1f9aceded7f0f794711aef
Reviewed-on: https://chromium-review.googlesource.com/702923
Reviewed-by: Ned Nguyen <nednguyen@google.com>
Commit-Queue: Achuith Bhandarkar <achuith@chromium.org>

[modify] https://crrev.com/7048c9a0c02f025c47807c40d8ee9dd004cdf0ee/telemetry/telemetry/internal/backends/chrome/oobe.py

Project Member

Comment 30 by bugdroid1@chromium.org, Oct 5 2017

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

commit f73087fc06a4e613a21f1dabbfe162f10b5d4e78
Author: catapult-deps-roller@chromium.org <catapult-deps-roller@chromium.org>
Date: Thu Oct 05 22:40:34 2017

Roll src/third_party/catapult/ 400dbc4b2..aeaf34ca0 (4 commits)

https://chromium.googlesource.com/catapult.git/+log/400dbc4b2b00..aeaf34ca03f8

$ git log 400dbc4b2..aeaf34ca0 --date=short --no-merges --format='%ad %ae %s'
2017-10-05 nednguyen Remove unneeded code from snap_page_script
2017-10-05 jbudorick [devil] Add support for line transformation to LogcatMonitor.
2017-10-03 jl Fix story sharding flags
2017-10-05 achuith Catch DevtoolTargetCrashException.

Created with:
  roll-dep src/third_party/catapult
BUG= 651249 


Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, see:
http://www.chromium.org/developers/tree-sheriffs/sheriff-details-chromium#TOC-Failures-due-to-DEPS-rolls


CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_optional_gpu_tests_rel
TBR=sullivan@chromium.org

Change-Id: If2adcdb2d31f8edcc3b1f2b68790d8fc0d0601d6
Reviewed-on: https://chromium-review.googlesource.com/703498
Reviewed-by: <catapult-deps-roller@chromium.org>
Commit-Queue: <catapult-deps-roller@chromium.org>
Cr-Commit-Position: refs/heads/master@{#506890}
[modify] https://crrev.com/f73087fc06a4e613a21f1dabbfe162f10b5d4e78/DEPS

Project Member

Comment 31 by bugdroid1@chromium.org, Oct 6 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/autotest/+/400de5761b703d21a15503c5b9c27d2f3c3be8e4

commit 400de5761b703d21a15503c5b9c27d2f3c3be8e4
Author: Achuith Bhandarkar <achuith@chromium.org>
Date: Fri Oct 06 18:33:52 2017

autotest: Support for fake enrollment

* Enterprise_FakeEnrollment is a test that enrolls with a fake dmserver and logs
in.
* enrollment.EnterpriseFakeEnrollment calls oobe.NavigateFakeLogin.
* EnterprisePolicyTest._launch_chrome_browser now handles enrolling.

BUG= chromium:651249 
TEST=enterprise_FakeEnrollment

Change-Id: I0fcf01be4824e8c17cc6af3d977f41df41019b0b
Reviewed-on: https://chromium-review.googlesource.com/696430
Commit-Ready: Achuith Bhandarkar <achuith@chromium.org>
Tested-by: Achuith Bhandarkar <achuith@chromium.org>
Reviewed-by: Katherine Threlkeld <kathrelkeld@chromium.org>

[add] https://crrev.com/400de5761b703d21a15503c5b9c27d2f3c3be8e4/client/site_tests/enterprise_FakeEnrollment/control
[modify] https://crrev.com/400de5761b703d21a15503c5b9c27d2f3c3be8e4/client/cros/enterprise/enterprise_policy_base.py
[add] https://crrev.com/400de5761b703d21a15503c5b9c27d2f3c3be8e4/client/site_tests/enterprise_FakeEnrollment/enterprise_FakeEnrollment.py
[modify] https://crrev.com/400de5761b703d21a15503c5b9c27d2f3c3be8e4/client/common_lib/cros/enrollment.py
[add] https://crrev.com/400de5761b703d21a15503c5b9c27d2f3c3be8e4/client/site_tests/enterprise_FakeEnrollment/src/Makefile

Project Member

Comment 32 by bugdroid1@chromium.org, Oct 6 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/0291348ac0627db0f98db1ca68edb41a10f09f3f

commit 0291348ac0627db0f98db1ca68edb41a10f09f3f
Author: Achuith Bhandarkar <achuith@chromium.org>
Date: Fri Oct 06 22:51:10 2017

[autotest-chrome ebuild] Add enterprise_FakeEnrollment.

BUG= chromium:651249 
TEST=enterprise_FakeEnrollment

Change-Id: I94fdf118b3517288245859ff2f994bcf0cc5bb23
Reviewed-on: https://chromium-review.googlesource.com/705715
Commit-Ready: Achuith Bhandarkar <achuith@chromium.org>
Tested-by: Achuith Bhandarkar <achuith@chromium.org>
Reviewed-by: Katherine Threlkeld <kathrelkeld@chromium.org>

[modify] https://crrev.com/0291348ac0627db0f98db1ca68edb41a10f09f3f/chromeos-base/autotest-chrome/autotest-chrome-9999.ebuild

Project Member

Comment 33 by bugdroid1@chromium.org, Oct 9 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/catapult/+/19f0a50729eb061b44b2ab938b3eded9594965d7

commit 19f0a50729eb061b44b2ab938b3eded9594965d7
Author: Achuith Bhandarkar <achuith@chromium.org>
Date: Mon Oct 09 22:40:22 2017

[oobe]: Fix another crash in fake enrollment.

BUG= chromium:651249 
TEST=enterprise_FakeEnrollment
TBR=nednguyen@google.com

Change-Id: Ia35b38a85b7b691d634c2b619ab00699221dd721
Reviewed-on: https://chromium-review.googlesource.com/706860
Reviewed-by: Achuith Bhandarkar <achuith@chromium.org>
Commit-Queue: Achuith Bhandarkar <achuith@chromium.org>

[modify] https://crrev.com/19f0a50729eb061b44b2ab938b3eded9594965d7/telemetry/telemetry/internal/backends/chrome/oobe.py

Project Member

Comment 34 by bugdroid1@chromium.org, Oct 10 2017

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

commit 79fc8ad1d55ad44e850384ab406ae7650e285142
Author: catapult-deps-roller@chromium.org <catapult-deps-roller@chromium.org>
Date: Tue Oct 10 02:14:16 2017

Roll src/third_party/catapult/ 6907a1ca8..3939c23dc (2 commits)

https://chromium.googlesource.com/catapult.git/+log/6907a1ca871d..3939c23dca3f

$ git log 6907a1ca8..3939c23dc --date=short --no-merges --format='%ad %ae %s'
2017-10-09 achuith Reduce guest login chrome restart timeout to 15 sec.
2017-10-09 achuith [oobe]: Fix another crash in fake enrollment.

Created with:
  roll-dep src/third_party/catapult
BUG=631640, 651249 


Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, see:
http://www.chromium.org/developers/tree-sheriffs/sheriff-details-chromium#TOC-Failures-due-to-DEPS-rolls


CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_optional_gpu_tests_rel
TBR=sullivan@chromium.org

Change-Id: Ib9af08e73cab90501c984d70866bd269b367ae09
Reviewed-on: https://chromium-review.googlesource.com/708039
Reviewed-by: <catapult-deps-roller@chromium.org>
Commit-Queue: <catapult-deps-roller@chromium.org>
Cr-Commit-Position: refs/heads/master@{#507570}
[modify] https://crrev.com/79fc8ad1d55ad44e850384ab406ae7650e285142/DEPS

Comment 35 by dtosic@google.com, Oct 24 2017

Is the enterprise_fakeenrollment test running as part of any suite yet?
no, and we shouldn't add it as-is since it enrolls without unenrolling.

Comment 37 by dtosic@google.com, Nov 7 2017

Any progress?

Comment 38 by dtosic@google.com, Nov 7 2017

Is it hard to implement the 'unenrolling' part?
Status: Fixed (was: Started)
Marking this as fixed. We can use a new bug to track follow-ups.
Status: Verified (was: Fixed)

Sign in to add a comment