Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This document provides the details of the security configuration elements.ここでは、以下のセキュリティ設定要素の詳細を提供しています。

 

Requirements要件

Reference Framework 2.0 runs against Nexaweb 0はNexaweb Platform 4.5.33 or higher.

Security

An element containing information used to configure reference framework security.

Configurationまたはそれ以上で稼働します。

セキュリティ

Reference Framework Security を設定するために使用される情報を含む要素

設定

 

Code Block
 <security>
         <enabled>true</enabled>
         <loginPage>/XAL/Nexaweb/Login.xal</loginPage>
         <roleValidator>test.TestRoleValidator</roleValidator>
 </security>

<enabled>

The <enabled> tag indicates whether or not security is enabled.

Valid values<enabled> tagはセキュリティが有効になっているかどうかを示します。

有効値 : true | false . The default value is false.
.デフォルト値はfalse

<loginPage>

xal file to use as login page.ログインページとして使用する xal ファイルです。

<roleVoter>

The <roleVoter> tag represents how to validate roles assigned to a UI element (e.g. menus, toolbars, etc.) and component roles against the roles of the logged-in user.

Valid values:

      affirmative – only one assigned role has to match the user roles to be valid

      unanimous – all user roles have to match the assigned roles

The <roleVoter> tag is optional.  The default value is affirmative.

Example:

     For a button:

   <roleVoter> タグは UI 要素(例:メニュー、ツールバー等)、ログインユーザーのロールに対するコンポーネントロールにアサインされるロールの検証方法を示します。

有効値 :

affirmative – 有効にするためには、アサインされているひとつのみユーザーロールと合致しなくてはならない

unanimous – 全てのユーザーロールがアサインされたロールに合致する必要がある

<roleVoter> タグはオプションです。デフォルト値はaffirmative になっています。

例:

ボタン :

<button text="execute" roleVislbe="ROLE_USER;DEPT_ENGINEERING"/>

     with roleVoter="affirmative"

     either ROLE_USER or または DEPT_ENGINEERING must be present in the user roles     with はユーザロールに表示されなくてはならない

roleVoter="unanimous"

     both ROLE_USER or または DEPT_ENGINEERING must be present in the user rolesはユーザロールで表示されなくてはならない

 

<roleValidator>

This tag represents the class name for a custom role validator.

The class specified must implement the RoleValidator Interface.
 

...

This tag contains the mco method to execute to handle the onLoginSucceeded event.

This tag is optional.  The value must resolve to valid mco syntax.
 
The onLoginSucceeded event is fired after the username and password has been validated, and the UserDetails have been set within the security manager. The onLoginSucceeded event is fired before the application interface is loaded and before the onAppStartup event is fired.
 

...

This tag contains the mco method to execute to handle the onLoginFailed event.
This tag is optional.  The value must resolve to valid mco syntax.

The onLoginFailed event is fired after a failed validation of the username and password.

The username of the failed login, is passed to the onLoginFailed event as a parameter named “username”.

The method called to handle the onLoginFailed event, can return a Boolean value to control whether or not to continue with default failed login processing.   Returning a value of false, will prevent the default failed login process from executing.   If the method has not return (i.e void), or returns something other than a Boolean, then the default failed login processing will execute.

 

...

This tag contains the mco method to execute to handle the onLoginSucceeded event.
This tag is optional.  The value must resolve to valid mco syntax.

The onLogout method is fired when processing the logout() method of the SecurityManager.

 

<loginUrl>This tag specifies the URL to use to validate the username and password. The URL will be called using a POST, with the username and password passed as serialized parameters.
This tag is optional if using Spring 3.0 and the default login URL value is このタグはカスタムロールバリデータのクラス名を表しています。
指定されたクラスは RoleValidator インタフェース を実装しなくてはなりません。

<onLoginSucceeded>

このタグは onLoginSucceeded イベントをハンドルするために実行する mco メソッドを含みます。

このタグはオプションです。値は mco 構文を有効にするため命令しなくてはなりません。

onLoginSucceeded イベントは、username と password が有効化された後、発火され、UserDetails はセキュリティマネージャ内で設定されます。アプリケーションインターフェイスがロードされ、onAppStartup イベントが発火される前に onLoginSucceeded event が実行されます。

<onLoginFailed>

このタグは mco メソッドを含み、実行し onLoginFailed イベントをハンドルします。
このタグはオプションです。値は mco 構文を有効にするために命令しなければなりません。

onLoginFailed イベントは、username と passwordの検証失敗後、発火されます。
ログインに失敗した username は、”username” という名のパラメータとして onLoginFailed イベントにパスされます。

onLoginFailed イベントをハンドルするために呼び出されるメソッドは、デフォルトのログイン失敗処理を続行させるかどうかをコントロールするためのブーリアン値を戻します。False値を戻す事は、デフォルトのログイン失敗処理の実行を防ぎます。メソッドが戻らないか(例無効)、またはブーリアン以外の何かを戻します。その後、デフォルトのログイン失敗処理が実行されます。

<onLogout>

このタグは mco メソッドを含み、onLoginSucceeded イベントをハンドルします。
このタグはオプションです。値はmco syntaxを有効化するために命令しなければなりません。

onLogout メソッドは、SecurityManage rの logout() メソッドがプロセスされる際、発火されます。

 

<loginUrl>

このタグは、username と password を検証するために使用する URL を指定します。URL は、直列化されたパラメータとしてパスされる username と password で、POST を使用し呼び出されます。
Spring 3.0 とデフォルトログイン URL 値が "/j_spring_security_check" .の場合、このタグはオプションです。

Note:If uisng  Spring 2.5 , you have to explicitly set the value to be を使用する場合、明確に値を "/j_acegi_security_check" .に設定する必要があります。

 

<logoutUrl>

This tag specifies the URL to use to logout.
The logoutUrl is optional if using Spring 3.0 and the default login URL value is このタグは URL を指定しログアウトするために使用します。
logoutUrl は、Spring3.0 を使用し、ログイン URL 値が "/j_spring_security_logout" .の場合オプションです。

Note: If using Spring 2.5 , you have to explicitly set the value to be を使用する場合、明確に値を "/j_acegi_security_logoutcheck" .に設定する必要があります。