子ページ
  • 複数台のLDAPサーバを参照するための方法

このページの古いバージョンを表示しています。現在のバージョンを表示します。

現在のバージョンとの相違点 ページ履歴を表示

« 前のバージョン バージョン 10 次のバージョン »

複数台LDAPサーバ向けのLDAPプロキシサーバを使用する

複数台のLDAPサーバ向けにLDAPプロキシサーバを設置し、IdPにはLDAPプロキシサーバを参照させます。
使用するLDAPプロキシサーバの設定方法について、まとめられた資料があります。資料はCentOS 5系で記載されたものであるため、利用するバージョンに合わせて適宜読み替える必要があります。

プロキシサーバを構築する際、ログイン画面で入力するID(Shibboleth内部ではprincipalと表現されます)について、同一のIDが複数のLDAPツリー上に存在しないことを確認してください。同一のIDが存在する場合には、属性取得で問題が発生します。uidがこの条件を満たさない場合は、メールアドレスや学籍番号・教職員番号等、他のLDAP属性を使うことを検討してください。

IdPの設定ファイルで複数台LDAPサーバを指定する

IdPの設定で複数のLDAPツリー、或いはLDAPサーバを参照する例がShibboleth Wiki:LDAPAuthnConfigurationの"DNResolution"の項にあります。
LDAPサーバが一台のみで複数のLDAPツリーがサブツリーの関係にある環境では、"DNResolution"項の"Single Directory with multiple branches"-"Extensible Matching"のようにidp.authn.LDAP.userFilteridp.authn.LDAP.baseDNidp.authn.LDAP.subtreeSearchの変更で対応が可能です。
LDAPサーバが複数、或いは複数のLDAPツリーがサブツリーとして扱えない環境では、"DNResolution"項の"Multiple Directories"-"Aggregate DN Resolver"、或いは"DNResolution"項の"Single Directory with multiple branches"-"Aggregate DN Resolver"のようにldap-authn-config.xmlでの対応が必要です。
また、上記Shibboleth Wiki:LDAPAuthnConfigurationの例は認証処理のための設定であり、SPへ送出する属性をLDAPから取得する場合は別にattribute-resolver.xmlを変更します。
例の内、ldap-authn-config.xmlを変更するケースでは、以下のようにattribute-resolver.xmlを編集し複数のLDAP DataConnectorを利用するよう変更が必要です。
idp.authn.LDAP.{userFilter,baseDN,subtreeSearch}の変更により対応したケースでは、一つのLDAP DataConnectorでそれらを参照できる為attribute-resolver.xmlの変更は不要です。

/opt/shibboleth-idp/conf/attribute-resolver.xml の設定

    <resolver:DataConnector id="myLDAP" xsi:type="dc:LDAPDirectory"
        ldapURL="%{idp.attribute.resolver.LDAP.ldapURL}"
        baseDN="%{idp.attribute.resolver.LDAP.baseDN1}"
        principal="%{idp.attribute.resolver.LDAP.bindDN}"
        principalCredential="%{idp.attribute.resolver.LDAP.bindDNCredential}"
        noResultIsError="True"  ← 追加
        useStartTLS="%{idp.attribute.resolver.LDAP.useStartTLS:true}">
        <resolver:FailoverDataConnector ref="myLDAP2" />  ← 追加(dcより前に追加する必要があります)
        <dc:FilterTemplate>
            <![CDATA[
                %{idp.attribute.resolver.LDAP.searchFilter}
            ]]>
        </dc:FilterTemplate>
        <dc:StartTLSTrustCredential id="LDAPtoIdPCredential" xsi:type="sec:X509ResourceBacked">
            <sec:Certificate>%{idp.attribute.resolver.LDAP.trustCertificates}</sec:Certificate>
        </dc:StartTLSTrustCredential>
    </resolver:DataConnector>
    <resolver:DataConnector id="myLDAP2" xsi:type="dc:LDAPDirectory"
        ldapURL="%{idp.attribute.resolver.LDAP.ldapURL}"
        baseDN="%{idp.attribute.resolver.LDAP.baseDN2}"
        principal="%{idp.attribute.resolver.LDAP.bindDN}"
        principalCredential="%{idp.attribute.resolver.LDAP.bindDNCredential}"
        noResultIsError="True"
        useStartTLS="%{idp.attribute.resolver.LDAP.useStartTLS:true}">
        <dc:FilterTemplate>
            <![CDATA[
                %{idp.attribute.resolver.LDAP.searchFilter}
            ]]>
        </dc:FilterTemplate>
        <dc:StartTLSTrustCredential id="LDAPtoIdPCredential" xsi:type="sec:X509ResourceBacked">
            <sec:Certificate>%{idp.attribute.resolver.LDAP.trustCertificates}</sec:Certificate>
        </dc:StartTLSTrustCredential>
    </resolver:DataConnector>  ← 追加

DataConnector "myLDAP" にデータが見つからない場合エラーとして扱うようにし、フェイルオーバー処理としてDataConnector "myLDAP2" から改めてデータを検索する設定になります。
ldap-authn-config.xml、attribute-resolver.xmlでLDAPサーバごとに指定したidp.authn.LDAP.baseDN[12]やidp.attribute.resolver.LDAP.baseDN[12]はldap.propertiesで定義を追加してください。

前項と同様、同一のIDが2つのLDAPツリー上に存在すると問題になりますので、uidがこの条件を満たさない場合は他のLDAP属性をID(principal)として使うようにしてください。

  • ラベルがありません