JDK-8072999 : DRS certificate based rule does not match with Java WS Application compressed by pack200
  • Type: Bug
  • Component: deploy
  • Sub-Component: webstart
  • Affected Version: 7u75,8u31,9
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows
  • Submitted: 2015-02-12
  • Updated: 2015-10-20
  • Resolved: 2015-04-16
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8 JDK 9
8u45Fixed 9 b65Fixed
Description
FULL PRODUCT VERSION :
JDK 9 b57, JDK 8u31 b13, JDK 7u75 b13

ADDITIONAL OS VERSION INFORMATION :
MS Windows 7 OS

A DESCRIPTION OF THE PROBLEM :
Deployment Rule Set (DRS) rule based on "certificate" element does not match Java Web Start (WS) application, when its JAR files are compressed by pack200 tool, and "<property name="jnlp.packEnabled" value="true"/>" property/value pair is specified in JNLP file of the Java WS application.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Upload "TestCase.jar.pack.gz", "DRSBlocksJavaWSAppInPack200Archive.jnlp" files from the attached archive file "DRSBlocksJavaWSAppInPack200Archive.zip" with the test case to the same directory on an accessible web server.
2. Edit "codebase" attribute value in the uploaded JNLP file "DRSBlocksJavaWSAppInPack200Archive.jnlp" to reflect a URL to the directory, where the file was uploaded.
3. Install JRE 9, or JRE 8, or JRE 7 to be tested.
4. Copy "DeploymentRuleSet.jar" file of the test case to the directory "C:\Windows\Sun\Java\Deployment".
5. Import "deploymentruleset.cer" certificate from the test case through "Java Control Panel -> Security -> Manage Certificates... -> Certificate type: Signer CA -> User -> Import".
6. Open Internet Explorer (IE) web browser and load Java WS test case by accessing the uploaded in the point #1 "DRSBlocksJavaWSAppInPack200Archive.jnlp" file. The bug is reproduced, if Java WS application is blocked by DRS.

ERROR MESSAGES/STACK TRACES THAT OCCUR :
Full Java WS logs with the bug reproduced using JRE 9 b57 by means of the test case are available in the attached "Logs.zip" archive file.

---------- Part of Java WS log file containing "java.io.FileNotFoundException" showing a reason of the bug ----------
ruleset: Rule title: null matches artifactId: DRSBlocksJavaWSAppInPack200Archive
network: Cache entry not found [url: http://10.162.81.228/20524201/TestCase.jar, version: null]
network: Cache entry not found [url: http://10.162.81.228/20524201/TestCase.jar, version: null]
network: Connecting http://10.162.81.228/20524201/TestCase.jar with proxy=DIRECT
java.io.FileNotFoundException: http://10.162.81.228/20524201/TestCase.jar
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1831)
        at sun.net.www.protocol.http.HttpURLConnection.access$200(HttpURLConnection.java:91)
        at sun.net.www.protocol.http.HttpURLConnection$9.run(HttpURLConnection.java:1428)
        at sun.net.www.protocol.http.HttpURLConnection$9.run(HttpURLConnection.java:1426)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.AccessController.doPrivileged(AccessController.java:723)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1425)
        at com.sun.deploy.net.HttpUtils.followRedirects(Unknown Source)
        at com.sun.deploy.net.BasicHttpRequest.doRequest(Unknown Source)
        at com.sun.deploy.net.BasicHttpRequest.doGetRequestEX(Unknown Source)
        at com.sun.deploy.net.DownloadEngine.actionDownload(Unknown Source)
        at com.sun.deploy.net.DownloadEngine.downloadResource(Unknown Source)
        at com.sun.deploy.cache.ResourceProviderImpl.getResource(Unknown Source)
        at com.sun.deploy.cache.ResourceProviderImpl.getResource(Unknown Source)
        at com.sun.deploy.ref.CodeRef.getResource(Unknown Source)
        at com.sun.deploy.ref.CodeRef.getCodeSigners(Unknown Source)
        at com.sun.deploy.security.ruleset.RuleId.contains(Unknown Source)
        at com.sun.deploy.security.ruleset.DRSHelper.findRule(Unknown Source)
        at com.sun.deploy.security.ruleset.DeploymentRuleSet.getDRS(Unknown Source)
        at com.sun.deploy.security.ruleset.DeploymentRuleSet.findDRS(Unknown Source)
        at com.sun.javaws.jnl.LaunchDesc.getMainDeploymentRuleSet(Unknown Source)
        at com.sun.javaws.jnl.LaunchDesc.getMatchImpl(Unknown Source)
        at com.sun.javaws.jnl.LaunchDesc.getJREMatcher(Unknown Source)
        at com.sun.javaws.Launcher.prepareLaunchFile(Unknown Source)
        at com.sun.javaws.Launcher.prepareAllResources(Unknown Source)
        at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
        at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
        at com.sun.javaws.Launcher.launch(Unknown Source)
        at com.sun.javaws.Main.launchApp(Unknown Source)
        at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
        at com.sun.javaws.Main.access$000(Unknown Source)
        at com.sun.javaws.Main$1.run(Unknown Source)
        at java.lang.Thread.run(Thread.java:745)
network: Cache entry not found [url: http://10.162.81.228/20524201/TestCase.jar, version: null]
ruleset: Rule hash not matching certificate hash because cannot get certificates from resource:
Comments
The next 2 files were attached to the bug: 1. "DRSBlocksJavaWSAppInPack200Archive.zip" - The test case. 2. "Logs.zip" - The archive file with Java WS logs which demonstrate the bug reproduced with JRE 9 b57.
10-04-2015