java.security

Home
Java Source Code / Java Documentation
1.6.0 JDK Core
2.6.0 JDK Modules
3.6.0 JDK Modules com.sun
4.6.0 JDK Modules com.sun.java
5.6.0 JDK Modules sun
6.6.0 JDK Platform
7.Ajax
8.Apache Harmony Java SE
9.Aspect oriented
10.Authentication Authorization
11.Blogger System
12.Build
13.Byte Code
14.Cache
15.Chart
16.Chat
17.Code Analyzer
18.Collaboration
19.Content Management System
20.Database Client
21.Database DBMS
22.Database JDBC Connection Pool
23.Database ORM
24.Development
25.EJB Server
26.ERP CRM Financial
27.ESB
28.Forum
29.Game
30.GIS
31.Graphic 3D
32.Graphic Library
33.Groupware
34.HTML Parser
35.IDE
36.IDE Eclipse
37.IDE Netbeans
38.Installer
39.Internationalization Localization
40.Inversion of Control
41.Issue Tracking
42.J2EE
43.J2ME
44.JBoss
45.JMS
46.JMX
47.Library
48.Mail Clients
49.Music
50.Net
51.Parser
52.PDF
53.Portal
54.Profiler
55.Project Management
56.Report
57.RSS RDF
58.Rule Engine
59.Science
60.Scripting
61.Search Engine
62.Security
63.Sevlet Container
64.Source Control
65.Swing Library
66.Template Engine
67.Test Coverage
68.Testing
69.UML
70.Web Crawler
71.Web Framework
72.Web Mail
73.Web Server
74.Web Services
75.Web Services apache cxf 2.2.6
76.Web Services AXIS2
77.Wiki Engine
78.Workflow Engines
79.XML
80.XML UI
Java Source Code / Java Documentation » 6.0 JDK Core » security » java.security 
java.security
Provides the classes and interfaces for the security framework. This includes classes that implement an easily configurable, fine-grained access control security architecture. This package also supports the generation and storage of cryptographic public key pairs, as well as a number of exportable cryptographic operations including those for message digest and signature generation. Finally, this package provides classes that support signed/guarded objects and secure random number generation. Many of the classes provided in this package (the cryptographic and secure random number generator classes in particular) are provider-based. The class itself defines a programming interface to which applications may write. The implementations themselves may then be written by independent third-party vendors and plugged in seamlessly as needed. Therefore application developers may take advantage of any number of provider-based implementations without having to add or rewrite code.

Package Specification

Related Documentation

For further documentation, please see: @since JDK1.1
Java Source File NameTypeComment
AccessControlContext.javaClass An AccessControlContext is used to make system resource access decisions based on the context it encapsulates.

More specifically, it encapsulates a context and has a single method, checkPermission, that is equivalent to the checkPermission method in the AccessController class, with one difference: The AccessControlContext checkPermission method makes access decisions based on the context it encapsulates, rather than that of the current execution thread.

Thus, the purpose of AccessControlContext is for those situations where a security check that should be made within a given context actually needs to be done from within a different context (for example, from within a worker thread).

An AccessControlContext is created by calling the AccessController.getContext method.

AccessControlException.javaClass

This exception is thrown by the AccessController to indicate that a requested access (to a critical system resource such as the file system or the network) is denied.

The reason to deny access can vary.

AccessController.javaClass
AlgorithmParameterGenerator.javaClass The AlgorithmParameterGenerator class is used to generate a set of parameters to be used with a certain algorithm.
AlgorithmParameterGeneratorSpi.javaClass This class defines the Service Provider Interface (SPI) for the AlgorithmParameterGenerator class, which is used to generate a set of parameters to be used with a certain algorithm.
AlgorithmParameters.javaClass This class is used as an opaque representation of cryptographic parameters.
AlgorithmParametersSpi.javaClass This class defines the Service Provider Interface (SPI) for the AlgorithmParameters class, which is used to manage algorithm parameters.
AllPermission.javaClass The AllPermission is a permission that implies all other permissions.

Note: Granting AllPermission should be done with extreme care, as it implies all other permissions.

AuthProvider.javaClass This class defines login and logout methods for a provider.
BasicPermission.javaClass The BasicPermission class extends the Permission class, and can be used as the base class for permissions that want to follow the same naming convention as BasicPermission.

The name for a BasicPermission is the name of the given permission (for example, "exit", "setFactory", "print.queueJob", etc).

Certificate.javaInterface

This is an interface of abstract methods for managing a variety of identity certificates. An identity certificate is a guarantee by a principal that a public key is that of another principal.

CodeSigner.javaClass This class encapsulates information about a code signer.
CodeSource.javaClass

This class extends the concept of a codebase to encapsulate not only the location (URL) but also the certificate chains that were used to verify signed code originating from that location.

DigestException.javaClass This is the generic Message Digest exception.
DigestInputStream.javaClass A transparent stream that updates the associated message digest using the bits going through the stream.

To complete the message digest computation, call one of the digest methods on the associated message digest after your calls to one of this digest input stream's DigestInputStream.read() read methods.

It is possible to turn this stream on or off (see DigestInputStream.on(boolean) on ).

DigestOutputStream.javaClass A transparent stream that updates the associated message digest using the bits going through the stream.

To complete the message digest computation, call one of the digest methods on the associated message digest after your calls to one of this digest ouput stream's DigestOutputStream.write(int) write methods.

It is possible to turn this stream on or off (see DigestOutputStream.on(boolean) on ).

DomainCombiner.javaInterface A DomainCombiner provides a means to dynamically update the ProtectionDomains associated with the current AccessControlContext.

A DomainCombiner is passed as a parameter to the appropriate constructor for AccessControlContext. The newly constructed context is then passed to the AccessController.doPrivileged(..., context) method to bind the provided context (and associated DomainCombiner) with the current execution Thread.

GeneralSecurityException.javaClass The GeneralSecurityException class is a generic security exception class that provides type safety for all the security-related exception classes that extend from it.
Guard.javaInterface

This interface represents a guard, which is an object that is used to protect access to another object.

This interface contains a single method, checkGuard, with a single object argument.

GuardedObject.javaClass A GuardedObject is an object that is used to protect access to another object.

A GuardedObject encapsulates a target object and a Guard object, such that access to the target object is possible only if the Guard object allows it. Once an object is encapsulated by a GuardedObject, access to that object is controlled by the getObject method, which invokes the checkGuard method on the Guard object that is guarding access.

Identity.javaClass

This class represents identities: real-world objects such as people, companies or organizations whose identities can be authenticated using their public keys.

IdentityScope.javaClass

This class represents a scope for identities.

InvalidAlgorithmParameterException.javaClass This is the exception for invalid or inappropriate algorithm parameters.
InvalidKeyException.javaClass This is the exception for invalid Keys (invalid encoding, wrong length, uninitialized, etc).
InvalidParameterException.javaClass This exception, designed for use by the JCA/JCE engine classes, is thrown when an invalid parameter is passed to a method.
Key.javaInterface The Key interface is the top-level interface for all keys.
KeyException.javaClass This is the basic key exception.
KeyFactory.javaClass Key factories are used to convert keys (opaque cryptographic keys of type Key) into key specifications (transparent representations of the underlying key material), and vice versa.

Key factories are bi-directional.

KeyFactorySpi.javaClass This class defines the Service Provider Interface (SPI) for the KeyFactory class. All the abstract methods in this class must be implemented by each cryptographic service provider who wishes to supply the implementation of a key factory for a particular algorithm.

Key factories are used to convert keys (opaque cryptographic keys of type Key) into key specifications (transparent representations of the underlying key material), and vice versa.

Key factories are bi-directional.

KeyManagementException.javaClass This is the general key management exception for all operations dealing with key management.
KeyPair.javaClass This class is a simple holder for a key pair (a public key and a private key).
KeyPairGenerator.javaClass The KeyPairGenerator class is used to generate pairs of public and private keys.
KeyPairGeneratorSpi.javaClass

This class defines the Service Provider Interface (SPI) for the KeyPairGenerator class, which is used to generate pairs of public and private keys.

KeyRep.javaClass Standardized representation for serialized Key objects.

Note that a serialized Key may contain sensitive information which should not be exposed in untrusted environments.

KeyStore.javaClass This class represents a storage facility for cryptographic keys and certificates.

A KeyStore manages different types of entries. Each type of entry implements the KeyStore.Entry interface. Three basic KeyStore.Entry implementations are provided:

  • KeyStore.PrivateKeyEntry

    This type of entry holds a cryptographic PrivateKey, which is optionally stored in a protected format to prevent unauthorized access.

KeyStoreException.javaClass This is the generic KeyStore exception.
KeyStoreSpi.javaClass This class defines the Service Provider Interface (SPI) for the KeyStore class.
MessageDigest.javaClass This MessageDigest class provides applications the functionality of a message digest algorithm, such as MD5 or SHA. Message digests are secure one-way hash functions that take arbitrary-sized data and output a fixed-length hash value.

A MessageDigest object starts out initialized.

MessageDigestSpi.javaClass This class defines the Service Provider Interface (SPI) for the MessageDigest class, which provides the functionality of a message digest algorithm, such as MD5 or SHA.
NoSuchAlgorithmException.javaClass This exception is thrown when a particular cryptographic algorithm is requested but is not available in the environment.
NoSuchProviderException.javaClass This exception is thrown when a particular security provider is requested but is not available in the environment.
Permission.javaClass Abstract class for representing access to a system resource. All permissions have a name (whose interpretation depends on the subclass), as well as abstract functions for defining the semantics of the particular Permission subclass.
PermissionCollection.javaClass Abstract class representing a collection of Permission objects.

With a PermissionCollection, you can:

  • add a permission to the collection using the add method.
  • check to see if a particular permission is implied in the collection, using the implies method.
  • enumerate all the permissions, using the elements method.

When it is desirable to group together a number of Permission objects of the same type, the newPermissionCollection method on that particular type of Permission object should first be called.

Permissions.javaClass This class represents a heterogeneous collection of Permissions.
Policy.javaClass A Policy object is responsible for determining whether code executing in the Java runtime environment has permission to perform a security-sensitive operation.

There is only one Policy object installed in the runtime at any given time.

PolicySpi.javaClass This class defines the Service Provider Interface (SPI) for the Policy class. All the abstract methods in this class must be implemented by each service provider who wishes to supply a Policy implementation.

Subclass implementations of this abstract class must provide a public constructor that takes a Policy.Parameters object as an input parameter.

Principal.javaInterface This interface represents the abstract notion of a principal, which can be used to represent any entity, such as an individual, a corporation, and a login id.
PrivateKey.javaInterface

A private key.

PrivilegedAction.javaInterface A computation to be performed with privileges enabled.
PrivilegedActionException.javaClass This exception is thrown by doPrivileged(PrivilegedExceptionAction) and doPrivileged(PrivilegedExceptionAction, AccessControlContext context) to indicate that the action being performed threw a checked exception.
PrivilegedExceptionAction.javaInterface A computation to be performed with privileges enabled, that throws one or more checked exceptions.
ProtectionDomain.javaClass

This ProtectionDomain class encapsulates the characteristics of a domain, which encloses a set of classes whose instances are granted a set of permissions when being executed on behalf of a given set of Principals.

A static set of permissions can be bound to a ProtectionDomain when it is constructed; such permissions are granted to the domain regardless of the Policy in force.

Provider.javaClass This class represents a "provider" for the Java Security API, where a provider implements some or all parts of Java Security.
ProviderException.javaClass A runtime exception for Provider exceptions (such as misconfiguration errors or unrecoverable internal errors), which may be subclassed by Providers to throw specialized, provider-specific runtime errors.
PublicKey.javaInterface

A public key.

SecureClassLoader.javaClass This class extends ClassLoader with additional support for defining classes with an associated code source and permissions which are retrieved by the system policy by default.
SecureRandom.javaClass This class provides a cryptographically strong random number generator (RNG).
SecureRandomSpi.javaClass This class defines the Service Provider Interface (SPI) for the SecureRandom class.
Security.javaClass

This class centralizes all security properties and common security methods.

SecurityPermission.javaClass This class is for security permissions. A SecurityPermission contains a name (also referred to as a "target name") but no actions list; you either have the named permission or you don't.

The target name is the name of a security configuration parameter (see below). Currently the SecurityPermission object is used to guard access to the Policy, Security, Provider, Signer, and Identity objects.

The following table lists all the possible SecurityPermission target names, and for each provides a description of what the permission allows and a discussion of the risks of granting code the permission.

Permission Target Name What the Permission Allows Risks of Allowing this Permission
createAccessControlContext Creation of an AccessControlContext This allows someone to instantiate an AccessControlContext with a DomainCombiner.
Signature.javaClass This Signature class is used to provide applications the functionality of a digital signature algorithm.
SignatureException.javaClass This is the generic Signature exception.
SignatureSpi.javaClass This class defines the Service Provider Interface (SPI) for the Signature class, which is used to provide the functionality of a digital signature algorithm.
SignedObject.javaClass

SignedObject is a class for the purpose of creating authentic runtime objects whose integrity cannot be compromised without being detected.

More specifically, a SignedObject contains another Serializable object, the (to-be-)signed object and its signature.

The signed object is a "deep copy" (in serialized form) of an original object.

Signer.javaClass This class is used to represent an Identity that can also digitally sign data.
Timestamp.javaClass This class encapsulates information about a signed timestamp.
UnrecoverableEntryException.javaClass This exception is thrown if an entry in the keystore cannot be recovered.
UnrecoverableKeyException.javaClass This exception is thrown if a key in the keystore cannot be recovered.
UnresolvedPermission.javaClass The UnresolvedPermission class is used to hold Permissions that were "unresolved" when the Policy was initialized.
UnresolvedPermissionCollection.javaClass A UnresolvedPermissionCollection stores a collection of UnresolvedPermission permissions.
URIParameter.javaClass A parameter that contains a URI pointing to data intended for a PolicySpi or ConfigurationSpi implementation.

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.