Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/security/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/neo4j/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Security 使用自定义JAAS访问Jolokia_Security_Jaas_Activemq Artemis - Fatal编程技术网

Security 使用自定义JAAS访问Jolokia

Security 使用自定义JAAS访问Jolokia,security,jaas,activemq-artemis,Security,Jaas,Activemq Artemis,在ActiveMQ Artemis中,当我对自定义JAAS登录模块使用必需或必需标志时,我无法登录到Artemis管理控制台Jolokia端口8163。我在自定义JAAS登录模块中有特殊的业务逻辑,该模块对移动设备进行身份验证。但同时,我希望有一个管理员用户可以登录到阿尔特米斯管理控制台与一些用户名/密码,甚至没有密码。为了在Artemis login.config中同时包含自定义和来宾登录模块,我必须至少保持自定义JAAS模块的安全标志足够。如何处理这种情况?Hawtio使用的安全域通过etc

在ActiveMQ Artemis中,当我对自定义JAAS登录模块使用必需或必需标志时,我无法登录到Artemis管理控制台Jolokia端口8163。我在自定义JAAS登录模块中有特殊的业务逻辑,该模块对移动设备进行身份验证。但同时,我希望有一个管理员用户可以登录到阿尔特米斯管理控制台与一些用户名/密码,甚至没有密码。为了在Artemis login.config中同时包含自定义和来宾登录模块,我必须至少保持自定义JAAS模块的安全标志足够。如何处理这种情况?

Hawtio使用的安全域通过etc/artemis.profile中设置的Hawtio.realm系统属性进行配置。例如,以下是默认设置:

JAVA_ARGS=" -XX:+PrintClassHistogram -XX:+UseG1GC -Xms512M -Xmx2G -Dhawtio.realm=activemq  -Dhawtio.offline=true -Dhawtio.role=amq -Dhawtio.rolePrincipalClasses=org.apache.activemq.artemis.spi.core.security.jaas.RolePrincipal -Djolokia.policyLocation=${ARTEMIS_INSTANCE_ETC_URI}jolokia-access.xml -Djon.id=amq"
此处hawtio.realm设置为activemq,与默认login.config中的条目匹配,例如:

我看不出你为什么不能在login.config中添加专门针对Hawtio的新领域/域,然后更改artemis.profile中的配置以引用它。这样,您就可以自定义Hawtio连接和消息传递连接的安全性


另外,值得注意的是,Artemis最近增加了对每接受方安全域的支持。您可以在中阅读更多关于此的信息。

非常感谢Justin。我缺少领域设置,这是可行的。
activemq {
   org.apache.activemq.artemis.spi.core.security.jaas.PropertiesLoginModule sufficient
       debug=false
       reload=true
       org.apache.activemq.jaas.properties.user="artemis-users.properties"
       org.apache.activemq.jaas.properties.role="artemis-roles.properties";

   org.apache.activemq.artemis.spi.core.security.jaas.GuestLoginModule sufficient
       debug=false
       org.apache.activemq.jaas.guest.user="myUser"
       org.apache.activemq.jaas.guest.role="amq";
};