[rfc][icedtea-web] Preparing PolicyEditor for future full policyfile featureset

Andrew Azores aazores at redhat.com
Mon Nov 3 18:41:18 UTC 2014


PolicyEditor is currently not a viable total replacement for the 
existing JDK policytool for a few reasons.

1) Only supports CodeBase, not SignedBy and Principal
2) No KeyStore entry support
3) Parser is not a real parser
4) CustomPolicyViewer is a little underpowered

Once these issues are all resolved, then I think it would be fair for us 
to push using PolicyEditor alone, and remove the button from 
itweb-settings which launches policytool as the "Advanced editor".

This patch is aimed at working on #1 and #2. It adds a few more simple 
data structures (KeystoreInfo and PolicyIdentifier) so that, once a 
proper parser exists, a full-featured policy file can be fully modelled 
with PolicyEditor's structures. KeystoreInfo is currently completely 
unused, and PolicyIdentifier is used only for its codebase attribute, so 
there are no behavioural changes after this patch is applied. All unit 
tests should come up with the same results (and the only unit test 
changes made are refactoring for builder pattern) and manual testing 
should work exactly the same as well.

Since PolicyEntries now have many more attributes, its constructor has 
been made private and PolicyEntry is now constructed with a Builder. 
Changing each of the existing unit test cases dealing with PolicyEntry 
to use the builder introduced some unfortunate noise to this patch.

Missing with this changeset are any changes to PolicyFileModel so that 
these new attributes might be written to file if (somehow) present. 
Since there is no UI to modify these attributes and no parser to read 
them from files, for now it will have to be done simply with mock data 
and performed only in unit tests. I'd like to add this as a separate 
changeset simply because of the limited and highly variable amounts of 
time I have to commit to this at the moment.

Andrew Azores
-------------- next part --------------
A non-text attachment was scrubbed...
Name: policyeditor-identifiers.patch
Type: text/x-patch
Size: 36253 bytes
Desc: not available
URL: <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20141103/2eef2c9f/policyeditor-identifiers-0001.patch>

More information about the distro-pkg-dev mailing list