18.2. LDAP 同期の実行

同期設定ファイルを作成後、同期を開始できます。OpenShift Container Platform では、管理者は同じサーバーを使用して多数の異なる同期タイプを実行できます。

18.2.1. LDAP サーバーの OpenShift Container Platform との同期

LDAP サーバーのすべてのグループを OpenShift Container Platform に同期できます。

前提条件

  • 同期設定ファイルを作成します。

手順

  1. LDAP サーバーからのすべてのグループを OpenShift Container Platform と同期するには、以下を実行します。

    $ oc adm groups sync --sync-config=config.yaml --confirm
    注記

    デフォルトでは、すべてのグループ同期操作がドライランされるので、OpenShift Container Platform Group レコードを変更するために oc adm groups sync コマンドで --confirm フラグを設定する必要があります。

18.2.2. OpenShift Container Platform Group の LDAP サーバーとの同期

設定ファイルで指定された LDAP サーバーのグループに対応する OpenShift Container Platform のグループすべてを同期できます。

前提条件

  • 同期設定ファイルを作成します。

手順

  1. OpenShift Container Platform Group を LDAP サーバーと同期するには、以下を実行します。

    $ oc adm groups sync --type=openshift --sync-config=config.yaml --confirm
    注記

    デフォルトでは、すべてのグループ同期操作がドライランされるので、OpenShift Container Platform Group レコードを変更するために oc adm groups sync コマンドで --confirm フラグを設定する必要があります。

18.2.3. LDAP サーバーのサブグループの OpenShift Container Platform との同期

LDAP グループのサブセットを、ホワイトリストファイル、ブラックリストファイル、またはその両方を使用して OpenShift Container Platform と同期できます。

注記

ブラックリストファイル、ホワイトリストファイル、またはホワイトリストのリテラルの組み合わせを使用できます。ホワイトリストおよびブラックリストのファイルには 1 行ごとに 1 つの固有のグループ識別子を含める必要があり、ホワイトリストのリテラルはコマンド自体に直接含めることができます。これらのガイドラインは LDAP サーバーにあるグループと OpenShift Container Platform にすでにあるグループに適用されます。

前提条件

  • 同期設定ファイルを作成します。

手順

  1. LDAP グループのサブセットを OpenShift Container Platform と同期するには、以下のコマンドを使用します。

    $ oc adm groups sync --whitelist=<whitelist_file> \
                       --sync-config=config.yaml    \
                       --confirm
    $ oc adm groups sync --blacklist=<blacklist_file> \
                       --sync-config=config.yaml    \
                       --confirm
    $ oc adm groups sync <group_unique_identifier>    \
                       --sync-config=config.yaml    \
                       --confirm
    $ oc adm groups sync <group_unique_identifier>    \
                       --whitelist=<whitelist_file> \
                       --blacklist=<blacklist_file> \
                       --sync-config=config.yaml    \
                       --confirm
    $ oc adm groups sync --type=openshift             \
                       --whitelist=<whitelist_file> \
                       --sync-config=config.yaml    \
                       --confirm
    注記

    デフォルトでは、すべてのグループ同期操作がドライランされるので、OpenShift Container Platform Group レコードを変更するために oc adm groups sync コマンドで --confirm フラグを設定する必要があります。