Red Hat Training

A Red Hat training course is available for Red Hat JBoss Enterprise Application Platform

第7章 セキュリティードメインがセキュリティーマッピングを使用するように設定

セキュリティードメインにセキュリティーマッピングを追加すると、認証または承認の実行後、情報がアプリケーションに渡される前に認証および承認情報を組み合わせることができます。セキュリティーマッピングの詳細は、Security Mapping section of the Red Hat JBoss Enterprise Application Platform 6 Security Architecture guide を参照してください。

既存のセキュリティードメインにセキュリティーマッピングを追加するには、codetype、および関連するモジュールオプションを設定する必要があります。code フィールドは、セキュリティーマッピングモジュールの短い名前 (SimpleRolesPropertiesRolesDatabaseRoles など) またはクラス名です。type フィールドは、このモジュールが実行するマッピングのタイプを指し、許可される値は principalroleattribute、または credential です。使用可能なセキュリティーマッピングモジュールとそのモジュールオプションの完全なリストについて は、Red Hat JBoss Enterprise Application Platform 6 セキュリティーガイドのセキュリティーマッピングモジュールのセクションを 参照してください。

例: SimpleRoles セキュリティーマッピングを既存のセキュリティードメインに追加する CLI コマンド

/subsystem=security/security-domain=sampleapp/mapping=classic:add

/subsystem=security/security-domain=sampleapp/mapping=classic/mapping-module=SimpleRoles:add( \
code=SimpleRoles, \
type=role, \
module-options=[("user1"=>"specialRole")])
reload

結果の XML

<security-domain name="sampleapp">
  <authentication>
  ...
  </authentication>
  <mapping>
    <mapping-module code="SimpleRoles" type="role">
      <module-option name="user1" value="specialRole"/>
    </mapping-module>
  </mapping>
</security-domain>