Tuesday, October 11, 2016

Policy Plus - Semantic policy files

Sharing policy settings is a wordy affair at the moment. To tell someone how to tweak their machine in gpedit.msc, you have to step them through the right sequence of categories, have them hunt down the right policy, and twiddle the extra options as appropriate. .reg files make sharing Registry entries easy - there should be an analogy for policies.

Today I started work on just such a thing: the Semantic Policy format, .spol. Policy Plus will eventually have the ability to import (and probably create) these files. My goal is a format that's easily parsable, easily human-readable, and easily human-writable. It's not completely worked out yet, but I'm thinking of something like this:

Policy Plus Semantic Policy

Microsoft.Policies.BITS:BITS_Job_Timeout C
 Enabled
  JobInactivityTimeout: 5

Microsoft.Policies.BITS:BITS_MaxContentAge C
 Disabled

I plan on keeping indentation optional, but it does make the file easier to read, in my opinion. The enum type will be distinguished from the normal number type by a # sign before the number. String literals will have quotes. I'm not sure what to do about multiline string literals; I'm thinking of not supporting them at first because the UI doesn't (not in Policy Plus, not in LGPE).

This format will be superior to .pol in terms of policy representation because it actually has the semantics of policies; notice how there's no mention of Registry values.

No comments:

Post a Comment