aboutsummaryrefslogtreecommitdiffstats
path: root/netx/net/sourceforge/jnlp/config
diff options
context:
space:
mode:
authorOmair Majid <[email protected]>2011-01-04 15:12:40 -0500
committerOmair Majid <[email protected]>2011-01-04 15:12:40 -0500
commit6144e5cba6ef2e89096e6a74b74dd0d5ebf996b1 (patch)
treea0c4f7a837ca8c64e1e89c0b95d09956a8caf025 /netx/net/sourceforge/jnlp/config
parent0cc285288f1f96cafd7dc069ed040337c4a25f58 (diff)
allow custom permissions instead of all permissions for trusted code
2011-01-04 Omair Majid <[email protected]> * netx/net/sourceforge/jnlp/SecurityDesc.java: Add customTrustedPolicy. (SecurityDesc): Initialize customTrustedPolicy. (getCustomTrustedPolicy): New method. Get custom policy file from configuration and use it to initialize a custom configuration. (getPermissions): If trusted application and customTrustedPolicy is not null, delegate to otherwise return AllPermissions. * netx/net/sourceforge/jnlp/config/Defaults.java (getDefaults): Use constant for property. * netx/net/sourceforge/jnlp/config/DeploymentConfiguration.java: Add new constant KEY_SECURITY_TRUSTED_POLICY. * netx/net/sourceforge/jnlp/runtime/ApplicationInstance.java (installEnvironment): Pass cs as a parameter to SecurityDesc.getPermissions. * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java (getPermissions): Likewise.
Diffstat (limited to 'netx/net/sourceforge/jnlp/config')
-rw-r--r--netx/net/sourceforge/jnlp/config/Defaults.java2
-rw-r--r--netx/net/sourceforge/jnlp/config/DeploymentConfiguration.java2
2 files changed, 3 insertions, 1 deletions
diff --git a/netx/net/sourceforge/jnlp/config/Defaults.java b/netx/net/sourceforge/jnlp/config/Defaults.java
index 8ab8347..48bec09 100644
--- a/netx/net/sourceforge/jnlp/config/Defaults.java
+++ b/netx/net/sourceforge/jnlp/config/Defaults.java
@@ -209,7 +209,7 @@ public class Defaults {
String.valueOf(true)
},
{
- "deployment.security.trusted.policy",
+ DeploymentConfiguration.KEY_SECURITY_TRUSTED_POLICY,
BasicValueValidators.getFilePathValidator(),
null
},
diff --git a/netx/net/sourceforge/jnlp/config/DeploymentConfiguration.java b/netx/net/sourceforge/jnlp/config/DeploymentConfiguration.java
index a07df1f..ded5923 100644
--- a/netx/net/sourceforge/jnlp/config/DeploymentConfiguration.java
+++ b/netx/net/sourceforge/jnlp/config/DeploymentConfiguration.java
@@ -104,6 +104,8 @@ public final class DeploymentConfiguration {
/** Boolean. Only show security prompts to user if true */
public static final String KEY_SECURITY_PROMPT_USER = "deployment.security.askgrantdialog.show";
+ public static final String KEY_SECURITY_TRUSTED_POLICY = "deployment.security.trusted.policy";
+
/** Boolean. Only give AWTPermission("showWindowWithoutWarningBanner") if true */
public static final String KEY_SECURITY_ALLOW_HIDE_WINDOW_WARNING = "deployment.security.sandbox.awtwarningwindow";