7.5. Red Hat OpenShift Container Platform
デフォルトのロール変数を AUTH_LDAP_DEFAULT_ROLE として設定すると、Red Hat 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 アプリケーションから defaultRole: guest の設定を削除します。
Red Hat OpenShift Container Platform 3.11 のテンプレートでの回避策: 環境変数を AUTH_LDAP_DEFAULT_ROLE = "guest" に設定しないでください。
KieApp インスタンスに、指定したレジストリーからイメージをプルするためのサーバー設定が含まれる場合には 、サーバーのデプロイに失敗してエラーが発生する [RHPAM-3787]
問題: Operator を使用して Red Hat OpenShift Container Platform に Red Hat Decision Manager をデプロイする場合に、Set KIE Server Image オプションを有効にし、Kind の値を DockerImage に設定して、KIE Server の Docker イメージを使用しないでください。KIE Server の Docker イメージを使用するには、カスタムレジストリーからイメージコンテキスト、名前、およびイメージタグフィールドを設定する必要があります。
問題の再現手順:
- Operator を Red Hat OpenShift Container Platform プラットフォームにインストールします。
-
DockerImageイメージを Kind 値として使用して、KieApp インスタンスを 1 つ設定し、レジストリー名などのイメージ名を指定します。 - Set KIE Server image をクリックします。
-
Kind の値を
DockerImageに変更してから、バージョンタグなしに、レジストリー名などのイメージ名を指定します。
回避策: なし。
ロールマッピングの使用中に承認が失敗する [RHPAM-4146]
問題: roleMapper を設定すると認証が失敗し、KIELdapSecurityDomain セキュリティードメインで指定されていません。
回避策:
次のように
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-
delaypostconfigure.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>