[rfc][icedtea-web] Launching PolicyEditor from CertWarningPane

Andrew Azores aazores at redhat.com
Thu Mar 13 19:08:05 UTC 2014


Hi,

This patch adds a button which summons a popup menu, currently with only 
one item, allowing the user to launch PolicyEditor directly from the 
warning dialog. The editor appears with the current applet's codebase 
added (if necessary) and pre-selected. This, along with the sandbox 
button and earlier patch allowing JNLPPolicy to use per-codebase policy 
entries and to reload at runtime, allows for easy configuration of fine 
grained permissions granted to an applet.

Feedback/recommendations on the UI here are definitely welcome. At a 
later point, extra items will be added to the popup menu to allow for 
"this run only" temporary permissions to be granted to the applet. These 
choices will have to use a different mechanism for adding the 
permissions, however, since it won't be automatically handled by the 
JNLPPolicy/automatically reloaded by SecurityDelegate, as the policy 
file permissions are. (note the conspicuous lack of any code here to 
actually force a policy reload - this is already handled by the sandbox 
button and SecurityDelegate)

Note that there is a visual bug with PolicyEditor where the checkboxes 
may not be updated correctly, and will be incorrectly blank when the 
currently selected codebase actually does have permissions assigned. 
This will be addressed separately. As a workaround, simply switch to 
"All applets" codebase, then back to the applet-specific one. The 
checkboxes will then correctly update.

http://caff.de/applettest/Signed.html can serve as a test applet again.

ChangeLog:
Add button with popup menu to launch PolicyEditor
* netx/net/sourceforge/jnlp/resources/Messages.properties: 
(ButPolicyEditorDropdown, CertWarnPolicyTip, CertWarnPolicyEditorItem): 
new messages
* netx/net/sourceforge/jnlp/security/dialogs/CertWarningPane.java: 
(addComponents, setTextAndLabels, addButtons) refactored and split 
methods. (createPolicyPermissionsMenu) new method. 
(PolicyEditorLaunchListener) new ActionListener for advancedOptions button

Thanks,

-- 
Andrew A

-------------- next part --------------
A non-text attachment was scrubbed...
Name: policyeditor-in-dialog-4.patch
Type: text/x-patch
Size: 14327 bytes
Desc: not available
URL: <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20140313/6e3e1ecf/policyeditor-in-dialog-4-0001.patch>


More information about the distro-pkg-dev mailing list