第 56 章 安全管理
安全管理是管理用户、组和权限的过程。您可以从 Business Central Security management 页面控制对 Business Central 资源和功能的访问。
Business Central 为安全管理定义了三种类型的实体:用户、组和角色。您可以为角色和组分配权限。用户从该用户所属的组和角色继承权限。
56.1. 安全管理供应商
在安全管理上下文中,域限制对不同应用资源的访问。realm 包含有关用户、组、角色和权限的信息。特定域的用户和组管理服务实施称为安全管理提供程序。
如果内置安全管理提供商不符合应用程序安全域的要求,您可以构建并注册您自己的安全管理提供程序。
如果没有安装安全管理提供程序,用于管理安全域的用户界面不可用。安装和配置安全管理提供程序后,安全管理用户界面中会自动启用用户和组管理功能。
Business Central 包括 Red Hat JBoss EAP 安全管理提供程序,它根据 application-users.properties 或 application-roles.properties 属性文件的内容支持 realm 类型。
56.1.1. 根据属性文件配置 Red Hat JBoss EAP 安全管理提供程序
您可以构建并注册您自己的 Red Hat JBoss EAP 安全管理提供程序。要根据属性文件使用 Red Hat JBoss EAP 安全管理提供程序,请完成此流程中的步骤。
先决条件
- 安装了 Red Hat JBoss EAP。
流程
要使用 Red Hat JBoss EAP 实例中的现有用户或角色属性文件,请在
EAP_HOME/standalone/configuration/application-users.properties和EAP_HOME/standalone/configuration/application-roles.properties文件中包含以下系统属性,如下例所示:<property name="org.uberfire.ext.security.management.wildfly.properties.realm" value="ApplicationRealm"/> <property name="org.uberfire.ext.security.management.wildfly.properties.users-file-path" value="/standalone/configuration/application-users.properties"/> <property name="org.uberfire.ext.security.management.wildfly.properties.groups-file-path" value="/standalone/configuration/application-roles.properties"/>
下表提供了这些属性的描述和默认值:
表 56.1. Red Hat JBoss EAP 安全管理提供程序基于属性文件
属性 描述 默认值 org.uberfire.ext.security.management.wildfly.properties.realm域的名称。此属性不是强制的。
ApplicationRealmorg.uberfire.ext.security.management.wildfly.properties.users-file-pathusers 属性文件的绝对文件路径。此属性是必需的。
./standalone/configuration/application-users.propertiesorg.uberfire.ext.security.management.wildfly.properties.groups-file-pathgroups 属性文件的绝对文件路径。此属性是必需的。
./standalone/configuration/application-roles.properties在应用程序的根目录中创建
security-management.properties文件。例如,创建以下文件:src/main/resources/security-management.properties
在
security-management.properties文件中输入以下系统属性和安全供应商名称作为值:<property name="org.uberfire.ext.security.management.api.userManagementServices" value="WildflyUserManagementService"/>
56.1.2. 根据属性文件和 CLI 模式配置 Red Hat JBoss EAP 安全管理提供程序
要使用基于属性文件和 CLI 模式的 Red Hat JBoss EAP 安全管理提供程序,请完成以下步骤。
先决条件
- 安装了 Red Hat JBoss EAP。
流程
要使用 Red Hat JBoss EAP 实例中的现有用户或角色属性文件,请在
EAP_HOME/standalone/configuration/application-users.properties和EAP_HOME/standalone/configuration/application-roles.properties文件中包含以下系统属性,如下例所示:<property name="org.uberfire.ext.security.management.wildfly.cli.host" value="localhost"/> <property name="org.uberfire.ext.security.management.wildfly.cli.port" value="9990"/> <property name="org.uberfire.ext.security.management.wildfly.cli.user" value="<USERNAME>"/> <property name="org.uberfire.ext.security.management.wildfly.cli.password" value="<USER_PWD>"/> <property name="org.uberfire.ext.security.management.wildfly.cli.realm" value="ApplicationRealm"/>
下表提供了这些属性的描述和默认值:
表 56.2. Red Hat JBoss EAP 安全管理提供程序基于属性文件和 CLI 模式
属性 描述 默认值 org.uberfire.ext.security.management.wildfly.cli.host原生管理接口主机。
localhostorg.uberfire.ext.security.management.wildfly.cli.port原生管理接口端口。
9990org.uberfire.ext.security.management.wildfly.cli.user原生管理界面用户名。
不适用
org.uberfire.ext.security.management.wildfly.cli.password原生管理接口用户的密码。
不适用
org.uberfire.ext.security.management.wildfly.cli.realm应用的安全上下文使用的域。
ApplicationRealm在应用程序的根目录中创建
security-management.properties文件。例如,创建以下文件:src/main/resources/security-management.properties
在
security-management.properties文件中输入以下系统属性和安全供应商名称作为值:<property name="org.uberfire.ext.security.management.api.userManagementServices" value="WildflyCLIUserManagementService"/>