authpolicy: Autogenerate user_policy_encoder.inc |
|||||||
Issue descriptionThe current version of user_policy_encoder.inc in authpolicy is hard-coded. Add code to autogenerate it from policy_templates.json.
,
Nov 3 2016
,
Nov 21 2016
,
Jan 18 2017
,
Mar 28 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/dc39ee6eb556261f1bcff11bf658eacea0ee4572 commit dc39ee6eb556261f1bcff11bf658eacea0ee4572 Author: ljusten <ljusten@chromium.org> Date: Tue Mar 28 10:39:21 2017 Generate code for encoding cloud policy protobufs Modifies the script that generates code from policy_templates.json to output policy code that make it easy to iterate over all user policies to encode data in a cloud policy protobuf. The code is not used in Chromium. It will be used in Chrome OS's authpolicy project. Right now, authpolicy uses similar, checked in code, see policy_keys and in user_policy_encoder_gen.cc platform2/authpolicy/policy. This CL is implemented in Chromium, as opposed to a script in Chrome OS, to facilitate maintainance. A script in Chrome OS would have many dependencies on the Chromium script and it would be messy to maintain. Changing the script in Chromium cannot break Chrome OS because it is guarded by an uprev step in the protofiles project. BUG= chromium:659020 , chromium:659078 TEST=Compiled Chromium, tested autogenerated code in Chrome OS Review-Url: https://codereview.chromium.org/2726103004 Cr-Commit-Position: refs/heads/master@{#460056} [modify] https://crrev.com/dc39ee6eb556261f1bcff11bf658eacea0ee4572/components/policy/tools/generate_policy_source.py
,
Mar 30 2017
,
Apr 4 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/78df40fbb779b7eb1e0c8d5324416dfcffa48e51 commit 78df40fbb779b7eb1e0c8d5324416dfcffa48e51 Author: Lutz Justen <ljusten@chromium.org> Date: Tue Apr 04 02:09:15 2017 Uprev protofiles and VERSION file Uprev's protofiles to the latest revision of components/policy.git and chromeos/policy/proto.git, so that the latest device policy proto, policy_templates.json and generate_policy_source.py are pulled in. Points authpolicy-9999.ebuild to the latest protofiles revision since it uses the new generator py, see dependent CL. For delta of components/policy.git, see https://chromium.googlesource.com/chromium/src/components/policy/ between afbb63e and 2544d59 (including). For delta of chromeos/policy/proto.git, see https://chromium.googlesource.com/chromium/src/chrome/browser/chromeos/policy/proto/ between 8af5a78 and 772888d (including). CQ-DEPEND=CL:461921 BUG= chromium:659078 TEST=Compiled, built packages, ran authpolicy unit tests Change-Id: I82feb08b3c651b133703c90e59ff851329d9e888 Reviewed-on: https://chromium-review.googlesource.com/461860 Commit-Ready: Lutz Justen <ljusten@chromium.org> Tested-by: Lutz Justen <ljusten@chromium.org> Reviewed-by: Roman Sorokin <rsorokin@chromium.org> [add] https://crrev.com/78df40fbb779b7eb1e0c8d5324416dfcffa48e51/chromeos-base/protofiles/protofiles-0.0.3-r1.ebuild [delete] https://crrev.com/61328c1ee7817c1bc6ef454f82a0bf9b297e37e0/chromeos-base/protofiles/protofiles-0.0.2-r1.ebuild [modify] https://crrev.com/78df40fbb779b7eb1e0c8d5324416dfcffa48e51/chromeos-base/authpolicy/authpolicy-9999.ebuild [rename] https://crrev.com/78df40fbb779b7eb1e0c8d5324416dfcffa48e51/chromeos-base/protofiles/protofiles-0.0.3.ebuild [modify] https://crrev.com/78df40fbb779b7eb1e0c8d5324416dfcffa48e51/chromeos-base/protofiles/files/VERSION
,
Apr 4 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform2/+/097737ed5eafd38bbd67405b2f388f73d96b98b4 commit 097737ed5eafd38bbd67405b2f388f73d96b98b4 Author: Lutz Justen <ljusten@chromium.org> Date: Tue Apr 04 02:09:15 2017 authpolicy: Autogenerate user policy encoder Uses recent changes to generate_policy_source.py to autogenerate Chrome OS code to encode a RegistryDict into a user policy protobuf. Replaces checked-in code that had been manually generated a few months back. As a result, if Chrome OS user policies get added, one only has to uprev the protofiles ebuild to point to the latest policy_templates.json and authpolicy will automatically support those policies. Also adds support for device policies that have been added in the past month since the protofiles ebuild has been last uprev'ed. Device policy cannot automatically be encoded since there is no 1:1 mapping between policy_templates.json and the device policy proto. CQ-DEPEND=CL:461860 BUG= chromium:659078 TEST=Compiled, ran tests, tested all new device policies if available (two were not due to 'future' and 'external'). Change-Id: I0254ada8bc2696f8ed38bbb0979dca00b37f86a4 Reviewed-on: https://chromium-review.googlesource.com/461921 Commit-Ready: Lutz Justen <ljusten@chromium.org> Tested-by: Lutz Justen <ljusten@chromium.org> Reviewed-by: Zentaro Kavanagh <zentaro@google.com> [modify] https://crrev.com/097737ed5eafd38bbd67405b2f388f73d96b98b4/authpolicy/policy/device_policy_encoder.cc [modify] https://crrev.com/097737ed5eafd38bbd67405b2f388f73d96b98b4/authpolicy/authpolicy.gyp [modify] https://crrev.com/097737ed5eafd38bbd67405b2f388f73d96b98b4/authpolicy/authpolicy_unittest.cc [delete] https://crrev.com/d653dbab6abdbaef60081f7be2cb48392a125742/authpolicy/policy/user_policy_encoder_gen.cc [modify] https://crrev.com/097737ed5eafd38bbd67405b2f388f73d96b98b4/authpolicy/policy/user_policy_encoder.cc [modify] https://crrev.com/097737ed5eafd38bbd67405b2f388f73d96b98b4/authpolicy/policy/user_policy_encoder.h [delete] https://crrev.com/d653dbab6abdbaef60081f7be2cb48392a125742/authpolicy/policy/policy_keys.cc [delete] https://crrev.com/d653dbab6abdbaef60081f7be2cb48392a125742/authpolicy/policy/policy_keys.h
,
Apr 4 2017
,
Jul 6 2017
bulk Verify of older or not-user-facing Chromad bugs |
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by ljusten@chromium.org
, Oct 27 2016