SAS/SECURE software provides encryption services to increase the security of transmissions across a network. These encryption services can be used from remote Java clients via the classes that are provided in the sas.rutil.jar file, which is provided with the SAS/SECURE product. The purpose of this document is to describe how to use the SAS/SECURE encrytion services to implement secure connections from the applets, applications, and Web applications that you develop using SAS AppDev Studio.
SAS AppDev Studio provides a Connection component (com.sas.rmi.Connection) that is used to define the network connection between the Java client and the back-end SAS server. The Connection component provides options that support the use of SAS/SECURE software to encrypt the data as it is transferred across the network. These options can be accessed from the Encryption tab of the Edit Connection dialog box.

To enable encryption on the connection, select the Use Encryption check box. When the Use Encryption check box is selected, then you can set or edit the following encryption settings:
Once you have specified your encryption settings, you can test your encrypted connection by selecting the Test tab in the Edit Connection dialog box and using the available diagnostics.
To provide for enhanced deployment of Java applets, SAS AppDev Studio includes a technology called JSASNetCopy that will automatically download and cache the necessary support libraries for use in a Java applet context. Starting with SAS AppDev Studio 3.0, JSASNetCopy is distributed using a Web Application Archive (WAR) file. Due to encryption export restrictions, SAS AppDev Studio and JSASNetCopy do not include support for SAS/SECURE by default. As a result, you have to modify the JSASNetCopy WAR file to include the sas.rutil.jar file if you want to use encrypted connections from Java applets that are deployed using JSASNetCopy.
The JSASNetCopy WAR file (JSASNetCopy.war) is installed in the \Java\JSASNetCopy folder under the SAS AppDev Studio root installation folder. To modify the JSASNetCopy WAR file to include the sas.rutil.jar file, follow these steps:
!sasroot\securwin\sasmisc\ folder. Copy the sas.rutil.jar file to the \Java\SAS\ext folder under the SAS AppDev Studio root installation folder.
Update JSASNetCopy.war. After performing these steps, the JSASNetCopy.war file will include the sas.rutil.jar file. In addition, the configuration file (JSASNetCopyConfig.txt) that is contained in the JSASNetCopy.war file will include a reference to the sas.rutil.jar file so that it is automatically downloaded for any applets that are executed using JSASNetCopy.
Optionally, you can leave the JSASNetCopy.war file unmodified and simply include the sas.rutil.jar file on an applet-by-applet basis. You can do this by deploying the sas.rutil.jar file to your Web server and then, in the same location where the applet HTML is deployed, creating a JSASNetCopyConfig.txt file that refers to the deployed sas.rutil.jar file. The local JSASNetCopy configuration file is used to augment or override information that is provided in the master JSASNetCopy configuration file. So, in the case of SAS/SECURE software, this file only needs to contain information about the sas.rutil.jar file. For details on how to use a local JSASNetCopy configuration file, see the JSASNetCopy Administration Guide.
To support encrypted connections from Java applications, the sas.rutil.jar file must be included in the application classpath. To include the sas.rutil.jar file on the application classpath during development, you must modify the project properties for the application project, as follows:
Project Properties.
In the Project Properties dialog box, select Environment in the tree on the left.
Now, when you start your application project by selecting Build
Execute, the sas.app.class.path is updated to include the sas.rutil.jar file. This enables you to make secure connections from your Java application.
If you want to include the sas.rutil.jar file in the classpath for all the new projects that you create, you can add it to the webAF application options by following these steps:
Options. In the Options window, select Environment in the tree on the left.
Now, for any projects that are subsequently created, the sas.rutil.jar file will be automatically added to the classpath. Note that this change does not impact any already existing projects. You must change any pre-existing projects to include the sas.rutil.jar file using the project options for that project as described above.
To invoke your deployed Java application with support for SAS/SECURE encrypted connections, you must make sure to include the sas.rutil.jar file in the classpath.
You can also use the SAS application launcher (sas.launcher.jar) to invoke your Java application. The following instructions for using the sas.rutil.jar file with the SAS application launcher assume the following:
\Java\SAS\ext
folder have been deployed to the c:\sas\java\ext folder.\webAF\bootlib
folder has been deployed to the c:\sas\java\bootlib folder.c:\myapp.c:\jre1.4.1.Based upon the above assumptions, to enable your application to use an encrypted connection via SAS/SECURE, you need to copy the sas.rutil.jar file to the folder where you have deployed the other SAS extension JAR files (c:\sas\java\ext), and then invoke the application using the SAS application launcher as follows (this single-line command has been split to make it easier to read):
c:\jre1.4.1\bin\java.exe -Dsas.app.class.dirs=c:\sas\java\ext;c:\jre1.4.1\lib\ext; -Dsas.app.class.path=c:\myapp -classpath=c:\sas\java\bootlib\sas.launcher.jar myapp <application-parameters>
The benefit of using the SAS application launcher is that it prevents your Java application from being impacted by a potential classloader deadlock situation that can exist in J2SE 1.4.
To support encrypted connections from web applications, you only need to copy sas.rutil.jar to your Web application's WEB-INF\lib folder. It can then be packaged into the Web application's WAR file using the webAF Package Wizard.