【问题标题】:Adding a user to Artemis fails向 Artemis 添加用户失败
【发布时间】:2020-12-11 00:47:12
【问题描述】:

在向 ActiveMQ Artemis 添加新用户和角色时需要一些帮助。版本是 2.16。

将 ActiveMQ Artemis 从 2.9.0 和 2.10.1 更新到 2.16 后,我们无法添加新用户。也许已经更新了安全协议或其用法?

我们使用 PropertiesLoginModule。

activemq {
   org.apache.activemq.artemis.spi.core.security.jaas.PropertiesLoginModule requisite
       debug=false
       reload=true
       org.apache.activemq.jaas.properties.user="artemis-users.properties"
       org.apache.activemq.jaas.properties.role="artemis-roles.properties";
};

通常我们这样做是为了添加新用户

./artemis user add --user newUser --password newPassword --role Apps,newUser

但升级到 2.16 后,我们会在 CLI 中收到后续问题:
--user-command-user
--user-command-password

我尝试在这些上添加管理员用户名/密码。但还是一样的异常。

我收到以下安全异常:

Connection failed::AMQ229031: Unable to validate user from /<IPAddress>:48000. Username: newUser; SSL certificate subject DN: unavailable
Exception in thread "main" ActiveMQSecurityException[errorType=SECURITY_EXCEPTION message=AMQ229031: Unable to validate user from /<IPAddress>:48002. Username: newUser; SSL certificate subject DN: unavailable]
        at org.apache.activemq.artemis.core.protocol.core.impl.ChannelImpl.sendBlocking(ChannelImpl.java:540)
        at org.apache.activemq.artemis.core.protocol.core.impl.ChannelImpl.sendBlocking(ChannelImpl.java:434)
        at org.apache.activemq.artemis.core.protocol.core.impl.ActiveMQClientProtocolManager.createSessionContext(ActiveMQClientProtocolManager.java:300)
        at org.apache.activemq.artemis.core.protocol.core.impl.ActiveMQClientProtocolManager.createSessionContext(ActiveMQClientProtocolManager.java:249)
        at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.createSessionChannel(ClientSessionFactoryImpl.java:1401)
        at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.createSessionInternal(ClientSessionFactoryImpl.java:705)
        at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.createSession(ClientSessionFactoryImpl.java:316)
        at org.apache.activemq.artemis.cli.commands.AbstractAction.performCoreManagement(AbstractAction.java:36)
        at org.apache.activemq.artemis.cli.commands.user.AddUser.add(AddUser.java:52)
        at org.apache.activemq.artemis.cli.commands.user.AddUser.execute(AddUser.java:42)
        at org.apache.activemq.artemis.cli.Artemis.internalExecute(Artemis.java:153)
        at org.apache.activemq.artemis.cli.Artemis.execute(Artemis.java:101)
        at org.apache.activemq.artemis.cli.Artemis.execute(Artemis.java:128)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.activemq.artemis.boot.Artemis.execute(Artemis.java:134)
        at org.apache.activemq.artemis.boot.Artemis.main(Artemis.java:50)

关于如何解决这个问题的任何想法?

在手册的安全部分,我找不到任何提示。 https://activemq.apache.org/components/artemis/documentation/latest/security.html

【问题讨论】:

    标签: activemq-artemis


    【解决方案1】:

    由于 ActiveMQ Artemis 2.16 在代理离线并且artemis user 命令的参数发生更改时不再可能使用artemis user 命令,即:./artemis user add --user-command-user guest --user-command-password guest --role admin --user admin --password admin

    --user--password 参数用于连接代理,--user-command-user--user-command-password 参数用于添加新用户。

    您可以在Upgrading from older versions找到更多详细信息

    【讨论】:

    猜你喜欢
    • 2022-10-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-04-29
    • 2021-06-23
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多