2.7. アプリケーションの認証設定の上書き
JBoss EAP で設定されたアプリケーションの認証設定を上書きできます。これには、undertow サブシステムの application-security-domain セクションにある override-deployment-configuration プロパティーを使用します。
/subsystem=undertow/application-security-domain=exampleApplicationDomain:write-attribute(name=override-deployment-config,value=true)
注記
Configuration → Subsystems → Web (Undertow) → Application Security Domain に移動して、管理コンソールを使用して undertow サブシステムの application-security-domain を設定できます。
たとえば、アプリケーションを jboss-web.xml の exampleApplicationDomain で FORM 認証を使用するように設定します。
jboss-web.xml の例
<login-config> <auth-method>FORM</auth-method> <realm-name>exampleApplicationDomain</realm-name> </login-config>
override-deployment-configuration を有効化すると、BASIC または DIGEST など、異なる認証メカニズムを指定する http-authentication-factory を新たに作成できます。
例: http-authentication-factory
/subsystem=elytron/http-authentication-factory=exampleHttpAuth:read-resource()
{
"outcome" => "success",
"result" => {
"http-server-mechanism-factory" => "global",
"mechanism-configurations" => [{
"mechanism-name" => "BASIC",
"mechanism-realm-configurations" => [{"realm-name" => "exampleApplicationDomain"}]
}],
"security-domain" => "exampleSD"
}
}
この設定では、アプリケーションの jboss-web.xml で定義された認証メカニズムを上書きし、FORM の代わりに BASIC を使用して認証を試行します。