使用Java 7更新51的Java Web Start安全性对话框 [英] Java Web Start security dialogs with Java 7 update 51

查看:128
本文介绍了使用Java 7更新51的Java Web Start安全性对话框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我构建了一个使用有效证书签名的Java Web Start应用程序。

I build a Java Web Start application signed with a valid certificate.

当我为应用程序加注星形时,安全对话框会正确显示,如图所示

When I star the application the security dialog appear correctly as show in this figure

http://www.java。 com / en / img / download / trusted_signed.jpg

我的问题是关于不再显示复选框。

My issue is about the "do not show again" checkbox.

如果属性href出现在jnlp文件的jnlp标记中,则会出现复选框。

If the attributes href are present in the jnlp tag of the jnlp file the checkbox appear.

如果该属性不存在,则复选框没有出现,每次都需要确认运行。

If the attribute are not present, the checkbox doesn't appear and the run needs to be confirmed every time.

(例如:
< jnlp spec =1.0+codebase =http: //docs.oracle.com/javase/tutorialJWS/samples/deployment/webstart_ComponentArch_DynamicTreeDemohref =dynamictree_webstart.jnlp>

(Example: < jnlp spec="1.0+" codebase="http://docs.oracle.com/javase/tutorialJWS/samples/deployment/webstart_ComponentArch_DynamicTreeDemo" href="dynamictree_webstart.jnlp">

这是一个问题,因为我的jnlp文件位于受密码保护的目录下,如果指定了href,则说明Java Web Sta rt应用程序尝试将其作为其他资源检索。 (导致拒绝访问,因为只对浏览器会话进行了身份验证并且运行失败)

This is a problem because my jnlp file is under a password protected directory and if href is specified, the Java Web Start application try to retrieve it as the other resources. ( result in access denied because only the browser session is authenticated and the run fails)

部署Java Web Start应用程序时的文档说:

The documentation at Deploying a Java Web Start Application said:

在部署至少在Java SE 6更新版本18或更高版本上运行的Java Web Start应用程序时,codebase和href属性是可选的。在部署将使用以前版本的Java Runtime Environment软件运行的Java Web Start应用程序时,必须指定codebase和href属性。

The codebase and href attributes are optional when deploying Java Web Start applications that will run on at least the Java SE 6 update 18 release or later. You must specify the codebase and href attributes when deploying Java Web Start applications that will run with previous releases of the Java Runtime Environment software.

什么是正确的代码?使用href或不使用?

What is the right code? With href or without?

这是BUG还是功能?

如何显示don 不再显示复选框而不必指定href属性?

How can I show the "don't show again" checkbox without having to specify the href attribute?

推荐答案

经过大量搜索和测试后,我们发现只有这些两种方式的Java Web Start应用程序,使用受信任的第三方证书进行正确签名,将部署在JRE 1.7.0_51&显示预期的安全性对话框(不再显示此...复选框):

After much searching and testing we've found only these two ways for a Java Web Start app, properly signed with a trusted 3rd party cert, to be deployed under JRE 1.7.0_51 & display the expected Security dialog (with "Do not show this again..." check-box):

1)使用启动文件自引用添加href =你在上面描述,例如:

1) Add href= with the launch file self-reference as you describe above, e.g:

jnlp spec="1.0+" codebase="http://some.dn.com/OurAppHome/"  href="launch.jnlp"

对于生成JNLP的网站来说,这不是直截了当的通过,说ASP,或者像你上面提到的其他条件。

Which is not straight forward for sites that generate the JNLP through, say ASP, or under other condtions like you note above.

2)正确的事情:JAR显示它没有显示 Missing Blah-Blah- Blah在控制台日志中显示属性。我们发现的7u51的最小额外清单属性必须存在( * s作为测试值):

2) The proper thing: JAR manifest such that it shows no Missing Blah-Blah-Blah manifest attribute in console log. The minimal additional manifest attributes for 7u51 we've found must be present (*s as test values):

Permissions: all-permissions
Codebase: *
Application-Library-Allowable-Codebase: *

所以我们正在运行的完整构建脚本测试清单看起来像这样(生成版本):

So our working full build script test manifest looks something like this (version is generated):

         <manifest>
             <attribute name="Application-Name" value="Our App Name"/>
             <attribute name="Main-Class" value="com.whatever.main.AppLoader"/>
             <attribute name="Class-Path" value="./Corejar.jar ./Support.jar"/>
             <attribute name="Built-By" value="${user.name}"/>
             <attribute name="Permissions" value="all-permissions"/>
             <attribute name="Codebase" value="*"/>
             <attribute name="Application-Library-Allowable-Codebase" value="*"/>
             <attribute name="Trusted-Only" value="true"/>
             <attribute name="Specification-Title" value="Our App Name"/>
             <attribute name="Specification-Version" value="${version}"/>
             <attribute name="Specification-Vendor" value="Our Company Name"/>
         </manifest>

这篇关于使用Java 7更新51的Java Web Start安全性对话框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆