1.10.2. 使用传统核心管理身份验证配置 Slaves 和域控制器之间的密码身份验证
在配置受管域时,默认情况下,主域控制器配置为要求连接该受管域的每个从属控制器进行身份验证。要使用正确的凭证配置从属控制器,您必须执行以下操作:
将用户添加到主域控制器
您需要使用
add-user脚本将用户添加到主域控制器。具体来说,您需要确保用户添加到 master 用于保护其管理界面的同一域中,默认为ManagementRealm。您还需要确保,对于 这个新用户要用于一个 AS 进程连接到另一个 AS 进程,您是否回答"是"?重要添加用户后,该脚本将输出一个 <secret> 元素,该元素将在下一步中使用。您必须保留这个值以便在下一步中使用。
示例:添加从属用户
$ EAP_HOME/bin/add-user.sh What type of user do you wish to add? a) Management User (mgmt-users.properties) b) Application User (application-users.properties) (a): a Enter the details of the new user to add. Using realm 'ManagementRealm' as discovered from the existing property files. Username : slave-user Password recommendations are listed below. To modify these restrictions edit the add-user.properties configuration file. - The password should be different from the username - The password should not be one of the following restricted values {root, admin, administrator} - The password should contain at least 8 characters, 1 alphabetic character(s), 1 digit(s), 1 non-alphanumeric symbol(s) Password : Re-enter Password : What groups do you want this user to belong to? (Please enter a comma separated list, or leave blank for none)[ ]: About to add user 'slave-user' for realm 'ManagementRealm' Is this correct yes/no? yes Added user 'slave-user' to file '/home/user/EAP-7.3.0/standalone/configuration/mgmt-users.properties' Added user 'slave-user' to file '/home/user/EAP-7.3.0/domain/configuration/mgmt-users.properties' Added user 'slave-user' with groups to file '/home/user/EAP-7.3.0/standalone/configuration/mgmt-groups.properties' Added user 'slave-user' with groups to file '/home/user/EAP-7.3.0/domain/configuration/mgmt-groups.properties' Is this new user going to be used for one AS process to connect to another AS process? e.g. for a slave host controller connecting to the master or for a Remoting connection for server to server EJB calls. yes/no? yes To represent the user add the following to the server-identities definition <secret value="ABCzc3dv11Qx" />配置从属控制器以使用凭据。
在主域控制器上创建用户后,您将需要更新每个从属控制器,以便在主机配置文件中使用该凭据,如 host
.xml 或 host-slave.xml。要做到这一点,您需要将用户名添加到域控制器配置中的<remote>元素中。您还需要将 <secret> 添加到用来保护 <remote>元素的域的服务器身份中。在上一步中将用户添加到主域控制器时,用户名和 <secret> 都是获得的。示例:配置从属控制器
... <security-realm name="ManagementRealm"> <server-identities> <!-- Replace this with either a base64 password of your own, or use a vault with a vault expression --> <secret value="ABCzc3dv11Qx"/> </server-identities> ... <domain-controller> <remote security-realm="ManagementRealm" username="slave-user"> <discovery-options> <static-discovery name="primary" protocol="${jboss.domain.master.protocol:remote}" host="${jboss.domain.master.address}" port="${jboss.domain.master.port:9990}"/> </discovery-options> </remote> </domain-controller>