policy: Enforce the 'required' field in policy_templates.json |
||
Issue descriptionIn policy_templates.json there are some dictionary policies that have a "required" field. Even when specified, this field is not actually enforced i.e. providing a policy that omits the properties specified in 'required' will not trigger any errors. It would be nice if this field was actually enforced. I'm currently adding a dictionary policy that would benefit from it. As it is today, I will have to write my own ConfigurationPolicyHandler to enforce the dictionary contains the required properties.
,
Jun 22 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/a9cb9fd415b9812d4cf48ad185b56710b088f530 commit a9cb9fd415b9812d4cf48ad185b56710b088f530 Author: Giovanni Ortuño Urquidi <ortuno@chromium.org> Date: Fri Jun 22 04:01:05 2018 policy: Use raw strings to avoid escaping quotes Changes strings to use R"(...)" to avoid escaping quotes in schemas. Bug: 850009 Change-Id: Icbb0b8640fa9b9abb5373a834b5b3051ce3f5e4e Reviewed-on: https://chromium-review.googlesource.com/1109313 Reviewed-by: Lutz Justen <ljusten@chromium.org> Commit-Queue: Giovanni Ortuño Urquidi <ortuno@chromium.org> Cr-Commit-Position: refs/heads/master@{#569530} [modify] https://crrev.com/a9cb9fd415b9812d4cf48ad185b56710b088f530/components/policy/core/common/schema_unittest.cc
,
Jul 2
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/17c9d423b88c24bfbe7c70da46db813569d6118d commit 17c9d423b88c24bfbe7c70da46db813569d6118d Author: Giovanni Ortuño Urquidi <ortuno@chromium.org> Date: Mon Jul 02 04:03:30 2018 policy: Enforce 'required' field for dictionary policies Changed generate_policy_source.py to also parse the "required" field of dictionary policies and also changes schema.cc to check that all required properties are included in the policy. Bug: 850009 Change-Id: I466236a9439383b3e0a330f277eebc50d72305be Reviewed-on: https://chromium-review.googlesource.com/1090521 Reviewed-by: calamity <calamity@chromium.org> Reviewed-by: Lutz Justen <ljusten@chromium.org> Reviewed-by: Maksim Ivanov <emaxx@chromium.org> Commit-Queue: Giovanni Ortuño Urquidi <ortuno@chromium.org> Cr-Commit-Position: refs/heads/master@{#571812} [modify] https://crrev.com/17c9d423b88c24bfbe7c70da46db813569d6118d/components/json_schema/json_schema_constants.cc [modify] https://crrev.com/17c9d423b88c24bfbe7c70da46db813569d6118d/components/json_schema/json_schema_constants.h [modify] https://crrev.com/17c9d423b88c24bfbe7c70da46db813569d6118d/components/json_schema/json_schema_validator.cc [modify] https://crrev.com/17c9d423b88c24bfbe7c70da46db813569d6118d/components/json_schema/json_schema_validator_unittest.cc [modify] https://crrev.com/17c9d423b88c24bfbe7c70da46db813569d6118d/components/policy/core/common/schema.cc [modify] https://crrev.com/17c9d423b88c24bfbe7c70da46db813569d6118d/components/policy/core/common/schema.h [modify] https://crrev.com/17c9d423b88c24bfbe7c70da46db813569d6118d/components/policy/core/common/schema_internal.h [modify] https://crrev.com/17c9d423b88c24bfbe7c70da46db813569d6118d/components/policy/core/common/schema_unittest.cc [modify] https://crrev.com/17c9d423b88c24bfbe7c70da46db813569d6118d/components/policy/tools/generate_policy_source.py
,
Jul 2
|
||
►
Sign in to add a comment |
||
Comment 1 by ortuno@chromium.org
, Jun 7 2018Status: Started (was: Untriaged)