简体   繁体   English

WebSphere Application Server 7.0 在连接到 MQ 时忽略 Windows userId

[英]WebSphere Application Server 7.0 ignoring Windows userId when connecting to MQ

Has anyone experienced an issue where WAS does not use the Windows username when connecting to a Websphere MQ resource?在连接到 Websphere MQ 资源时,是否有人遇到过 WAS 不使用 Windows 用户名的问题? None of our developer boxes have ever experienced this problem in the past, they've been able to send the username through for MQ to do authorization.我们的开发者盒子过去都没有遇到过这个问题,他们已经能够发送用户名让 MQ 进行授权。 But we have a new developer machine that does not appear to be sending the username, and thus the connection to MQ can't be made.但是我们有一台新的开发人员机器,它似乎没有发送用户名,因此无法建立到 MQ 的连接。

We tried specifying a J2C authentication alias to the QCF with a DefaultPrincipalMapping, but that didn't work.我们尝试使用 DefaultPrincipalMapping 为 QCF 指定 J2C 身份验证别名,但这不起作用。

SOLUTION: Found out that the problem was that the server was installed and running as a Windows service.解决方案:发现问题在于服务器已安装并作为 Windows 服务运行。 When we created a new server profile which was run by the user and not as a service, it used the Windows username when connecting to MQ.当我们创建一个由用户而不是作为服务运行的新服务器配置文件时,它在连接到 MQ 时使用 Windows 用户名。

I suspect the problem might actually be the opposite of what you are describing.我怀疑这个问题实际上可能与您所描述的相反。 In older versions of WAS if the User ID field of the Connection Factory panel was left blank, WAS would send a blank ID.在旧版本的 WAS 中,如果Connection Factory 面板的 User ID 字段留空,WAS 将发送一个空白 ID。 WebSphere MQ would have no value to pass along to the Object Authority Manager and so the channel would run under authority of the Message Channel Agent's process - which is always administrative. WebSphere MQ 将没有价值传递给 Object 权限管理器,因此该通道将在消息通道代理进程的权限下运行 - 这始终是管理的。 Thus, older versions of WAS commonly ran with administrative rights, although this was not widely recognized as such.因此,旧版本的 WAS 通常以管理权限运行,尽管这并未得到广泛认可。 You can verify this by looking at the status of the running channel and see if the MCAUSER field is blank.您可以通过查看正在运行的通道的状态来验证这一点,并查看 MCAUSER 字段是否为空白。

Newer versions of WAS now try a bit harder to find an ID to send to WMQ if the configuration panel is blank.如果配置面板为空白,较新版本的 WAS 现在会更加努力地查找要发送到 WMQ 的 ID。 Because of this new installations and upgrades of existing installations often fail to authorize to WMQ using the same channel that previously worked.因此,新安装和现有安装的升级通常无法使用以前工作的相同通道授权给 WMQ。

The interesting part of all this is that the only way this is an issue is if the QMgr has a blank value on the MCAUSER channel attribute.所有这一切的有趣部分是,如果 QMgr 在 MCAUSER 通道属性上有一个空白值,这是一个问题的唯一方法。 If the QMgr has a blank MCAUSER and no exit is setting MCAUSER at CONNECT time, then the channel allows administrative access.如果 QMgr 有一个空白的 MCAUSER 并且没有出口在 CONNECT 时间设置 MCAUSER,那么通道允许管理访问。 If the channel does not have SSL with SSLPEER set or an exit to authenticate the connection then that administrative access is available to anonymous users.如果通道没有设置 SSLPEER 的 SSL 或用于验证连接的出口,则匿名用户可以使用该管理访问权限。 Why is this an issue?为什么这是一个问题? Because WebSphere MQ comes with the ability to initiate OS commands based on arrival of a message.因为 WebSphere MQ 具有基于消息到达来启动操作系统命令的能力。 This means that any user with WMQ admin rights can remotely execute arbitrary OS commands as a feature of the software .这意味着任何具有 WMQ 管理员权限的用户都可以远程执行任意操作系统命令作为该软件的一项功能 It follows that this capability MUST be locked down, even from legitimate applications if there is to be any accountability of the messages flowing through the network.因此,如果要对流经网络的消息负责,即使是合法应用程序也必须锁定此功能。

The fact that your app is able to present an ID that succeeds and another ID that fails would seem to indicate that the QMgr is allowing administrative access and, I would wager, doing so for anonymous connections.您的应用程序能够显示一个成功的 ID 和另一个失败的 ID,这一事实似乎表明 QMgr 允许管理访问,我敢打赌,这样做是为了匿名连接。 D'oh.哦。 MUCH better to fix the QMgr's security than to fix the connection problem by setting the "right" ID in WAS, For more on this, see the Hardening WebSphere MQ presentation from the IMPACT conference.修复 QMgr 的安全性比通过在 WAS 中设置“正确的”ID 来修复连接问题要好得多,有关这方面的更多信息,请参阅 IMPACT 会议上的强化 WebSphere MQ演示文稿。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM