LDAP または Active Directory による認証

Spectrum™ Technology Platform は、LDAP または Active Directory サーバーを認証に使うために設定できます。

ユーザが Spectrum™ Technology Platform にログインすると、LDAP または Active Directory を使ってユーザの資格情報が検証されます。その後で、同じ名前の Spectrum™ Technology Platform ユーザが存在するかどうかがシステムで確認されます。存在する場合は、ユーザがログインされます。存在しない場合は、そのユーザの Spectrum™ Technology Platform ユーザ アカウントが自動的に作成され、役割 user が付与されます。

次の図に認証プロセスを示します。



ディレクトリ サービスを使用して認証するように Spectrum™ Technology Platform を設定する前に、お使いのディレクトリ サービスが以下の要件を満たすことを確認してください。

  • LDAP の場合、ディレクトリ サーバーは、LDAP バージョン 3 に準拠する必要があります。
  • Active Directory サーバーに固有の要件はありません。
注: この処理手順の説明については、Pitney Bowes テクニカル サポートまたはプロフェッショナル サービスにお問い合わせいただくことを推奨します。
注: spectrum.security.account.createNonExisting=true を指定すると、Spectrum では、ユーザが最初にログインした際に、Active Directory ユーザが作成されます。そのプロパティに false を設定すると、Spectrum では、Spectrum™ Technology Platform 管理者がユーザを追加しない限り、こうしたユーザを認証できません。
  1. Management Console で設定した既存のユーザが存在し、LDAP 認証または Active Directory 認証を有効にした後で、それらのユーザを使用する場合は、LDAP システムまたは Active Directory システムにそれらのユーザを作成します。Spectrum™ Technology Platform と同じユーザ名を使うようにしてください。
    注: LDAP または Active Directory で "admin" ユーザを作成する必要はありません。このユーザは、LDAP または Active Directory を有効にした後も引き続き、認証に Spectrum™ Technology Platform を使用します。
  2. Spectrum™ Technology Platform サーバーを停止します。
  3. LDAP または Active Directory の認証を有効にします。
    1. この設定ファイルをテキスト エディターに開きます。
      server\conf\spectrum-container.properties
    2. プロパティ spectrum.security.authentication.basic.authenticator を LDAP に設定します。
      spectrum.security.authentication.basic.authenticator=LDAP LDAP を設定すると、LDAP だけでなく Active Directory も有効になります。
    3. ファイルを保存して閉じます。
  4. 接続プロパティの設定:
    1. この設定ファイルをテキスト エディターに開きます。
      server\conf\spring\security\spectrum-config-ldap.properties
    2. 次のプロパティを変更します。
      spectrum.ldap.url
      LDAP サーバまたは Active Directory サーバの URL (ポートを含む)。例: spectrum.ldap.url=ldap://ldapserver.example.com:389/
      spectrum.ldap.dn.format
      LDAP または Active Directory のユーザ アカウントを検索するための書式です。ユーザ名には変数 %s を使用します。例を次に示します。
      LDAP:
      spectrum.ldap.dn.format=uid=%s,ou=users,dc=example,dc=com
      Active Directory:
      spectrum.ldap.dn.format=%s@example.com
      複数ドメイン:
      ドメイン名は単一引用符で囲み、各ドメイン値はカンマで区切ります。この方法は、単一ドメインの設定には適用されません。例:
      spectrum.ldap.dn.format='CN=%s,CN=Users,dc=spectest,dc=pvt',
      'CN=%s,ou=Services,dc=spectest,dc=pvt','CN=%s,ou=managers,dc=spectest,dc=pvt'
      spectrum.ldap.dn.base
      LDAP または Active Directory のユーザ アカウントを検索するための識別名 (dn)。例を次に示します。
      LDAP:
      spectrum.ldap.dn.base=ou=users,dc=example,dc=com
      Active Directory:
      spectrum.ldap.dn.base=cn=Users,dc=example,dc=com
      spectrum.ldap.search.filter
      役割などの属性の検索に使用される検索フィルタ。検索フィルタには以下の変数を含めることができます。
      • {user} : Spectrum™ Technology Platform にログインしているユーザ名
      • {dn}spectrum.ldap.dn.base で指定された識別名です。
      LDAP の場合の例:
      spectrum.ldap.search.filter=uid={user}
      Active Directory の場合の例:
      spectrum.ldap.search.filter=userPrincipalName={dn}
      spectrum.ldap.attribute.roles
      これはオプションです。ユーザの Spectrum™ Technology Platform 役割の名前が含まれる LDAP 属性または Active Directory 属性を指定します。LDAP 属性または Active Directory 属性で指定する役割名は、Spectrum™ Technology Platform で定義されている役割の名前と一致する必要があります。
      この属性に designerという名前の役割が含まれる場合、designer 役割がユーザに付与されます。
      指定できる属性は 1 つだけですが、属性に複数の役割が含まれることがあります。属性内の複数の役割を指定するには、それぞれの属性をカンマで区切ります。属性の各インスタンスに異なる役割が含まれる、複数値の属性を指定することもできます。この 1 つの属性で指定されている役割だけが Spectrum™ Technology Platform で使用されます。それ以外の LDAP 属性または Active Directory 属性は Spectrum™ Technology Platform の役割に影響を与えません。
      Spectrum™ Technology Platform でユーザに役割が割り当てられている場合、ユーザの権限は、LDAP または Active Directory から付与される権限と Spectrum™ Technology Platform からの権限を結合したものになります。
      例えば、属性 spectrumroles で定義されている役割を適用するには、次のように指定します。
      spectrum.ldap.attribute.roles=spectrumroles
      注: 初めてログインするユーザが Spectrum™ Technology Platform ユーザ アカウントを持っていない場合は、アカウントが自動的に作成され、役割 user が付与されます。このユーザの有効な権限は、user の役割と、spectrum.ldap.attribute.roles プロパティの属性リストで指定された役割に付与された権限の組み合わせです。
      注: Management Console でユーザの役割を表示した場合、spectrum.ldap.attribute.roles プロパティでユーザに割り当てられた役割は表示されません。
      spectrum.ldap.pool.min
      LDAP サーバーまたは Active Directory サーバーに接続するための接続プールの最小サイズ。
      spectrum.ldap.pool.max
      LDAP サーバーまたは Active Directory サーバーに同時に接続できる接続の最大数。
      spectrum.ldap.timeout.connect
      LDAP サーバーまたは Active Directory サーバーへの接続が確立されるまで待機する時間 (ミリ秒)。デフォルトでは、1000 ミリ秒に設定されます。
      spectrum.ldap.timeout.response
      接続が確立された後で、LDAP サーバーまたは Active Directory サーバーからの応答を待機する時間 (ミリ秒)。デフォルトでは、5000 ミリ秒に設定されます。
      spectrum.ldap.retry.count
      The number of times the Spectrum™ Technology Platform server will try connecting to the LDAP or Active Directory server if the initial connection attempt fails. Set this to 0 if you want to allow only one connection attempt.
      ヒント: If you cluster your LDAP or Active Directory servers, we recommend that you set this value to 1 or more to allow the LDAP or Active Directory load balancer to redirect the connection request to a different server if the one that is initially tried is unavailable.
      spectrum.ldap.retry.wait
      接続試行から次の接続試行までの待ち時間 (ミリ秒)。
      spectrum.ldap.retry.backoff
      再試行が失敗するたびに待ち時間を増やすために使う乗算計数。例を次に示します。
      spectrum.ldap.timeout.connect=1000 ...
      spectrum.ldap.retry.count=5
      spectrum.ldap.retry.wait=500
      spectrum.ldap.backoff=2
      この例では、最初の接続試行時の待ち時間は 1,000 ミリ秒で、5 回の再試行のたびに待ち時間が 2 倍ずつ増えるので、再試行ごとの待ち時間は次のようになります。
      Retry attempt 1: 500 milliseconds
      Retry attempt 2: 1,000 milliseconds
      Retry attempt 3: 2,000 milliseconds
      Retry attempt 4: 4,000 milliseconds
      Retry attempt 5: 8,000 milliseconds
    3. プロパティ ファイルを保存して閉じます。
  5. Spectrum™ Technology Platform サーバーを開始します。

Spectrum™ Technology Platform をクラスタ内で実行している場合は、クラスタ内の各サーバー上で spectrum-container.properties ファイルと spectrum-config-ldap.properties ファイルを変更する必要があります。ファイルを変更する前にサーバーを停止し、ファイルの変更を終えてからサーバーを起動します。LDAP 属性値を役割にマッピングすると、このマッピングはクラスタ内のすべてのノードに複製されるため、このマッピング操作を JMX コンソールで繰り返す必要はありません。