Simplify Session Manager's policy storage interface |
|||||||||||
Issue descriptionCombine Store*Policy and Retrieve*Policy methods using protobufs as parameters to facilitate future additions. Design doc: https://docs.google.com/document/d/1wOtb1dEZC0eeHSoiuCv82QkTk8EHkoHmTIbFT1exxAY Don't forget to migrate interface names: - Name new interface NewStorePolicy, NewStoreUnsigned and NewRetrievePolicy. - Switch all users from *Policy to New*Policy in Chrome and Chrome OS. - Remove the old *Policy interface in SessionManager. - Mirror New*Policy to *Policy in SessionManager. - Switch all users over to *Policy in Chrome and Chrome OS. - Remove New*Policy in SessionManager. Also refactor error handling in Retrieve* methods to get rid of duplicate code.
,
Sep 19 2017
,
Oct 2 2017
,
Oct 7 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/system_api/+/50b9897362dfe333d6ba14baf3f3f1bd80670266 commit 50b9897362dfe333d6ba14baf3f3f1bd80670266 Author: Lutz Justen <ljusten@chromium.org> Date: Sat Oct 07 22:33:39 2017 Add proto for policy storage and retrieval Adds a proto that is used to simplify the policy storage and retrieval D-Bus interface of Session Manager. The interface is starting to explode combinatorically with - 5 StorePolicy methods (7 with extension policy, see crbug.com/735100 ) and - 4 RetrievePolicy methods (6 with extension policy). The new interface is flexible and has only 3 methods - StorePolicy - StoreUnsignedPolicy and - RetrievePolicy that each take the proto from this CL to specify the kind of policy to store or retrieve. BUG=chromium:765644 TEST=emerge-amd64-generic system_api Change-Id: I4affbec9b4ce921db21861d28e096d935aada2e6 Reviewed-on: https://chromium-review.googlesource.com/671268 Commit-Ready: Lutz Justen <ljusten@chromium.org> Tested-by: Lutz Justen <ljusten@chromium.org> Reviewed-by: Lutz Justen <ljusten@chromium.org> [add] https://crrev.com/50b9897362dfe333d6ba14baf3f3f1bd80670266/dbus/login_manager/policy_descriptor.proto [modify] https://crrev.com/50b9897362dfe333d6ba14baf3f3f1bd80670266/system_api.gyp [modify] https://crrev.com/50b9897362dfe333d6ba14baf3f3f1bd80670266/dbus/login_manager/dbus-constants.h
,
Oct 11 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform2/+/6e6ccb1cc9249f5d20999e8e1f5c3261b935bff9 commit 6e6ccb1cc9249f5d20999e8e1f5c3261b935bff9 Author: Lutz Justen <ljusten@chromium.org> Date: Wed Oct 11 17:53:31 2017 login: Add simplified policy storage interface Session Manager's D-Bus interface for policy storage and retrieval is starting to explode combinatorically with - 5 StorePolicy methods (7 with extension policy, see crbug.com/735100 ) and - 4 RetrievePolicy methods (6 with extension policy). This CL adds a new interface that is flexible and only has 3 methods - StorePolicy - StoreUnsignedPolicy and - RetrievePolicy that each take the proto from CL:671268 to specify the kind of policy to store or retrieve. Note that the old interface cannot be simply removed since it is still used (at least) by Chrome and authpolicyd. It will be phased out as soon as all users are swapped over to the new interface. CQ-DEPEND=CL:671268 BUG=chromium:765644 TEST=emerge-amd64-generic chromeos-login cros_run_unit_tests --board=amd64-generic --packages chromeos-login Change-Id: If4160b11ac363879282095e4c227dc940615162a Reviewed-on: https://chromium-review.googlesource.com/671234 Commit-Ready: Lutz Justen <ljusten@chromium.org> Tested-by: Lutz Justen <ljusten@chromium.org> Reviewed-by: Mattias Nissler <mnissler@chromium.org> [modify] https://crrev.com/6e6ccb1cc9249f5d20999e8e1f5c3261b935bff9/login_manager/session_manager_impl.cc [modify] https://crrev.com/6e6ccb1cc9249f5d20999e8e1f5c3261b935bff9/login_manager/dbus_bindings/org.chromium.SessionManagerInterface.xml [modify] https://crrev.com/6e6ccb1cc9249f5d20999e8e1f5c3261b935bff9/login_manager/session_manager_impl_unittest.cc [modify] https://crrev.com/6e6ccb1cc9249f5d20999e8e1f5c3261b935bff9/login_manager/SessionManager.conf [modify] https://crrev.com/6e6ccb1cc9249f5d20999e8e1f5c3261b935bff9/login_manager/session_manager_impl.h
,
Nov 2 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/system_api/+/62f58901af0fbab83ac6386253a884128ae0b787 commit 62f58901af0fbab83ac6386253a884128ae0b787 Author: Lutz Justen <ljusten@chromium.org> Date: Thu Nov 02 18:07:11 2017 login_manager: Refine PolicyDescriptor proto The account type (device, user, ...) and the policy domain (Chrome, extensions) in PolicyDescriptor are in fact two independent dimensions. The current PolicyDescriptor does not reflect that. For instance, storing extension policy for device local accounts wouldn't be possible, but it's a valid use case. This CL fixes that. Note that the CL isn't used on the Chrome side yet, so it's safe to change. CQ-DEPEND=CL:730223 BUG=chromium:765644 TEST=emerge-amd64-generic system_api Change-Id: I348019b665ba12584e988745330d6d10dc263b76 Reviewed-on: https://chromium-review.googlesource.com/730183 Commit-Ready: Lutz Justen <ljusten@chromium.org> Tested-by: Lutz Justen <ljusten@chromium.org> Reviewed-by: Lutz Justen <ljusten@chromium.org> Reviewed-by: Mattias Nissler <mnissler@chromium.org> [modify] https://crrev.com/62f58901af0fbab83ac6386253a884128ae0b787/dbus/login_manager/policy_descriptor.proto
,
Nov 2 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform2/+/7ae4860e8de9c8b931eba428e3de8c1a44b03852 commit 7ae4860e8de9c8b931eba428e3de8c1a44b03852 Author: Lutz Justen <ljusten@chromium.org> Date: Thu Nov 02 18:07:11 2017 login: Update PolicyDescriptor usage CL:730183 changes PolicyDescriptor such that account type and domain are orthogonal concepts. This CL reflects these changes in login_manager. SessionManagerImplUnittest uses a builder class now to create PolicyDescriptors as this seems more elegant. CQ-DEPEND=CL:730183 BUG=chromium:765644 TEST=cros_run_unit_tests --board=amd64-generic --packages chromeos-login Change-Id: I1e7c01ab8e9e0b5f61dc40d8e84e6014e4e27163 Reviewed-on: https://chromium-review.googlesource.com/730223 Commit-Ready: Lutz Justen <ljusten@chromium.org> Tested-by: Lutz Justen <ljusten@chromium.org> Reviewed-by: Lutz Justen <ljusten@chromium.org> [modify] https://crrev.com/7ae4860e8de9c8b931eba428e3de8c1a44b03852/login_manager/session_manager_impl.cc [modify] https://crrev.com/7ae4860e8de9c8b931eba428e3de8c1a44b03852/login_manager/session_manager_impl_unittest.cc
,
Nov 3 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/4b1f0f8a650be4b65e6fa632256084d02e8e8e45 commit 4b1f0f8a650be4b65e6fa632256084d02e8e8e45 Author: Lutz Justen <ljusten@chromium.org> Date: Fri Nov 03 12:14:03 2017 Roll src/third_party/cros_system_api/ 47afcabaf..5fc40ab72 (3 commits) https://chromium.googlesource.com/chromiumos/platform/system_api.git/+log/47afcabaf957..5fc40ab72e45 $ git log 47afcabaf..5fc40ab72 --date=short --no-merges --format='%ad %ae %s' 2017-10-25 allenvic system_api: Add smbprovider D-Bus-constants and protobufs 2017-10-19 ljusten login_manager: Refine PolicyDescriptor proto 2017-10-25 ejcaruso shill: add D-Bus constant for Cellular.DeviceID property Created with: roll-dep src/third_party/cros_system_api Bug: 765644 Change-Id: Ia5fc46ab8acf0c9e27b014b784d7cede66851a79 Reviewed-on: https://chromium-review.googlesource.com/753082 Reviewed-by: Pavol Marko <pmarko@chromium.org> Commit-Queue: Lutz Justen <ljusten@chromium.org> Cr-Commit-Position: refs/heads/master@{#513751} [modify] https://crrev.com/4b1f0f8a650be4b65e6fa632256084d02e8e8e45/DEPS
,
Nov 7 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/8dfd597cb85c8763ee01dab54a7ddaf50a7e072d commit 8dfd597cb85c8763ee01dab54a7ddaf50a7e072d Author: Lutz Justen <ljusten@chromium.org> Date: Tue Nov 07 10:26:26 2017 SessionManagerClient: Use new storage interface Switches SessionManagerClient over to the new StorePolicyEx, RetrievePolicyEx interface for storing policy. This interface can handle all the different policy types and doesn't suffer the combinatorial explosion problem we've been seeing recently. The new interface should be equivalent to the old one with the one exception of returned error codes, which are always kGetServiceFail for the new one compared to kSessionDoesNotExist (user policy) and kInvalidAccount (device local account policy) for the old one. BUG=chromium:765644 TEST=Trybots, tested policy fetch on Chell Chromebook Change-Id: I1ad9c000ae6f6175304780374d0065f5693ba0ea Reviewed-on: https://chromium-review.googlesource.com/725425 Reviewed-by: Xiyuan Xia <xiyuan@chromium.org> Reviewed-by: Mark Pearson <mpearson@chromium.org> Commit-Queue: Lutz Justen <ljusten@chromium.org> Cr-Commit-Position: refs/heads/master@{#514433} [modify] https://crrev.com/8dfd597cb85c8763ee01dab54a7ddaf50a7e072d/chromeos/BUILD.gn [modify] https://crrev.com/8dfd597cb85c8763ee01dab54a7ddaf50a7e072d/chromeos/dbus/session_manager_client.cc [modify] https://crrev.com/8dfd597cb85c8763ee01dab54a7ddaf50a7e072d/chromeos/dbus/session_manager_client.h [modify] https://crrev.com/8dfd597cb85c8763ee01dab54a7ddaf50a7e072d/tools/metrics/histograms/enums.xml [modify] https://crrev.com/8dfd597cb85c8763ee01dab54a7ddaf50a7e072d/tools/metrics/histograms/histograms.xml
,
Nov 7 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/d6cd466292f5c75f57939db7a9459ca0d481e30a commit d6cd466292f5c75f57939db7a9459ca0d481e30a Author: Lutz Justen <ljusten@chromium.org> Date: Tue Nov 07 12:59:41 2017 SessionManagerClient: Deprecate SESSION_DOES_NOT_EXIST Session Manager is being switched over from returning kSessionDoesNotExist to kGetServiceFail. This CL maps the kSessionDoesNotExist error to the GET_SERVICE_FAIL enum temporarily during the switch. kSessionDoesNotExist will be removed eventually. BUG=chromium:765644 TEST=Trybots Change-Id: I0366d3d315fd5940c9f71480aa460cc1e41bda89 Reviewed-on: https://chromium-review.googlesource.com/756751 Reviewed-by: Achuith Bhandarkar <achuith@chromium.org> Commit-Queue: Lutz Justen <ljusten@chromium.org> Cr-Commit-Position: refs/heads/master@{#514456} [modify] https://crrev.com/d6cd466292f5c75f57939db7a9459ca0d481e30a/chrome/browser/chromeos/policy/user_cloud_policy_store_chromeos.cc [modify] https://crrev.com/d6cd466292f5c75f57939db7a9459ca0d481e30a/chromeos/dbus/session_manager_client.cc [modify] https://crrev.com/d6cd466292f5c75f57939db7a9459ca0d481e30a/chromeos/dbus/session_manager_client.h
,
Nov 7 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform2/+/c6a8aa83580cac3d44c7c321e9bea9a8fc3708e6 commit c6a8aa83580cac3d44c7c321e9bea9a8fc3708e6 Author: Lutz Justen <ljusten@chromium.org> Date: Tue Nov 07 17:25:55 2017 login: Refactor DeviceLocalAccountPolicyService Refactors DeviceLocalAccountPolicyService and SessionManagerImpl to make it possible to exploit common code for storing/retrieving policy. In a nutshell, DeviceLocalAccountPolicyService now has a public GetPolicyService() method and SessionManagerImpl calls Store/Retrieve on the service, whereas before, DeviceLocalAccountPolicyService had Store/Retrieve methods that were more or less pass-throughs. Hence, this CL doesn't change behavior (except for testing). Renames DeviceLocalAccountPolicyService to DeviceLocalAccountManager because it is NOT a policy service and resembles more SessionManagerImpl, just for device local accounts. In SessionManagerImplTest, a few tests were added for device-local accounts. In DeviceLocalAccountPolicyServiceTest, the Store* and Retrieve* tests were replaced by similar tests for GetPolicyService. StoreBadPolicy, StoreBadSignature, StoreNoRotation and RetrieveNoPolicy were removed since PolicyStoreTest contains similar tests. BUG=chromium:765644 TEST=emerge-amd64-generic chromeos-login cros_run_unit_tests --board=amd64-generic --packages chromeos-login Change-Id: If181b55665dd751de32c479daec24f7e87b8c4a4 Reviewed-on: https://chromium-review.googlesource.com/711844 Commit-Ready: Lutz Justen <ljusten@chromium.org> Tested-by: Lutz Justen <ljusten@chromium.org> Reviewed-by: Lutz Justen <ljusten@chromium.org> [modify] https://crrev.com/c6a8aa83580cac3d44c7c321e9bea9a8fc3708e6/login_manager/device_local_account_manager_unittest.cc [modify] https://crrev.com/c6a8aa83580cac3d44c7c321e9bea9a8fc3708e6/login_manager/blob_util.cc [modify] https://crrev.com/c6a8aa83580cac3d44c7c321e9bea9a8fc3708e6/login_manager/mock_device_policy_service.h [modify] https://crrev.com/c6a8aa83580cac3d44c7c321e9bea9a8fc3708e6/login_manager/blob_util.h [modify] https://crrev.com/c6a8aa83580cac3d44c7c321e9bea9a8fc3708e6/login_manager/device_local_account_manager.h [modify] https://crrev.com/c6a8aa83580cac3d44c7c321e9bea9a8fc3708e6/login_manager/session_manager_impl.cc [modify] https://crrev.com/c6a8aa83580cac3d44c7c321e9bea9a8fc3708e6/login_manager/session_manager_impl_unittest.cc [modify] https://crrev.com/c6a8aa83580cac3d44c7c321e9bea9a8fc3708e6/login_manager/device_local_account_manager.cc [modify] https://crrev.com/c6a8aa83580cac3d44c7c321e9bea9a8fc3708e6/login_manager/session_manager_impl.h
,
Nov 7 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform2/+/838554fef1c262707c7b97d139a8f4142765e941 commit 838554fef1c262707c7b97d139a8f4142765e941 Author: Lutz Justen <ljusten@chromium.org> Date: Tue Nov 07 17:25:55 2017 login: Rename device_local_account_policy_service Renames the files device_local_account_policy_service.* to device_local_account_manager. This change was originally in CL:711844, but Gerrit wouldn't recognize this as a move (similarity was between 50% and 55%), so it gets split out into a separate CL to preserve file history. CQ-DEPEND=CL:711844 BUG=chromium:765644 TEST=emerge-amd64-generic chromeos-login cros_run_unit_tests --board=amd64-generic --packages chromeos-login Change-Id: I6cd3a93d85d2c5bccb35c61598bfbc67240029eb Reviewed-on: https://chromium-review.googlesource.com/712374 Commit-Ready: Lutz Justen <ljusten@chromium.org> Tested-by: Lutz Justen <ljusten@chromium.org> Reviewed-by: Mattias Nissler <mnissler@chromium.org> [rename] https://crrev.com/838554fef1c262707c7b97d139a8f4142765e941/login_manager/device_local_account_manager_unittest.cc [rename] https://crrev.com/838554fef1c262707c7b97d139a8f4142765e941/login_manager/device_local_account_manager.h [modify] https://crrev.com/838554fef1c262707c7b97d139a8f4142765e941/login_manager/session_manager_impl.cc [modify] https://crrev.com/838554fef1c262707c7b97d139a8f4142765e941/login_manager/session_manager_impl_unittest.cc [modify] https://crrev.com/838554fef1c262707c7b97d139a8f4142765e941/login_manager/login_manager.gyp [rename] https://crrev.com/838554fef1c262707c7b97d139a8f4142765e941/login_manager/device_local_account_manager.cc
,
Nov 21 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform2/+/a0230e902c47bc36c56b137a90d5a203c7b12cfa commit a0230e902c47bc36c56b137a90d5a203c7b12cfa Author: Lutz Justen <ljusten@chromium.org> Date: Tue Nov 21 14:36:53 2017 login: Consolidate common storage/retrieval code Points all Store* and Retrieve* methods to the corresponding *Ex methods. Gets rid of a lot of very similar error handling code. The behavior should be the same, the only thing that changes is the returned error code that changed from kSessionNotStarted (user sessions) and kInvalidAccount (device local accounts) to a common kGetServiceFail. BUG=chromium:765644 TEST=emerge-amd64-generic chromeos-login cros_run_unit_tests --board=amd64-generic --packages chromeos-login Change-Id: I5e982d6a181e47a602fb72765a98e824ffbc72d0 Reviewed-on: https://chromium-review.googlesource.com/719099 Commit-Ready: Lutz Justen <ljusten@chromium.org> Tested-by: Lutz Justen <ljusten@chromium.org> Reviewed-by: Mattias Nissler <mnissler@chromium.org> [modify] https://crrev.com/a0230e902c47bc36c56b137a90d5a203c7b12cfa/login_manager/session_manager_impl.cc [modify] https://crrev.com/a0230e902c47bc36c56b137a90d5a203c7b12cfa/login_manager/session_manager_impl_unittest.cc [modify] https://crrev.com/a0230e902c47bc36c56b137a90d5a203c7b12cfa/login_manager/session_manager_impl.h
,
Dec 9 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform2/+/54c7b2e1f199cdfe794c33106962ea56c40322d0 commit 54c7b2e1f199cdfe794c33106962ea56c40322d0 Author: Lutz Justen <ljusten@chromium.org> Date: Sat Dec 09 14:27:24 2017 login: Validate policy descriptor Adds a helper to check the validity of policy descriptors. For instance, for ACCOUNT_TYPE_USER, it is required that an account ID is passed along as well. Also checks the validity of account IDs and extension IDs. BUG=chromium:765644 TEST=emerge-amd64-generic chromeos-login cros_run_unit_tests --board=amd64-generic --packages chromeos-login Change-Id: I20f3b28b25ba2214f9ab6e36bc96e70d6f5fc215 Reviewed-on: https://chromium-review.googlesource.com/793392 Commit-Ready: Lutz Justen <ljusten@chromium.org> Tested-by: Lutz Justen <ljusten@chromium.org> Reviewed-by: Lutz Justen <ljusten@chromium.org> [add] https://crrev.com/54c7b2e1f199cdfe794c33106962ea56c40322d0/login_manager/validator_utils.cc [modify] https://crrev.com/54c7b2e1f199cdfe794c33106962ea56c40322d0/login_manager/session_manager_impl.cc [modify] https://crrev.com/54c7b2e1f199cdfe794c33106962ea56c40322d0/login_manager/session_manager_impl_unittest.cc [modify] https://crrev.com/54c7b2e1f199cdfe794c33106962ea56c40322d0/login_manager/login_manager.gyp [add] https://crrev.com/54c7b2e1f199cdfe794c33106962ea56c40322d0/login_manager/validator_utils_unittest.cc [add] https://crrev.com/54c7b2e1f199cdfe794c33106962ea56c40322d0/login_manager/validator_utils.h [modify] https://crrev.com/54c7b2e1f199cdfe794c33106962ea56c40322d0/login_manager/session_manager_impl.h
,
Dec 11 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform2/+/076745d09ab109e88331d79f358d33ae620f0a25 commit 076745d09ab109e88331d79f358d33ae620f0a25 Author: Lutz Justen <ljusten@chromium.org> Date: Mon Dec 11 13:32:15 2017 login: Add support for storing extension policy Adds a PolicyNamespace parameter to PolicyService's storage API that routes policy to different PolicyStores. Policy for all namespaces is stored in a directory passed into PolicyService (no subdirectories): <policy_dir>/policy - Chrome policy <policy_dir>/policy_extension_id_<id> - Extension policy <policy_dir>/policy_signin_extension_id_<id> - Sign-in extension policy PolicyStores are created on demand and policy is loaded from disk as soon as a store is created. There should be no functional change except that user and device local account policy is loaded on demand, not immediately at creation. Device policy is still loaded immediately since the load result sent to UMA. BUG=chromium:765644 TEST=emerge-amd64-generic chromeos-login cros_run_unit_tests --board=amd64-generic --packages chromeos-login Deployed on device. Change-Id: I4841b0f3f6c74913b65ab9df9328b2c2ea07a952 Reviewed-on: https://chromium-review.googlesource.com/735684 Commit-Ready: Lutz Justen <ljusten@chromium.org> Tested-by: Lutz Justen <ljusten@chromium.org> Reviewed-by: Lutz Justen <ljusten@chromium.org> [modify] https://crrev.com/076745d09ab109e88331d79f358d33ae620f0a25/login_manager/device_local_account_manager_unittest.cc [modify] https://crrev.com/076745d09ab109e88331d79f358d33ae620f0a25/login_manager/mock_constructors.cc [modify] https://crrev.com/076745d09ab109e88331d79f358d33ae620f0a25/login_manager/device_local_account_manager.h [modify] https://crrev.com/076745d09ab109e88331d79f358d33ae620f0a25/login_manager/device_policy_service.cc [modify] https://crrev.com/076745d09ab109e88331d79f358d33ae620f0a25/login_manager/mock_policy_store.h [modify] https://crrev.com/076745d09ab109e88331d79f358d33ae620f0a25/login_manager/device_policy_service_unittest.cc [modify] https://crrev.com/076745d09ab109e88331d79f358d33ae620f0a25/login_manager/user_policy_service.h [modify] https://crrev.com/076745d09ab109e88331d79f358d33ae620f0a25/login_manager/mock_device_policy_service.h [modify] https://crrev.com/076745d09ab109e88331d79f358d33ae620f0a25/login_manager/mock_policy_service.h [modify] https://crrev.com/076745d09ab109e88331d79f358d33ae620f0a25/login_manager/device_policy_service.h [modify] https://crrev.com/076745d09ab109e88331d79f358d33ae620f0a25/login_manager/policy_store_unittest.cc [modify] https://crrev.com/076745d09ab109e88331d79f358d33ae620f0a25/login_manager/user_policy_service_unittest.cc [modify] https://crrev.com/076745d09ab109e88331d79f358d33ae620f0a25/login_manager/policy_service.h [modify] https://crrev.com/076745d09ab109e88331d79f358d33ae620f0a25/login_manager/user_policy_service_factory.cc [modify] https://crrev.com/076745d09ab109e88331d79f358d33ae620f0a25/login_manager/session_manager_impl_unittest.cc [modify] https://crrev.com/076745d09ab109e88331d79f358d33ae620f0a25/login_manager/policy_service_unittest.cc [modify] https://crrev.com/076745d09ab109e88331d79f358d33ae620f0a25/login_manager/policy_store.h [modify] https://crrev.com/076745d09ab109e88331d79f358d33ae620f0a25/login_manager/policy_store.cc [modify] https://crrev.com/076745d09ab109e88331d79f358d33ae620f0a25/login_manager/session_manager_impl.cc [modify] https://crrev.com/076745d09ab109e88331d79f358d33ae620f0a25/login_manager/policy_service.cc [modify] https://crrev.com/076745d09ab109e88331d79f358d33ae620f0a25/login_manager/device_local_account_manager.cc [modify] https://crrev.com/076745d09ab109e88331d79f358d33ae620f0a25/login_manager/user_policy_service.cc
,
Jan 22 2018
,
Jan 22 2018
,
Feb 8 2018
,
Mar 29 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/7e7e1bc5dbef4b61a4e1194848619dc072e97355 commit 7e7e1bc5dbef4b61a4e1194848619dc072e97355 Author: Lutz Justen <ljusten@chromium.org> Date: Thu Mar 29 18:40:53 2018 FakeSessionManagerClient: Refactor policy storage code Cleans up policy storage code in FakeSessionManagerClient (for the USE_HOST_POLICY case), highlighting common grounds with the non-stub SessionManagerClient code and making it more easily extensible. No functional changes. BUG=chromium:765644 TEST=Tryjobs Change-Id: If31dbaf8d17292539c581f23306c3eaf0a6bf483 Reviewed-on: https://chromium-review.googlesource.com/972381 Commit-Queue: Lutz Justen <ljusten@chromium.org> Reviewed-by: Hidehiko Abe <hidehiko@chromium.org> Reviewed-by: Ryo Hashimoto <hashimoto@chromium.org> Reviewed-by: Alexander Alekseev <alemate@chromium.org> Cr-Commit-Position: refs/heads/master@{#546880} [modify] https://crrev.com/7e7e1bc5dbef4b61a4e1194848619dc072e97355/chromeos/dbus/fake_session_manager_client.cc [modify] https://crrev.com/7e7e1bc5dbef4b61a4e1194848619dc072e97355/chromeos/dbus/session_manager_client.cc [modify] https://crrev.com/7e7e1bc5dbef4b61a4e1194848619dc072e97355/chromeos/dbus/session_manager_client.h
,
Apr 6 2018
,
Apr 19 2018
,
Apr 30 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/eef3b7bc174509766475f7dbf6b53e6c61c9adeb commit eef3b7bc174509766475f7dbf6b53e6c61c9adeb Author: Lutz Justen <ljusten@chromium.org> Date: Mon Apr 30 17:36:27 2018 SessionManagerClient: Add generic storage/retrieval methods Adds StorePolicy, RetrievePolicy and BlockingRetrievePolicy methods to SessionManagerClient, which map to the new storage interface in Session Manager, and marks the old methods as deprecated. The next step will be to replace all existing Store/Retrieve calls by these three. This also adds support for storing/retrieving extension policy, which is needed for Chromad (see crbug.com/735100 ). Points all storage/retrieval methods in FakeSessionManagerClient to the generic implementations, reducing the difference between the two code path controlled by the PolicyStorageType enum. In a nutshell, policy is stored - in a file at <stub file path> if PolicyStorageType::kOnDisk is set and - in a memory-based map at key <stub file path> if PolicyStorageType::kInMemory is set. The old way to store different policy in a separate location (device_policy_, user_policies_ etc.) starts to get messy once extension policy is introduced (you'd need an extra dimension of mappings for the extension id aka component id). BUG=chromium:765644 TEST=Ran some affected tests (DeviceSettingsServiceTest, UserCloudPolicyStoreChromeOSTest SiteIsolationFlagHandlingTest DeviceCloudPolicyManagerChromeOSEnrollmentTest OwnerSettingsServiceChromeOSTest), but mostly rely on trybots. Change-Id: I1794d9264dc2ac8e7702cec4a079d6c9eb4c4091 Reviewed-on: https://chromium-review.googlesource.com/1024034 Commit-Queue: Lutz Justen <ljusten@chromium.org> Reviewed-by: Maksim Ivanov <emaxx@chromium.org> Reviewed-by: Xiyuan Xia <xiyuan@chromium.org> Reviewed-by: Julian Pastarmov <pastarmovj@chromium.org> Cr-Commit-Position: refs/heads/master@{#554808} [modify] https://crrev.com/eef3b7bc174509766475f7dbf6b53e6c61c9adeb/chrome/browser/chromeos/ownership/owner_settings_service_chromeos_unittest.cc [modify] https://crrev.com/eef3b7bc174509766475f7dbf6b53e6c61c9adeb/chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos_unittest.cc [modify] https://crrev.com/eef3b7bc174509766475f7dbf6b53e6c61c9adeb/chrome/browser/chromeos/policy/site_isolation_flag_handling_browsertest.cc [modify] https://crrev.com/eef3b7bc174509766475f7dbf6b53e6c61c9adeb/chrome/browser/chromeos/policy/user_cloud_policy_store_chromeos_unittest.cc [modify] https://crrev.com/eef3b7bc174509766475f7dbf6b53e6c61c9adeb/chrome/browser/chromeos/settings/device_settings_service_unittest.cc [modify] https://crrev.com/eef3b7bc174509766475f7dbf6b53e6c61c9adeb/chromeos/dbus/fake_session_manager_client.cc [modify] https://crrev.com/eef3b7bc174509766475f7dbf6b53e6c61c9adeb/chromeos/dbus/fake_session_manager_client.h [modify] https://crrev.com/eef3b7bc174509766475f7dbf6b53e6c61c9adeb/chromeos/dbus/session_manager_client.cc [modify] https://crrev.com/eef3b7bc174509766475f7dbf6b53e6c61c9adeb/chromeos/dbus/session_manager_client.h
,
Jun 26 2018
,
Jun 30 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform2/+/8a1008dfd7c4360dde4c45a3ab906e019689e7b9 commit 8a1008dfd7c4360dde4c45a3ab906e019689e7b9 Author: Lutz Justen <ljusten@chromium.org> Date: Sat Jun 30 00:50:20 2018 login: Remove unsed D-Bus methods Removes StoreUnsignedPolicy and StoreUnsignedPolicyForUser, which have both been superseeded by StoreUnsignedPolicyEx. Authpolicyd is the only user and has been switched to StoreUnsignedPolicyEx a while ago. BUG=chromium:765644 TEST=cros_run_unit_tests --board=amd64-generic --packages chromeos-login Change-Id: I53d8ca1117ca488cf066170cb6efb83b3c447555 Reviewed-on: https://chromium-review.googlesource.com/1114853 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Lutz Justen <ljusten@chromium.org> Reviewed-by: Mattias Nissler <mnissler@chromium.org> [modify] https://crrev.com/8a1008dfd7c4360dde4c45a3ab906e019689e7b9/login_manager/session_manager_impl.cc [modify] https://crrev.com/8a1008dfd7c4360dde4c45a3ab906e019689e7b9/login_manager/dbus_bindings/org.chromium.SessionManagerInterface.xml [modify] https://crrev.com/8a1008dfd7c4360dde4c45a3ab906e019689e7b9/login_manager/session_manager_impl_unittest.cc [modify] https://crrev.com/8a1008dfd7c4360dde4c45a3ab906e019689e7b9/login_manager/SessionManager.conf [modify] https://crrev.com/8a1008dfd7c4360dde4c45a3ab906e019689e7b9/login_manager/session_manager_impl.h
,
Jul 19
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform2/+/4175fde8541b6a89f11fe78b95c840aec7371dfc commit 4175fde8541b6a89f11fe78b95c840aec7371dfc Author: Lutz Justen <ljusten@chromium.org> Date: Thu Jul 19 01:15:21 2018 login: Change policy service lifetime management Move lifetime management of sessionless user policy service into GetPolicyService, so that callers of this function don't have to worry about this anymore. This is nicer from an interface POV and makes some refactoring possible, which is done in a subsequent CL. BUG=chromium:765644 TEST=cros_run_unit_tests --board=amd64-generic --packages chromeos-login Change-Id: I2b75da70cf8f7fccac9f0cf2f652b587e4ca5312 Reviewed-on: https://chromium-review.googlesource.com/1136036 Commit-Ready: Lutz Justen <ljusten@chromium.org> Tested-by: Lutz Justen <ljusten@chromium.org> Reviewed-by: Lutz Justen <ljusten@chromium.org> [modify] https://crrev.com/4175fde8541b6a89f11fe78b95c840aec7371dfc/login_manager/session_manager_impl.cc [modify] https://crrev.com/4175fde8541b6a89f11fe78b95c840aec7371dfc/login_manager/session_manager_impl_unittest.cc [modify] https://crrev.com/4175fde8541b6a89f11fe78b95c840aec7371dfc/login_manager/session_manager_impl.h
,
Jul 19
,
Jul 19
Left to do at this point: - Autotests: Switch StorePolicy calls to StorePolicyEx calls in autotests (needs to make Python-version of PolicyDescriptor available and use that in calls to session_manager.py). Attached is a patch to third_party/autotest/files with early WIP. - Chrome: In SessionManagerClient, remove all Store*Policy* methods except StorePolicy and point all users to StorePolicy (using a PolicyDescriptor). Same for RetrievePolicy. - Optional: Clean up naming (remove 'Ex', but that's complicated with D-Bus)
,
Jul 19
,
Jul 20
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform2/+/70759bc04b0aa0a186469121c1bda1dc0c874afa commit 70759bc04b0aa0a186469121c1bda1dc0c874afa Author: Lutz Justen <ljusten@chromium.org> Date: Fri Jul 20 12:31:15 2018 login: Refactor Store/Retrieve/List Refactors Store/Retrieve/List code a little to reuse of common code. BUG=chromium:765644 TEST=cros_run_unit_tests --board=amd64-generic --packages chromeos-login Change-Id: I9fdd7a18427ac5bbf0477ed02e277c19b613a174 Reviewed-on: https://chromium-review.googlesource.com/1136037 Commit-Ready: Lutz Justen <ljusten@chromium.org> Tested-by: Lutz Justen <ljusten@chromium.org> Reviewed-by: Lutz Justen <ljusten@chromium.org> [modify] https://crrev.com/70759bc04b0aa0a186469121c1bda1dc0c874afa/login_manager/session_manager_impl.cc [modify] https://crrev.com/70759bc04b0aa0a186469121c1bda1dc0c874afa/login_manager/session_manager_impl.h
,
Jan 9
,
Jan 18
(5 days ago)
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform2/+/d726f47b92698d5fa6e9e410ce2cc5b0a36bdb88 commit d726f47b92698d5fa6e9e410ce2cc5b0a36bdb88 Author: Lutz Justen <ljusten@chromium.org> Date: Fri Jan 18 12:01:30 2019 system_api: Add login manager go protos Adds a Go proto file for policy_descriptor.proto. This allows us to switch Tast tests over to using Session Manager's new policy storage interface (StorePolicyEx, RetrievePolicyEx). The proto is used in CL:1409564. BUG=chromium:765644 TEST=Emerged system_api, verified that go file is there. Change-Id: Iec993c84bbbde11cc309284ed9ce9effbeb36479 Reviewed-on: https://chromium-review.googlesource.com/1408997 Commit-Ready: Lutz Justen <ljusten@chromium.org> Tested-by: Lutz Justen <ljusten@chromium.org> Reviewed-by: Tatsuhisa Yamaguchi <yamaguchi@chromium.org> Reviewed-by: Hidehiko Abe <hidehiko@chromium.org> [modify] https://crrev.com/d726f47b92698d5fa6e9e410ce2cc5b0a36bdb88/system_api/BUILD.gn
,
Today
(10 hours ago)
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/tast-tests/+/f5afdabe5cd26bbb1e0fc38f411b188e752c0950 commit f5afdabe5cd26bbb1e0fc38f411b188e752c0950 Author: Lutz Justen <ljusten@chromium.org> Date: Wed Jan 23 08:20:22 2019 Use new session manager policy storage interface Replaces all calls to Session Manager's Store/Retrieve policy calls by the corresponding new *Ex calls. The old interface is being removed. This is an effort to fix the combinatorial explosion of policy storage methods. CQ-DEPEND=CL:1408997 BUG=chromium:765644 TEST=Successfully ran affected tests: - session.OwnershipAPI - session.OwnershipRetaken - session.OwnershipTaken Change-Id: I572a5a723bdf81f4a7b3b57c9fb2b273507be8fb Reviewed-on: https://chromium-review.googlesource.com/1409564 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Lutz Justen <ljusten@chromium.org> Reviewed-by: Dan Erat <derat@chromium.org> Reviewed-by: Hidehiko Abe <hidehiko@chromium.org> [modify] https://crrev.com/f5afdabe5cd26bbb1e0fc38f411b188e752c0950/src/chromiumos/tast/local/bundles/cros/session/ownership/ownership.go [modify] https://crrev.com/f5afdabe5cd26bbb1e0fc38f411b188e752c0950/src/chromiumos/tast/local/bundles/cros/session/ownership_taken.go [modify] https://crrev.com/f5afdabe5cd26bbb1e0fc38f411b188e752c0950/src/chromiumos/tast/local/session/session_manager.go
,
Today
(10 hours ago)
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/tast-tests/+/f5afdabe5cd26bbb1e0fc38f411b188e752c0950 commit f5afdabe5cd26bbb1e0fc38f411b188e752c0950 Author: Lutz Justen <ljusten@chromium.org> Date: Wed Jan 23 08:20:22 2019 Use new session manager policy storage interface Replaces all calls to Session Manager's Store/Retrieve policy calls by the corresponding new *Ex calls. The old interface is being removed. This is an effort to fix the combinatorial explosion of policy storage methods. CQ-DEPEND=CL:1408997 BUG=chromium:765644 TEST=Successfully ran affected tests: - session.OwnershipAPI - session.OwnershipRetaken - session.OwnershipTaken Change-Id: I572a5a723bdf81f4a7b3b57c9fb2b273507be8fb Reviewed-on: https://chromium-review.googlesource.com/1409564 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Lutz Justen <ljusten@chromium.org> Reviewed-by: Dan Erat <derat@chromium.org> Reviewed-by: Hidehiko Abe <hidehiko@chromium.org> [modify] https://crrev.com/f5afdabe5cd26bbb1e0fc38f411b188e752c0950/src/chromiumos/tast/local/bundles/cros/session/ownership/ownership.go [modify] https://crrev.com/f5afdabe5cd26bbb1e0fc38f411b188e752c0950/src/chromiumos/tast/local/bundles/cros/session/ownership_taken.go [modify] https://crrev.com/f5afdabe5cd26bbb1e0fc38f411b188e752c0950/src/chromiumos/tast/local/session/session_manager.go |
|||||||||||
►
Sign in to add a comment |
|||||||||||
Comment 1 by ljusten@chromium.org
, Sep 15 2017