New issue
Advanced search Search tips

Issue 906550 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Jan 14
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

authpolicy: Asynchronous affiliation check

Project Member Reported by ljusten@google.com, Nov 19

Issue description

Timings showed that the user affiliation check during user authentication is fairly slow (in one test 60% of auth time, see ). This should be done asynchronously or somewhere else to allow the auth flow to continue (it is not needed until during policy fetch).

AuthenticateUser
net 'ads' 'workgroup'	0.65s
net 'ads' 'info'	1.50s
net 'ads' 'lookup'	0.08s
kinit			0.09s
net 'ads' 'search' 	1.70s
klist			<0.01s
net 'ads' 'search'	5.8s	(cross-domain search for user affiliation)

 
Status: Assigned (was: Untriaged)
Labels: -Pri-1 M-73 Pri-2
Status: Started (was: Assigned)
Project Member

Comment 4 by bugdroid1@chromium.org, Jan 11

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/90c973eed69948316524fdd83f5defb6a0d98ec4

commit 90c973eed69948316524fdd83f5defb6a0d98ec4
Author: Lutz Justen <ljusten@chromium.org>
Date: Fri Jan 11 15:00:03 2019

authpolicy: Check user affiliation asynchronously

The AuthenticateUser D-Bus method now calls back before user affiliation
is checked, so that Chrome startup and the affiliation check can happen
in parallel.

This saves 0.5-1 seconds for online logons in cases when the auth data
cache is not used or not initialized, e.g.
- First logon for affiliated users with realm different from the machine
  realm
- Any online logon of affiliated users with realm different from the
  machine realm with cache turned off by policy
- Any online logon of unaffiliated users.
In the most practical use case (affiliated users, cache turned on) it
doesn't improve much except the very first logon.

BUG= chromium:906550 
TEST=Ran unit tests, tested on device
     To verify: Make sure /var/log/authpolicy.log first says
     "AuthenticateUser succeeded" and then "User is affiliated".

Change-Id: Iad57a156ac18754c623343bcf59a51decee01bf1
Reviewed-on: https://chromium-review.googlesource.com/1402695
Commit-Ready: Lutz Justen <ljusten@chromium.org>
Tested-by: Lutz Justen <ljusten@chromium.org>
Reviewed-by: Roman Sorokin <rsorokin@chromium.org>

[modify] https://crrev.com/90c973eed69948316524fdd83f5defb6a0d98ec4/authpolicy/dbus_bindings/org.chromium.AuthPolicy.xml
[modify] https://crrev.com/90c973eed69948316524fdd83f5defb6a0d98ec4/authpolicy/authpolicy.h
[modify] https://crrev.com/90c973eed69948316524fdd83f5defb6a0d98ec4/authpolicy/samba_interface.cc
[modify] https://crrev.com/90c973eed69948316524fdd83f5defb6a0d98ec4/authpolicy/samba_interface.h
[modify] https://crrev.com/90c973eed69948316524fdd83f5defb6a0d98ec4/authpolicy/authpolicy_unittest.cc
[modify] https://crrev.com/90c973eed69948316524fdd83f5defb6a0d98ec4/authpolicy/authpolicy.cc

To verify:
- On a Chromad device, log in as usual.
- Make sure /var/log/authpolicy.log first says "AuthenticateUser succeeded" and then "User is affiliated".
Status: Fixed (was: Started)
Status: Verified (was: Fixed)
Verified fixed. From /var/log/authpolicy.log:

2019-01-14T22:02:46.412652+00:00 INFO authpolicyd[441]: #033[42;1;97mAuthenticateUser succeeded#033[0m
2019-01-14T22:02:46.412738+00:00 INFO authpolicyd[441]: User is affiliated

Google Chrome	73.0.3669.0 (Official Build) dev (64-bit)
Platform	11578.0.0 (Official Build) dev-channel nautilus

Sign in to add a comment