WAS 上的 JAAS 的 URLCallback?

发布于 2024-08-28 08:47:24 字数 455 浏览 5 评论 0原文

我扩展了 JAAS javax.security.auth.spi.LoginModule,并将其安装到 WAS 服务器中。有用;所有登录都会通过这个新类中的代码,如果它说不允许他们登录,他们就会被阻止登录。

根本问题:我不希望它过滤管理控制台的登录(/ibm/控制台),但我确实希望它过滤服务器上其他内容的登录。我认为通过可用的设置,登录模块适用于服务器上安装的所有内容,包括管理屏幕。

我想通过获取触发 LoginModule 调用的页面的 URL 来解决这个问题。如果我使用 WebLogic,我会使用 URLCallback 来获取 URL。有谁知道Websphere Application Server 是否有任何并行功能,或者是否有其他解决方法?

作为潜在有用的附加信息,我无法将 JAAS 应用于服务器上的各个应用程序;部署描述符在管理控制台中呈灰色显示。我只能将新的 JAAS JAR 模块应用到整个服务器,这对我来说是一个问题。

I extended the JAAS javax.security.auth.spi.LoginModule, and installed it into a WAS server. It works; all logins go through the code in this new class, and if it says to not let them login, they're prevented from logging in.

The root problem: I don't want it to filter logins for the admin console (/ibm/console), but I do want it to filter logins for other things on the server. I think that with the available setup, the login module applies to everything installed on the server, including the administration screens.

I'd like to solve that by getting the URL of the page that triggered the call to the LoginModule. If I were using WebLogic, I'd use a URLCallback to get the URL. Does anyone know if Websphere Application Server has any parallel functionality to that, or if there's another workaround?

As the potentially useful added information, I can't apply JAAS to individual apps on the server; the deployment descriptors are greyed-out in the admin console. I can only apply new JAAS JAR modules to the entire server, which is a problem for me.

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

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

发布评论

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

评论(1

征棹 2024-09-04 08:47:24

Weblogic 通过 weblogic.security.auth.callback.URLCallback 完成此操作,WAS 通过 WSServletRequestCallback 完成此操作。

callbacks[0] = new com.ibm.wsspi.security.auth.callback.WSServletRequestCallback(
                "HttpServletRequest: ");

(加载回调)

HttpServletRequest request = ((WSServletRequestCallback)callbacks[3]).getHttpServletRequest();
String contextPath = request.getContextPath();

从那里开始。

Weblogic does it with weblogic.security.auth.callback.URLCallback, WAS does it through WSServletRequestCallback.

callbacks[0] = new com.ibm.wsspi.security.auth.callback.WSServletRequestCallback(
                "HttpServletRequest: ");

(load callbacks)

HttpServletRequest request = ((WSServletRequestCallback)callbacks[3]).getHttpServletRequest();
String contextPath = request.getContextPath();

Go from there.

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