简体   繁体   English

无法连接到WebSphere MQ 7.1中的队列管理器

[英]Unable to connect to queue manager in WebSphere MQ 7.1

I've installed WebSphere MQ 7.1 on Linux platform, after which I installed WebSphere Message Broker 8.0.0.1. 我在Linux平台上安装了WebSphere MQ 7.1,之后我安装了WebSphere Message Broker 8.0.0.1。 Now when I try to create an execution group, I get an exception: Reason code 2035. This exception states that the user is unauthorised to connect to the queue manager. 现在,当我尝试创建一个执行组时,我得到一个异常:原因代码2035.此异常表明用户未经授权连接到队列管理器。 I have this user added in the mqm group. 我在mqm组中添加了此用户。 I did not face any such issue when I was working with MQ 7.0.x. 当我使用MQ 7.0.x时,我没有遇到任何此类问题。 I searched a lot and came to know that there is user ID blocking in MQ 7.1. 我经常搜索并发现MQ 7.1中存在用户ID阻塞。 But, I want this user to be able to create execution group, how can I do so? 但是,我希望这个用户能够创建执行组,我该怎么办? Please advise. 请指教。

MQ security has been improved a lot in MQ v7.1 and is different from what it used to be in earlier MQ versions. MQ安全性在MQ v7.1中得到了很大改进,并且与早期MQ版本中的安全性不同。 In MQ v7.1, by default all SYSTEM. 在MQ v7.1中,默认为所有SYSTEM。 channels are blocked. 渠道被封锁。 If you are trying to use any of these SYSTEM. 如果您正在尝试使用这些SYSTEM中的任何一个。 channels then you will get 2035 which is MQRC_NOT_AUTHORIZED. 然后你将得到2035,即MQRC_NOT_AUTHORIZED。 The recommended way is to create your own SVRCONN channel for broker and create channel authentication records to allow the user to access queue manager. 建议的方法是为代理创建自己的SVRCONN通道,并创建通道身份验证记录以允许用户访问队列管理器。

Please see this link for detailed answers from T.Rob on similar issue. 有关类似问题,请参阅此链接以获取T.Rob的详细解答。

Update: 更新:

A SVRCONN channel defines the endpoint of a queue manager meaning the connection information required by the clients to connect to a queue manager. SVRCONN通道定义队列管理器的端点,表示客户端连接到队列管理器所需的连接信息。 Client applications use this type of channel to send and receive messages to/from a queue or a topic. 客户端应用程序使用此类型的通道向/从队列或主题发送和接收消息。

Message Broker toolkit is GUI that you can use to administer message broker, for example creating execution groups, creating flow, deploying bar files etc. Toolkit is available on Windows and I guess it's available on Linux. Message Broker工具包是可用于管理消息代理的GUI,例如创建执行组,创建流,部署条形文件等.Windows工具包可在Windows上使用,我想它可以在Linux上使用。

I got to know that MB toolkit requires SYSTEM.BRK.CONFIG channel which is a SVRCONN channel to connect to queue manager. 我知道MB工具包需要SYSTEM.BRK.CONFIG通道,这是一个SVRCONN通道连接到队列管理器。 I am thinking this is the channel you will need to authorize to allow Message Broker to connect to MQ. 我认为这是您需要授权允许Message Broker连接到MQ的通道。 Can you check if this is the case and if so create channel authentication record for that channel? 您能否检查是否是这种情况,如果是,请为该频道创建频道认证记录?

If you create a new QMgr at V7.1 or above, it comes with the following default CHLAUTH rules: 如果您在V7.1或更高版本上创建新的QMgr,它将带有以下默认的CHLAUTH规则:

SET CHLAUTH(SYSTEM.ADMIN.SVRCONN)           TYPE(ADDRESSMAP)
    DESCR(Default rule to allow MQ Explorer access)
    ADDRESS(*) 
    MCAUSER( )                              USERSRC(CHANNEL)

SET CHLAUTH(SYSTEM.*)                       TYPE(ADDRESSMAP)
    DESCR(Default rule to disable all SYSTEM channels)
    ADDRESS(*)
    MCAUSER( )                              USERSRC(NOACCESS)

SET CHLAUTH(*)                              TYPE(BLOCKUSER)
    DESCR(Default rule to disallow privileged users)
    USERLIST(*MQADMIN)

The one on the bottom tells the QMgr "if someone tries to connect over a SVRCONN using an administrative user ID, block the connection in all cases." 底部的那个告诉QMgr“如果有人试图使用管理用户ID通过SVRCONN连接,在所有情况下都阻止连接。”

To allow a connection from Broker Toolkit you have two choices as follows: 要允许来自Broker Toolkit的连接,您有两种选择,如下所示:

  1. Remove mqbrkrs from the mqm group. 从mqm组中删除mqbrkrs。 This allows it to connect without firing the CHLAUTH rule that blocks admin users. 这允许它在不触发阻止管理员用户的CHLAUTH规则的情况下进行连接。 You will of course be required to grant authorization for the mqbrkrs group to all the broker and application queues to which it needs access since it is no longer an MQ admin. 当然,您需要将mqbrkrs组的授权授予它需要访问的所有代理和应用程序队列,因为它不再是MQ管理员。
  2. Override the CHLAUTH rule to allow the broker toolkit to connect as an admin on the SYSTEM.BROKER.CONFIG channel. 重写CHLAUTH规则以允许代理工具包以SYSTEM.BROKER.CONFIG通道的管理员身份进行连接。

As a security specialist, I favor the first option. 作为安全专家,我赞成第一个选择。 It is unavoidable that the MQ admin can administer the broker. MQ管理员可以管理代理是不可避免的。 However it is possible to avoid allowing the broker (and by extension all the broker flows) to administer the QMgr. 但是,可以避免允许代理(以及扩展所有代理流)来管理QMgr。

If, however, you wish to take the second route you'll need to override the CHLAUTH rule that blocks admin access. 但是,如果您希望采用第二条路线,则需要覆盖阻止管理员访问的CHLAUTH规则。 There are several ways to do this. 有几种方法可以做到这一点。 You could delete the rule but that opens all your channels to admin connections. 您可以删除该规则,但会将所有频道打开为管理员连接。 A more precise approach is to provide a rule just for the channel on which the administrator is to connect. 更精确的方法是仅为管理员要连接的通道提供规则。 For example: 例如:

SET CHLAUTH(SYSTEM.BKR.CONFIG) TYPE(BLOCKUSER) +
    USERLIST('*NOACCESS')

Since WMQ applies the most specific rule, the default rule is overridden by the new one but only for the SYSTEM.BKR.CONFIG channel. 由于WMQ应用了最具体的规则,因此默认规则将被新规则覆盖,但仅适用于SYSTEM.BKR.CONFIG通道。 The BLOCKUSER rule syntax allows us to specify who to deny but not who to allow and it takes user IDs rather than group IDs. BLOCKUSER规则语法允许我们指定拒绝的人但不允许允许的人,它使用用户ID而不是组ID。 In order to allow admin access it is necessary to specify some ID that is not *MQADMIN . 为了允许管理员访问,有必要指定一些不是*MQADMIN ID。 I picked *NOACCESS because it cannot be an actual user ID and is a reserved word used by WMQ elsewhere. 我选择了*NOACCESS因为它不能是实际的用户ID,而是WMQ在其他地方使用的保留字。 You could as easily used any user ID such as nobody or even mqm . 您可以轻松使用任何用户ID,例如nobody甚至mqm (Blocking mqm would allow mqbrkrs but not mqm however since mqbrkrs is in the mqm group it would not restrict mqbrkrs from administering the QMgr.) (阻止mqm将允许mqbrkrs但不允许mqm但是因为mqbrkrsmqm组中,所以不会限制mqbrkrs管理QMgr。)

Finally, note that any channel which allows admin access should be strongly authenticated. 最后,请注意,任何允许管理员访问的频道都应进行强身份验证。 If the only CHLAUTH rule you set is the one above, then anybody with a network route to the QMgr can connect on that channel by asserting the mqbrkrs user ID on the connection. 如果您设置的唯一CHLAUTH规则是上面的规则,则任何具有到QMgr的网络路由的人都可以通过断言连接上的mqbrkrs用户ID来连接该通道。 Once connected, they would have full control over the QMgr and the ability to remotely, anonymously execute commands using the mqm or mqbrkrs user IDs. 连接后,他们可以完全控制QMgr,并能够使用mqmmqbrkrs用户ID远程,匿名执行命令。 At the very least add a CHLAUTH rule to filter conenctions on this channel by IP address. 至少添加一个CHLAUTH规则来按IP地址过滤此通道上的连接。 Or, even better, use SSL and filter connections by the certificate distinguished name. 或者,更好的是,使用证书专有名称的SSL和过滤器连接。

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

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