- Настройка безопасности Java в Internet Explorer
- Просмотр и изменение настраиваемых параметров Java для каждой зоны безопасности
- Java Security Overview
- Introduction to Java Security
- Java Language Security and Bytecode Verification
- Basic Security Architecture
- Security Providers
- File Locations
- Java Cryptography
- Public Key Infrastructure
- Key and Certificate Storage
- Public Key Infrastructure Tools
- Authentication
- Secure Communication
- SSL, TLS, and DTLS Protocols
- Simple Authentication and Security Layer (SASL)
- Generic Security Service API and Kerberos
- Access Control
- Permissions
- Security Policy
- Access Control Enforcement
- XML Signature
- Additional Information about Java Security
- Java Security Classes Summary
- Deprecated Security APIs Marked for Removal
- Security Tools Summary
- Built-In Providers
Настройка безопасности Java в Internet Explorer
В этой статье приводятся пошаговые инструкции по настройке безопасности Java в Internet Explorer. Internet Explorer можно настроить с помощью параметров безопасности по умолчанию или с помощью настраиваемых параметров безопасности. Пользовательские параметры безопасности явно определяют разрешения Java для подписанных и неподписанных приложений. Для настройки настраиваемых разрешений Java необходимо установить виртуальную машину Майкрософт.
Исходная версия продукта: Internet Explorer
Исходный номер статьи базы знаний: 315674
Просмотр и изменение настраиваемых параметров Java для каждой зоны безопасности
Чтобы настроить безопасность Java в Internet Explorer, выполните указанные ниже действия.
Запустите Internet Explorer и в меню Сервис выберите пункт Свойства обозревателя .
В диалоговом окне Свойства обозревателя перейдите на вкладку Безопасность .
На странице Безопасность есть четыре зоны безопасности:
- Интернет
- Местная интрасеть
- Надежные сайты
- Ограниченные сайты
Выберите зону, для которой требуется изменить параметры безопасности Java.
В разделе уровень безопасности для этого кадра зоны щелкните настраиваемый уровень. В Internet Explorer щелкните настраиваемый уровень, а затем щелкните Параметры.
Просмотр раздела Microsoft VM (раздел «Java» в Internet Explorer)
В списке разрешений Java под виртуальной машиной Майкрософт щелкните Настраиваемый.
Выберите пункт Настраиваемые параметры Java.
Перейдите на вкладку Просмотр разрешений для просмотра текущих разрешений Java. Разрешения Java группируются в трех основных категориях:
- Разрешения, предоставленные неподписанному содержимому
Неподписанные Java приложения, которые запрашивают эти разрешения, могут выполняться без приглашения пользователя. - Разрешения, которым разрешено подписанное содержимое
Подписанные Java апплеты, которые запрашивают эти разрешения, могут выполняться без запроса пользователя. - Разрешения, которым запрещен доступ к подписанному контенту
Подписанные Java приложения не имеют этих разрешений.
Перейдите на вкладку изменение разрешений . Выберите необходимый вариант для более точного управления разрешениями Java для зоны. Если вы не хотите хранить параметры, вы можете нажать кнопку Сброс , чтобы сбросить разрешения:
- Сохраненные разрешения
- Высокая безопасность
- Средний уровень безопасности
- Минимальная безопасность
Нажмите кнопку ОК, а затем еще раз нажмите кнопку ОК .
Будьте внимательны при настройке разрешений Java. Некоторые программы на основе Java могут работать неправильно после изменения разрешений. Некоторые изменения разрешений Java могут сделать компьютер незащищенным от хакеров. Корпорация Майкрософт не рекомендует изменять разрешения по умолчанию, если для этого не требуется определенная цель.
Java Security Overview
Java security includes a large set of APIs, tools, and implementations of commonly-used security algorithms, mechanisms, and protocols. The Java security APIs span a wide range of areas, including cryptography, public key infrastructure, secure communication, authentication, and access control. Java security technology provides the developer with a comprehensive security framework for writing applications, and also provides the user or administrator with a set of tools to securely manage applications.
Introduction to Java Security
The JDK is designed with a strong emphasis on security. At its core, the Java language itself is type-safe and provides automatic garbage collection, enhancing the robustness of application code. A secure class loading and verification mechanism ensures that only legitimate Java code is executed. The Java security architecture includes a large set of application programming interfaces (APIs), tools, and implementations of commonly-used security algorithms, mechanisms, and protocols.
The Java security APIs span a wide range of areas. Cryptographic and public key infrastructure (PKI) interfaces provide the underlying basis for developing secure applications. Interfaces for performing authentication and access control enable applications to guard against unauthorized access to protected resources.
The APIs allow for multiple interoperable implementations of algorithms and other security services. Services are implemented in providers , which are plugged into the JDK through a standard interface that makes it easy for applications to obtain security services without having to know anything about their implementations. This allows developers to focus on how to integrate security into their applications, rather than on how to actually implement complex security mechanisms.
The JDK includes a number of providers that implement a core set of security services. It also allows for additional custom providers to be installed. This enables developers to extend the platform with new security mechanisms.
The JDK is divided into modules. Modules that contain security APIs include the following:
Table 1-1 Modules That Contain Security APIs
Module | Description |
---|---|
java.base | Defines the foundational APIs of Java SE . Contained packages include java.security , javax.crypto , javax.net.ssl , and javax.security.auth . |
java.security.jgss | Defines the Java binding of the IETF Generic Security Services API (GSS-API). This module also contains GSS-API mechanisms including Kerberos v5 and SPNEGO. |
java.security.sasl | Defines Java support for the IETF Simple Authentication and Security Layer (SASL). This module also contains SASL mechanisms including DIGEST-MD5, CRAM-MD5, and NTLM. |
java.smartcardio | Defines the Java Smart Card I/O API. |
java.xml.crypto | Defines the API for XML cryptography. |
jdk.security.auth | Provides implementations of the javax.security.auth.* interfaces and various authentication modules. |
jdk.security.jgss | Defines Java extensions to the GSS-API and an implementation of the SASL GSS-API mechanism. |
Java Language Security and Bytecode Verification
The Java language is designed to be type-safe and easy to use. It provides automatic memory management, garbage collection, and range-checking on arrays. This reduces the overall programming burden placed on developers, leading to fewer subtle programming errors and to safer, more robust code.
A compiler translates Java programs into a machine-independent bytecode representation. A bytecode verifier is invoked to ensure that only legitimate bytecodes are executed in the Java runtime. It checks that the bytecodes conform to the Java Language Specification and do not violate Java language rules or namespace restrictions. The verifier also checks for memory management violations, stack underflows or overflows, and illegal data typecasts. Once bytecodes have been verified, the Java runtime prepares them for execution.
private : Most restrictive modifier; access is not allowed outside the particular class in which the private member (a method, for example) is defined.
protected : Allows access to any subclass or to other classes within the same package.
Package-private: If not specified, then this is the default access level; allows access to classes within the same package.
public : No longer guarantees that the element is accessible everywhere; accessibility depends upon whether the package containing that element is exported by its defining module and whether that module is readable by the module containing the code that is attempting to access it.
Basic Security Architecture
The JDK defines a set of APIs spanning major security areas, including cryptography, public key infrastructure, authentication, secure communication, and access control. The APIs allow developers to easily integrate security into their application code.
The APIs are designed around the following principles:
Implementation independence Applications do not need to implement security themselves. Rather, they can request security services from the JDK. Security services are implemented in providers (see the section Security Providers), which are plugged into the JDK via a standard interface. An application may rely on multiple independent providers for security functionality. Implementation interoperability
Providers are interoperable across applications. Specifically, an application is not bound to a specific provider if it does not rely on default values from the provider.
Algorithm extensibility The JDK includes a number of built-in providers that implement a basic set of security services that are widely used today. However, some applications may rely on emerging standards not yet implemented, or on proprietary services. The JDK supports the installation of custom providers that implement such services.
Security Providers
The java.security.Provider class encapsulates the notion of a security provider in the Java platform. It specifies the provider’s name and lists the security services it implements. Multiple providers may be configured at the same time and are listed in order of preference. When a security service is requested, the highest priority provider that implements that service is selected.
Applications rely on the relevant getInstance method to request a security service from an underlying provider.
For example, message digest creation represents one type of service available from providers. To request an implementation of a specific message digest algorithm, call the method java.security.MessageDigest.getInstance . The following statement requests a SHA-256 message digest implementation without specifying a provider name:
The following figure illustrates how this statement obtains a SHA-256 message digest implementation. The providers are searched in preference order, and the implementation from the first provider supplying that particular algorithm, ProviderB , is returned.
Figure 1-1 Request SHA-256 Message Digest Implementation Without Specifying Provider
Description of «Figure 1-1 Request SHA-256 Message Digest Implementation Without Specifying Provider»
You can optionally request an implementation from a specific provider by specifying the provider’s name. The following statement requests a SHA-256 message digest implementation from a specific provider, ProviderC :
The following figure illustrates how this statement requests a SHA-256 message digest implementation from a specific provider, ProviderC . In this case, the implementation from that provider is returned, even though a provider with a higher preference order, ProviderB , also supplies a SHA-256 implementation.
Figure 1-2 Request SHA-256 Message Digest Implementation from Specific Provider
Description of «Figure 1-2 Request SHA-256 Message Digest Implementation from Specific Provider»
For more information about cryptographic services, such as message digest algorithms, see the section Java Cryptography.
Oracle’s implementation of the Java platform includes a number of built-in default providers that implement a basic set of security services that can be used by applications. Note that other vendor implementations of the Java platform may include different sets of providers that encapsulate vendor-specific sets of security services. The term built-in default providers refers to the providers available in Oracle’s implementation.
File Locations
The following table lists locations of some security-related files and tools.
Table 1-2 Java security files and tools
File Name or Tool Name | Location | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Cryptographic policy directory |
Package | Class/Interface Name | Usage | Module |
---|---|---|---|
java.lang | SecurityException | Indicates a security violation | java.base |
java.lang | SecurityManager | Mediates all access control decisions | java.base |
java.lang | System | Installs the SecurityManager | java.base |
java.security | AccessController | Called by default implementation of SecurityManager to make access control decisions | java.base |
java.security | DomainLoadStoreParameter | Stores parameters for the Domain keystore (DKS) | java.base |
java.security | Key | Represents a cryptographic key | java.base |
java.security | KeyStore | Represents a repository of keys and trusted certificates | java.base |
java.security | MessageDigest | Represents a message digest | java.base |
java.security | Permission | Represents access to a particular resource | java.base |
java.security | PKCS12Attribute | Supports attributes in PKCS12 keystores | java.base |
java.security | Policy | Encapsulates the security policy | java.base |
java.security | Provider | Encapsulates security service implementations | java.base |
java.security | Security | Manages security providers and Security Properties | java.base |
java.security | Signature | Creates and verifies digital signatures | java.base |
java.security.cert | Certificate | Represents a public key certificate | java.base |
java.security.cert | CertStore | Represents a repository of unrelated and typically untrusted certificates | java.base |
java.security.cert | CRL | Represents a CRL | java.base |
javax.crypto | Cipher | Performs encryption and decryption | java.base |
javax.crypto | KeyAgreement | Performs a key exchange | java.base |
javax.net.ssl | KeyManager | Manages keys used to perform SSL/TLS authentication | java.base |
javax.net.ssl | SSLEngine | Produces/consumes SSL/TLS packets, allowing the application freedom to choose a transport mechanism | java.base |
javax.net.ssl | SSLSocket | Represents a network socket that encapsulates SSL/TLS support on top of a normal stream socket | java.base |
javax.net.ssl | TrustManager | Makes decisions about who to trust in SSL/TLS interactions (for example, based on trusted certificates in key stores) | java.base |
javax.security.auth | Subject | Represents a user | java.base |
javax.security.auth.kerberos | KerberosPrincipal | Represents a Kerberos principal | java.base |
javax.security.auth.kerberos | KerberosTicket | Represents a Kerberos ticket | java.base |
javax.security.auth.kerberos | KerberosKey | Represents a Kerberos key | java.base |
javax.security.auth.kerberos | KerberosTab | Represents a Kerberos keytab file | java.base |
javax.security.auth.login | LoginContext | Supports pluggable authentication | java.base |
javax.security.auth.spi | LoginModule | Implements a specific authentication mechanism | java.base |
javax.security.sasl | Sasl | Creates SaslClient and SaslServer objects | java.security.sasl |
javax.security.sasl | SaslClient | Performs SASL authentication as a client | java.security.sasl |
javax.security.sasl | SaslServer | Performs SASL authentication as a server | java.security.sasl |
org.ietf.jgss | GSSContext | Encapsulates a GSS-API security context and provides the security services available via the context | java.security.jgss |
com.sun.security.auth.module | JndiLoginModule | Performs username/password authentication using LDAP or NIS | jdk.security.auth |
com.sun.security.auth.module | KeyStoreLoginModule | Performs authentication based on key store login | jdk.security.auth |
com.sun.security.auth.module | Krb5LoginModule | Performs authentication using Kerberos protocols | jdk.security.auth |
Deprecated Security APIs Marked for Removal
The following APIs are deprecated and eligible to be removed in a future release.
You can check the API dependencies using the jdeprscan tool. See jdeprscan in Java Platform, Standard Edition Tools Reference .
The following classes are deprecated and marked for removal:
- com.sun.security.auth.PolicyFile
- com.sun.security.auth.SolarisNumericGroupPrincipal
- com.sun.security.auth.SolarisNumericUserPrincipal
- com.sun.security.auth.SolarisPrincipal
- com.sun.security.auth.X500Principal
- com.sun.security.auth.module.SolarisLoginModule
- com.sun.security.auth.module.SolarisSystem
The following methods are deprecated and marked for removal:
- java.lang.SecurityManager.getInCheck
- java.lang.SecurityManager.checkMemberAccess
- java.lang.SecurityManager.classDepth
- java.lang.SecurityManager.currentClassLoader
- java.lang.SecurityManager.currentLoadedClass
- java.lang.SecurityManager.inClass
- java.lang.SecurityManager.inClassLoader
- java.lang.SecurityManager.checkAwtEventQueueAccess
- java.lang.SecurityManager.checkTopLevelWindow
- java.lang.SecurityManager.checkSystemClipboardAccess
The following field is deprecated and marked for removal:
Security Tools Summary
The following tables describe Java security and Kerberos-related tools.
See Security Tools and Commands in Java Platform, Standard Edition Tools Reference .
Table 1-4 Java Security Tools
Tool | Usage | ||||||||
---|---|---|---|---|---|---|---|---|---|
jar | Creates Java Archive (JAR) files | ||||||||
jarsigner | Signs and verifies signatures on JAR files | ||||||||
keytool | Creates and manages key stores | ||||||||
policytool | Creates and edits policy files for use with default Policy implementation policytool is deprecated and marked for removal. There are also three Kerberos-related tools that are shipped with the JDK for Windows. Equivalent functionality is provided in tools of the same name that are automatically part of the Solaris and Linux operating environments. Table 1-5 Kerberos-related Tools
Built-In ProvidersThe Java SE implementation from Oracle includes a number of built-in provider packages. See JDK Providers Documentation. |