Contents Index Returning values from Java via stored procedures Implementing your own security manager

ASA Programming Guide
  Using Java in the Database
    Special features of Java classes in the database

Security management for Java


Java provides security managers than you can use to control user access to security-sensitive features of your applications, such as file access and network access. Adaptive Server Anywhere provides the following support for Java security managers in the database:

The default security manager 

The default security manager is the class com.sybase.asa.jrt.SAGenericSecurityManager. It carries out the following tasks:

  1. It checks the value of the database option JAVA_INPUT_OUTPUT.

  2. It checks whether the database server was started in C2 security mode using the -sc database server option.

  3. If the connection property is OFF, it disallows access to Java file I/O features.

  4. If the database server is running in C2 security mode, it disallows access to java.net packages.

  5. When the security manager prevents a user from accessing a feature, it returns a java.lang.SecurityException.

For more information, see JAVA_INPUT_OUTPUT option [database], and -sc server option.

Controlling Java file I/O using the default security manager 

Java file I/O is controlled through the JAVA_INPUT_OUTPUT database option. By default this option is set to OFF, disallowing file I/O.

To permit file access using the default security manager


Contents Index Returning values from Java via stored procedures Implementing your own security manager