【发布时间】:2017-02-21 16:46:25
【问题描述】:
我是IBM WebSphere MQ 的新手。我在docker 容器中运行它。用户“sampleuser”和“root”是容器内“mqm”组的一部分。我能够以“root”用户和“sampleuser”的身份从主机访问 MQ(我也在主机中创建了“sampleuser”)。
我想启用匿名身份验证,这样无论客户端用户 ID 是什么,他们都应该能够访问 MQ。我虽然MCAUSER('sampleuser') 会为我做这件事。但它不起作用。我从 eclipse IBM 资源管理器中收到错误 AMQ4036(未授权)。请指教。
ALTER QMGR PSNPRES(SAFE)
ALTER QMGR PSMODE (ENABLED)
DEFINE CHANNEL(SYSTEM.ADMIN.SVRCONN) CHLTYPE(SVRCONN) MCAUSER('sampleuser') REPLACE
更新 #1 我更新了代码以允许特权用户。但还是失败了。
ALTER QMGR PSNPRES(SAFE)
ALTER QMGR PSMODE (ENABLED)
SET CHLAUTH(*) TYPE(BLOCKUSER) USERLIST('*NOACCESS')
DEFINE CHANNEL(SYSTEM.ADMIN.SVRCONN) CHLTYPE(SVRCONN) MCAUSER('sampleuser') REPLACE
这是我得到的日志。
EXPLANATION:
The user ID 'sampleuser' and its password were checked because the user ID is
privileged and the queue manager connection authority (CONNAUTH) configuration
refers to an authentication information (AUTHINFO) object named
'SYSTEM.DEFAULT.AUTHINFO.IDPWOS' with CHCKCLNT(REQDADM).
This message accompanies a previous error to clarify the reason for the user ID
and password check.
ACTION:
Refer to the previous error for more information.
Ensure that a password is specified by the client application and that the
password is correct for the user ID. The authentication configuration of the
queue manager connection determines the user ID repository. For example, the
local operating system user database or an LDAP server.
To avoid the authentication check, you can either use an unprivileged user ID
or amend the authentication configuration of the queue manager. You can amend
the CHCKCLNT attribute in the CHLAUTH record, but you should generally not
allow unauthenticated remote access.
更新 #2 基于 JohnMC 的回答和对 Provide anonymous access to IBM WebSphere MQ 的引用,我终于成功了.. :)
ALTER QMGR PSNPRES(SAFE)
ALTER QMGR PSMODE (ENABLED)
ALTER QMGR CHLAUTH(DISABLED)
SET CHLAUTH(*) TYPE(BLOCKUSER) USERLIST('*NOACCESS')
DEFINE CHANNEL(SYSTEM.ADMIN.SVRCONN) CHLTYPE(SVRCONN) MCAUSER('sampleuser') REPLACE
ALTER AUTHINFO(SYSTEM.DEFAULT.AUTHINFO.IDPWOS) AUTHTYPE(IDPWOS) CHCKCLNT(OPTIONAL)
REFRESH SECURITY TYPE(CONNAUTH)
【问题讨论】:
-
我建议检查队列管理器错误日志以找出失败的原因。
-
如果您查看队列管理器错误日志,它将准确地告诉您失败的原因,无论是“通道身份验证阻止您”、“未知用户”还是“用户没有具有正确的权限”,或者“当队列管理器配置为期望密码时,用户没有提供密码”等等。正如您所看到的,原因有很多,因此错误日志对帮助您很重要。
-
我已经添加了日志。
-
更新中的
ALTER QMGR CHLAUTH(DISABLED)和SET CHLAUTH(*)是互斥的。禁用CHLAUTH或设置CHLAUTH规则,不能同时设置。 (提示:不要不要禁用CHLAUTH!) -
另外,如果您启用了密码验证,请参阅MQ Password/CHLAUTH research – Exec Summary 和后面的两个帖子。它已经严重损坏,至少要等到下一个 Fix Pack 左右才能修复,如果确实如此的话。
标签: ibm-mq