10.7.8. 为管理接口配置安全区
管理接口使用安全区来控制验证和对 JBoss EAP 6 的配置机制的访问。本主题展示了如何阅读和配置安全区。这些命令使用了管理 CLI。
读取安全区的配置
这个例子展示了 ManagementRealm
安全区的默认配置。它使用了一个名为 mgmt-users.properties
的文件来保存其配置信息。
例 10.17. 默认的 ManagementRealm
编写安全区
下面的命令创建了一个名为 TestRealm
的安全区并为相关的配置文件设置了目录。
例 10.18. 编写安全区
/host=master/core-service=management/security-realm=TestRealm/:add/host=master/core-service=management/security-realm=TestRealm/authentication=properties/:add(path=TestUsers.properties, relative-to=jboss.domain.config.dir)
/host=master/core-service=management/security-realm=TestRealm/:add/host=master/core-service=management/security-realm=TestRealm/authentication=properties/:add(path=TestUsers.properties, relative-to=jboss.domain.config.dir)
应用安全区到管理接口里
添加了安全区后,将其名称作为引用提供给管理接口。
例 10.19. 在管理接口里添加一个安全区
/host=master/core-service=management/management-interface=http-interface/:write-attribute(security-realm=TestRealm)
/host=master/core-service=management/management-interface=http-interface/:write-attribute(security-realm=TestRealm)