Movatterモバイル変換


[0]ホーム

URL:


Skip toContent

Mixing Privileged Code and Sandbox Code
Ensuring Application and Applet Security

These documentation pages are no longer current. They remain available for archival purposes. Please visithttps://docs.oracle.com/javase for the most up-to-date documentation.

Contents

Overview

Privileged Java Web Start applications and applets that containcomponents that are restricted to the security sandbox could potentially be unsafe unlessthe mixed code was intended by the application vendor. When aprogram contains both privileged components and sandbox components, security warnings are shown.Note that JavaScript code is restricted to the sandbox and could also cause security warnings to be shown. SeeCaller-Allowable-Codebase Attribute for information on the manifest attribute for authorizing JavaScript code.

The security warnings state that Java has discovered applicationcomponents that could indicate a security concern and recommendsthat you contact the application vendor to ensure that theapplication components have not been tampered with.

In the dialog, you choose toBlock, orDon't Block execution of the applicationcomponents. You can also click the optionalMoreInformation link.

Clicking theBlock button blocks potentiallyunsafe components from running, and the program may terminate.Clicking theDon't Block button causes theapplication or applet to continue execution with some addedprotections.

Raising a warning is the default behavior, but there are optionsavailable to manage how this situation is handled.


Note: If any concepts are unclear, such as how tomodify a manifest file, or how to sign a JAR file, or how to use adeployment configuration file, seeFor MoreInformation for useful links.

Mixed Code Protection Options forUsers

There are two mechanisms for managing how mixed code programs arehandled.
Version note: To take advantage of these securityenhancements, users need to install the Java SE or Java forBusiness 6 Update 19 release (or later) and use the new JavaPlug-in, which is enabled by default. To use an earlier JRE withthe new Java Plug-in, you need to install the Java for Business 5.0Update 24 release (or later) or the Java for Business 1.4.2_26release (or later) in order to enable the mixed code securityenhancement for those release families.
Note 1: Mixed code checking for the 1.4.2 releaseis available only for the Windows platform.
Note 2: For Solaris, the new Java Plug-in requiresFirefox 3 or later. Netscape 7 and Firefox 2 are notsupported.
Note 3: For more information on which platformsare supported by the new plug-in, see theRelease Notes for the Next-Generation JavaPlug-in.

Deploying Privileged Applicationsand Applets Securely Without a Mixed Code Warning

This section describes best practices for developers anddeployers to protect their applications and applets from beingmaliciously re-purposed by replacing trusted components withuntrusted ones.

Two JAR manifest attributes are available, as of Java SE 6Update 19, for deploying privileged applications and applets. A warningdialog is not displayed when one of these manifest attributes isincluded.

Developers and deployers should check their Java WebStart applications and applets to determine if they mix privileged code anduntrusted code. If users of these applications and applets mayinadvertently download these applications and applets from roguewebsites, deploying or re-deploying with one of the followingattributes should be considered. Existing signed JARs need to bere-signed after adding these manifest attributes. Note:source code of the classes and resources are not required forre-signing with the manifest entries.

Trusted-Only Attribute

For applications and applets that do not require untrustedcomponents, use theTrusted-Only attribute.No warning dialog is displayed and an application or appletthat loads a JAR file containing this attribute does not load anyuntrusted classes or resources. This attribute prevents a privilegedapplication or applet from being re-purposed with untrustedcomponents. SeeTrusted-Only Attribute for more information.

Trusted-Library Attribute

For applications and applets that are designed to allow untrustedcomponents, use theTrusted-Library attribute. No warning dialog is shown and an application orapplet can load JAR files containing untrusted classes orresources. This attribute prevents components in a privileged application or applet from being re-purposed with untrustedcomponents. SeeTrusted-Library Attribute for more information about using this attribute.

TheTrusted-Library attribute is used for calls between privileged Java code and sandbox Java code. If you have JavaScript code that calls Java code, use theCaller-Allowable-Codebase Attribute.

Mixed Code FAQ

For More Information


Copyright © 1993, 2020, Oracleand/or its affiliates. All rights reserved.
Contact Us

[8]ページ先頭

©2009-2025 Movatter.jp