使用 Applet 获取信任

发布于 2024-10-13 02:50:30 字数 301 浏览 0 评论 0原文

您好,

我最近创建了一个 jar,并使用我创建的密钥库对其进行了签名。

jar 的签名很顺利,但是当我运行小程序时,如果您想运行小程序,它会给出通常的提示,但是,在接受它之后,当小程序尝试连接到 MySQL 数据库(本地运行)时,它会显示再次提示询问您是否要运行此潜在不安全的操作。

有人告诉我,当您签署一个小程序,并且用户单击“是”表示他们想要运行它时,该小程序就会变得受信任吗?但在这种情况下却没有? 我可能被告知了错误的信息。

所以我的问题是,如何防止在操作小程序时弹出这些(相当)烦人的消息?

干杯

Greetings,

I recently created a jar, and signed it with a keystore I created.

The signing of the jar went fine, however when I run the applet, it gives the usual prompt if you want to run the applet or not however, after accepting it, when the applet tries to connect to a MySQL database (ran locally) it prompts yet again asking if you want to run this potentially unsafe operation.

I've been told that when you sign an applet, and the user clicks Yes that they want to run it, that the applet becomes trusted? However in this circumstance it has not?
I may have been told wrong information..

So my question is, how can I keep these (fairly) annoying messages from popping up when operating the applet?

Cheers

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

能否归途做我良人 2024-10-20 02:50:30

如果我没记错的话(十多年前我就这么做了,所以我在这里可能大错特错了),小程序不会变得“受信任”,而是签名提供了一个标识符,然后将用户授予的权限附加到该标识符上。因此,未签名的代码不受信任的原因是因为无法附加权限,但签名的代码在运行后不会变得受信任。

因此,每次安装该警告应该只弹出一次。有一个 API 可以显式请求权限,因此,如果您使用的权限不止于此,您可以一次请求所需的所有权限,但您无法真正避免用户被询问是否要扩展您的小程序的权限。

If I remember correctly (I did that over ten years ago, so I might be horribly wrong here), the applet doesn't become "trusted", but rather, the signature provides an identifier to which privileges granted by the user are then attached. So the reason unsigned code is untrusted is because there is no way to attach the privilege, but signed code does not become trusted the second it is run.

The warning should pop up only once per installation thus. There is an API to explicitly request privileges, so in case you use more than this one, you can ask for all that you require in a single go, but you cannot really avoid the user getting asked whether they want to extend your applet's privileges.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文