第2章 管理インターフェイスとアプリケーションのセキュリティー保護
2.1. 管理インターフェイスへの認証および認可の追加 リンクのコピーリンクがクリップボードにコピーされました!
管理インターフェイスに認証と認可を追加し、セキュリティードメインを使用して管理インターフェイスを保護できます。認証と認可を追加した後に管理インターフェイスにアクセスするには、ユーザーはログイン認証情報を入力する必要があります。
以下のように JBoss EAP 管理インターフェイスを保護できます。
管理 CLI
sasl-authentication-factoryの設定による保護。管理コンソール
http-authentication-factoryの設定による保護。
前提条件
- セキュリティーレルムを参照するセキュリティードメインを作成しました。
- JBoss EAP が実行されている。
手順
http-authentication-factoryまたはsasl-authentication-factoryを作成します。http-authentication-factoryを作成します。構文
/subsystem=elytron/http-authentication-factory=<authentication_factory_name>:add(http-server-mechanism-factory=global, security-domain=<security_domain_name>, mechanism-configurations=[{mechanism-name=<mechanism-name>, mechanism-realm-configurations=[{realm-name=<realm_name>}]}])/subsystem=elytron/http-authentication-factory=<authentication_factory_name>:add(http-server-mechanism-factory=global, security-domain=<security_domain_name>, mechanism-configurations=[{mechanism-name=<mechanism-name>, mechanism-realm-configurations=[{realm-name=<realm_name>}]}])Copy to Clipboard Copied! Toggle word wrap Toggle overflow 例
/subsystem=elytron/http-authentication-factory=exampleAuthenticationFactory:add(http-server-mechanism-factory=global, security-domain=exampleSecurityDomain, mechanism-configurations=[{mechanism-name=BASIC, mechanism-realm-configurations=[{realm-name=exampleSecurityRealm}]}]) {"outcome" => "success"}/subsystem=elytron/http-authentication-factory=exampleAuthenticationFactory:add(http-server-mechanism-factory=global, security-domain=exampleSecurityDomain, mechanism-configurations=[{mechanism-name=BASIC, mechanism-realm-configurations=[{realm-name=exampleSecurityRealm}]}]) {"outcome" => "success"}Copy to Clipboard Copied! Toggle word wrap Toggle overflow sasl-authentication-factoryを作成します。構文
/subsystem=elytron/sasl-authentication-factory=<sasl_authentication_factory_name>:add(security-domain=<security_domain>,sasl-server-factory=configured,mechanism-configurations=[{mechanism-name=<mechanism-name>,mechanism-realm-configurations=[{realm-name=<realm_name>}]}])/subsystem=elytron/sasl-authentication-factory=<sasl_authentication_factory_name>:add(security-domain=<security_domain>,sasl-server-factory=configured,mechanism-configurations=[{mechanism-name=<mechanism-name>,mechanism-realm-configurations=[{realm-name=<realm_name>}]}])Copy to Clipboard Copied! Toggle word wrap Toggle overflow 例
/subsystem=elytron/sasl-authentication-factory=exampleSaslAuthenticationFactory:add(security-domain=exampleSecurityDomain,sasl-server-factory=configured,mechanism-configurations=[{mechanism-name=PLAIN,mechanism-realm-configurations=[{realm-name=exampleSecurityRealm}]}]) {"outcome" => "success"}/subsystem=elytron/sasl-authentication-factory=exampleSaslAuthenticationFactory:add(security-domain=exampleSecurityDomain,sasl-server-factory=configured,mechanism-configurations=[{mechanism-name=PLAIN,mechanism-realm-configurations=[{realm-name=exampleSecurityRealm}]}]) {"outcome" => "success"}Copy to Clipboard Copied! Toggle word wrap Toggle overflow
管理インターフェイスを更新します。
http-authentication-factoryを使用して管理コンソールを保護します。構文
/core-service=management/management-interface=http-interface:write-attribute(name=http-authentication-factory, value=<authentication_factory_name>)
/core-service=management/management-interface=http-interface:write-attribute(name=http-authentication-factory, value=<authentication_factory_name>)Copy to Clipboard Copied! Toggle word wrap Toggle overflow 例
Copy to Clipboard Copied! Toggle word wrap Toggle overflow sasl-authentication-factoryを使用して管理 CLI を保護します。構文
/core-service=management/management-interface=http-interface:write-attribute(name=http-upgrade,value={enabled=true,sasl-authentication-factory=<sasl_authentication_factory>})/core-service=management/management-interface=http-interface:write-attribute(name=http-upgrade,value={enabled=true,sasl-authentication-factory=<sasl_authentication_factory>})Copy to Clipboard Copied! Toggle word wrap Toggle overflow 例
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
サーバーをリロードします。
reload
reloadCopy to Clipboard Copied! Toggle word wrap Toggle overflow
検証
管理コンソールに認証と認可が必要であることを確認するには、
http://127.0.0.1:9990/console/index.htmlから管理コンソールに移動します。ユーザー名とパスワードの入力を求められます。
管理 CLI に認証と認可が必要であることを確認するには、次のコマンドを使用して管理 CLI を起動します。
bin/jboss-cli.sh --connect
$ bin/jboss-cli.sh --connectCopy to Clipboard Copied! Toggle word wrap Toggle overflow ユーザー名とパスワードの入力を求められます。