Configuring Security Packages

JavaSecurity Master Property File

JavaSecurity has a master property file, called java.security. That file resides in the security properties directory, in java.home/lib/security. Known properties are:

security.provider.n=className

Declares a security provider, and specifies its preference order n. The preference order is the order in which providers are searched for requested algorithms (when no specific provider is requested). The order is 1-based; 1 is the most preferred, followed by 2, and so on.

className must specify the subclass of the Provider class whose constructor sets the values of various properties that are required for the JavaSecurity API to look up the algorithms or other facilities implemented by the provider.

There must be at least one provider specification in java.security. There is a default provider that comes standard with the JDK. It is called the Sun Security Provider, and it is specified in the file via the following:

security.provider.1=sun.security.provider.Sun

system.scope=className

Declares which class to instantiate as the default system scope. For example, the following specifies the IdentityDatabase class from the sun.security.provider package:

system.scope=sun.security.provider.IdentityDatabase

You can view the current JDK 1.1 java.security file.

Registering Providers

To register a provider, you must