Java Resource Protection
You can use the Resource Protection tab to provide encryption-based protection for non-class resource files embedded in Java application JAR files.
Resource protection prevents unauthorized extraction of sensitive files such as configuration files, embedded JARs, property files, images, and other bundled assets. Each selected resource file is encrypted individually during the protection process and is decrypted at runtime only when a valid Sentinel protection key containing the appropriate Feature ID is available.
Java Resource protection provides:
>An additional layer of protection for embedded resource files.
>Encryption of selected non-class files inside a JAR.
>Prevention of unauthorized access to sensitive embedded resources.
>Support for Feature ID controlled access to individual resource files.
>Saving of resource protection configuration in Envelope project files (.prjx).
Using the Resource Protection tab, you can:
>View all embedded resource files in the Java archive.
>Browse resources in a directory tree structure.
>Select resource files for protection.
>Assign Feature IDs to resource files.
NOTE
>Resource protection encrypts only selected non-class files.
>Unprotectable files remain unencrypted and cannot be selected for encryption.
Availability of Resource Protection
The Resource Protection tab is available on the Protection Details page. This tab becomes active only when the input JAR file contains at least one protectable resource file. By default, no resource files are selected for protection.
Resource Files Available for Protection
The Resource Protection tab displays a directory tree that contains:
>Folders representing resource directories
>Protectable resource files
>Unprotectable resource files
Unprotectable resource files (for example, META-INF/MANIFEST.MF) appear greyed out and cannot be selected for protection.
Selecting Resource Files for Protection
You can protect individual resource files or multiple files simultaneously:
To protect a resource file:
>Select the check box next to a resource file to protect it individually and assign a Feature ID if required. By default, the Global Feature ID is assigned to all resource files.
>To protect multiple files in a package, select or clear the check box for the package in the hierarchy. You can also select multiple individual files by selecting multiple rows.
Assigning Feature ID
By default, protected resource files use the global Feature ID listed at the top of the General tab. The literal Global is listed in the Feature ID column for each class.
You can assign a Feature ID to the resource files, in addition to the global Feature ID assigned to the java executable. If the item is selected for envelope protection, this Feature is used for encryption and decryption. At run-time, the protected program searches for the assigned Feature ID in the Sentinel protection key.
NOTE
>If your application will be distributed with Sentinel
HL Basic keys, you can use only the default Feature (Feature
ID 0) to protect your application.
> Feature IDs apply only to resource files. You cannot assign Feature IDs to directories. The Feature ID column is disabled for directory entries.
>If a resource file is selected for envelope protection, the assigned Feature ID is used for encryption and decryption.
>You can assign a Feature ID to multiple resource files simultaneously by selecting multiple rows.
Resource Protection Process
When you start the protection process:
>Envelope encrypts each selected resource file individually.
>Status, warning, and error messages for each resource file are displayed in the message window.
Saving and Loading Resource Protection Settings
Envelope saves the following resource protection settings in the project file (.prjx):
>Selected resource files
>Feature ID assignments
>Protection status
When you reload the .prjx file, the Resource Protection tab is restored to the same state that was saved previously.
Command-Line Support
You can protect Java archive resources by using envelope.com together with a .prjx file created in the Envelope GUI.
The command-line tool applies all resource protection settings defined in the .prjx file.
