7.5. Red Hat OpenShift Container Platform
当您将默认角色变量设置为 AUTH_LDAP_DEFAULT_ROLE 时,红帽 OpenShift Container Platform 镜像会忽略 LDAP 角色 [RHPAM-4132]
问题:对于 Red Hat OpenShift Container Platform 镜像,当您将 LDAP 默认角色设置为 AUTH_LDAP_DEFAULT_ROLE 时,LDAP 中的所有角色都会被忽略,您无法登录到 Business Central 应用程序。但是,如果您不设置默认角色,则正确使用 LDAP 中的所有角色,您可以登录到 Business Central 应用程序。
在 Red Hat OpenShift Container Platform 4.x 上复制 Operator 的步骤:
创建 KieApp 应用程序并设置默认角色,如下所示:
spec: auth: ldap: ... defaultRole: guest ...- 登录 Business Central。
在 Red Hat OpenShift Container Platform 3.11 上复制模板的步骤:
- 创建模板。
-
将
AUTH_LDAP_DEFAULT_ROLE环境变量设置为AUTH_LDAP_DEFAULT_ROLE = "guest"。 - 登录 Business Central。
Red Hat OpenShift Container Platform 4.x 上的 Operator 临时解决方案:从 KieApp 应用程序中删除 set defaultRole: guest。
Red Hat OpenShift Container Platform 3.11 上的模板临时解决方案: 不要将环境变量设置为 AUTH_LDAP_DEFAULT_ROLE = "guest"。
当包含一个服务器配置的 KieApp 实例从给定 registry 中拉取镜像时,Operator 无法部署服务器,并且您收到错误 [RHPAM-3787]
问题:当使用 operator 在 Red Hat OpenShift Container Platform 上部署 Red Hat Decision Manager 时,您无法通过启用 Set KIE Server Image 选项并为 DockerImage 使用 docker 镜像。要将 docker 镜像用于 KIE 服务器,您必须从自定义 registry 中设置镜像上下文、名称和镜像标签字段。
重现步骤:
- 在 Red Hat OpenShift Container Platform 平台上安装 Operator。
-
使用
DockerImage镜像作为 Kind 值配置一个 KieApp 实例,并提供镜像名称,包括 registry 名称。 - 单击 Set KIE Server 镜像。
-
将 Kind 值改为
DockerImage,然后提供镜像名称,包括 registry 名称,但没有 version 标签
临时解决方案:无。
在使用角色映射 [RHPAM-4146] 时,授权会失败
问题:当您设置 roleMapper 时,授权会失败,且不在 KIELdapSecurityDomain security-domain 中指定。
临时解决方案:
按如下方式创建
workaround.cli脚本:embed-server --std-out=echo --server-config=standalone-openshift.xml batch /subsystem=elytron/security-domain=KIELdapSecurityDomain:write-attribute(name=realms[0].role-mapper, value=kie-custom-role-mapper) run-batch quit-
以
delayedpostconfigure.sh身份创建一个空文件。 创建
postconfigure.sh文件并添加以下内容:echo "trying to execute /opt/eap/bin/jboss-cli.sh --file=/opt/eap/extensions/workaround.cli " /opt/eap/bin/jboss-cli.sh --file=/opt/eap/extensions/workaround.cli echo "END - cli script executed"创建
config-map并添加以下内容:oc create configmap postconfigure \ --from-file=workaround.cli=workaround.cli \ --from-file=delayedpostconfigure.sh=delayedpostconfigure.sh \ --from-file=postconfigure.sh=postconfigure.sh-
要挂载
config-map,请遵循 Operator 方法中所述的步骤。
在 Red Hat JBoss EAP 启动过程中,您将收到日志中的以下信息:
trying to execute /opt/eap/bin/jboss-cli.sh --file=/opt/eap/extensions/workaround.cli
19:15:55,744 INFO [org.jboss.modules] (CLI command executor) JBoss Modules version 1.11.0.Final-redhat-00001
...
The batch executed successfully
process-state: reload-required
19:16:04,757 INFO [org.jboss.as] (MSC service thread 1-1) WFLYSRV0050: JBoss EAP 7.4.1.GA (WildFly Core 15.0.4.Final-redhat-00001) stopped in 18ms
END - cli script executed
安全域也会更新,如下所示:
<security-domain name="KIELdapSecurityDomain" default-realm="KIELdapRealm" permission-mapper="default-permission-mapper">
<realm name="KIELdapRealm" role-decoder="from-roles-attribute" role-mapper="kie-custom-role-mapper"/>
</security-domain>