确保 MBean 操作的安全

发布于 2024-07-10 13:04:31 字数 180 浏览 5 评论 0原文

我有一些需要保护的 MBean 操作。 我希望用户需要以服务器管理员身份登录,并且我希望在部署应用程序时以编程方式进行设置,或者最好通过 WAR 中的配置文件进行设置。 我想避免要求管理员将其设置为部署步骤。

我们正在运行 glassfish,但平台中立是首选。 然而,glassfish 特定的配置文件就可以了。

I've got some MBean operations that I need to secure. I would like the users to be required to log in as the server admin and I would like this to be setup programmaticly or, preferably by a config file in the WAR, when the app is deployed. I want to avoid requiring the admin to set this up as a deployment step.

We're running glassfish, but platform neutral is preferred. However, glassfish specific config files would be fine.

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

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

发布评论

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

评论(1

末骤雨初歇 2024-07-17 13:04:31

默认情况下,Sun JDK 允许您通过将凭据放入位于 jar 外部的文件系统中来执行访问控制。 有关详细信息,请参阅管理指南

但是,由于您想从应用程序内部控制事物,因此可以使用 JAAS 将基于文件的配置替换为您自己的配置。 请参阅 com.sun.jmx.remote.security.JMXPluggableAuthenticator 了解详细信息。

您可以通过编程方式注入您自己的 JAAS 提供程序,然后根据您的喜好管理身份验证详细信息。

By default, the Sun JDK allows you to perform access control by putting credentials in the filesystem, which would live outside your jar. See the management guide for details.

However, since you want to control things from within your app, you can use JAAS to replace the file-based configuration with your own. See the java docs on com.sun.jmx.remote.security.JMXPluggableAuthenticator for details.

You could programmatically inject your own JAAS provider, and then manage the authentication details however you like.

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