18.12. ストレージプロバイダー操作


Kerberos ストレージプロバイダーの設定

  1. components エンドポイントに対して create コマンドを使用します。
  2. レルム ID を parentId 属性の値として指定します。
  3. kerberosproviderId 属性値として指定し、org.keycloak.storage.UserStorageProviderproviderType 属性値として指定します。
  4. 以下に例を示します。

    $ kcadm.sh create components -r demorealm -s parentId=demorealmId -s id=demokerberos -s name=demokerberos -s providerId=kerberos -s providerType=org.keycloak.storage.UserStorageProvider -s 'config.priority=["0"]' -s 'config.debug=["false"]' -s 'config.allowPasswordAuthentication=["true"]' -s 'config.editMode=["UNSYNCED"]' -s 'config.updateProfileFirstLogin=["true"]' -s 'config.allowKerberosAuthentication=["true"]' -s 'config.kerberosRealm=["KEYCLOAK.ORG"]' -s 'config.keyTab=["http.keytab"]' -s 'config.serverPrincipal=["HTTP/localhost@KEYCLOAK.ORG"]' -s 'config.cachePolicy=["DEFAULT"]'
    Copy to Clipboard Toggle word wrap

LDAP ユーザーストレージプロバイダーの設定

  1. components エンドポイントに対して create コマンドを使用します。
  2. ldapproviderId 属性の値に、org.keycloak.storage.UserStorageProviderproviderType 属性値として指定します。
  3. レルム ID を parentId 属性の値として指定します。
  4. 以下の例を使用して、Kerberos が統合する LDAP プロバイダーを作成します。

    $ kcadm.sh create components -r demorealm -s name=kerberos-ldap-provider -s providerId=ldap -s providerType=org.keycloak.storage.UserStorageProvider -s parentId=3d9c572b-8f33-483f-98a6-8bb421667867  -s 'config.priority=["1"]' -s 'config.fullSyncPeriod=["-1"]' -s 'config.changedSyncPeriod=["-1"]' -s 'config.cachePolicy=["DEFAULT"]' -s config.evictionDay=[] -s config.evictionHour=[] -s config.evictionMinute=[] -s config.maxLifespan=[] -s 'config.batchSizeForSync=["1000"]' -s 'config.editMode=["WRITABLE"]' -s 'config.syncRegistrations=["false"]' -s 'config.vendor=["other"]' -s 'config.usernameLDAPAttribute=["uid"]' -s 'config.rdnLDAPAttribute=["uid"]' -s 'config.uuidLDAPAttribute=["entryUUID"]' -s 'config.userObjectClasses=["inetOrgPerson, organizationalPerson"]' -s 'config.connectionUrl=["ldap://localhost:10389"]'  -s 'config.usersDn=["ou=People,dc=keycloak,dc=org"]' -s 'config.authType=["simple"]' -s 'config.bindDn=["uid=admin,ou=system"]' -s 'config.bindCredential=["secret"]' -s 'config.searchScope=["1"]' -s 'config.useTruststoreSpi=["ldapsOnly"]' -s 'config.connectionPooling=["true"]' -s 'config.pagination=["true"]' -s 'config.allowKerberosAuthentication=["true"]' -s 'config.serverPrincipal=["HTTP/localhost@KEYCLOAK.ORG"]' -s 'config.keyTab=["http.keytab"]' -s 'config.kerberosRealm=["KEYCLOAK.ORG"]' -s 'config.debug=["true"]' -s 'config.useKerberosForPasswordAuthentication=["true"]'
    Copy to Clipboard Toggle word wrap

ユーザーストレージプロバイダーインスタンスの削除

  1. ストレージプロバイダーインスタンスの id 属性を使用して、components/ID などのエンドポイント URI を作成します。
  2. このエンドポイントに対して delete コマンドを実行します。

    以下に例を示します。

    $ kcadm.sh delete components/3d9c572b-8f33-483f-98a6-8bb421667867 -r demorealm
    Copy to Clipboard Toggle word wrap

特定のユーザーストレージプロバイダーに対するすべてのユーザーの同期のトリガー

  1. ストレージプロバイダーの id 属性を使用して、user-storage/ID_OF_USER_STORAGE_INSTANCE/sync などのエンドポイント URI を作成します。
  2. action=triggerFullSync クエリーパラメーターを追加します。
  3. create コマンドを実行します。

    以下に例を示します。

    $ kcadm.sh create user-storage/b7c63d02-b62a-4fc1-977c-947d6a09e1ea/sync?action=triggerFullSync
    Copy to Clipboard Toggle word wrap

特定のユーザーストレージプロバイダーに対する変更済みのユーザーの同期のトリガー

  1. ストレージプロバイダーの id 属性を使用して、user-storage/ID_OF_USER_STORAGE_INSTANCE/sync などのエンドポイント URI を作成します。
  2. action=triggerChangedUsersSync クエリーパラメーターを追加します。
  3. create コマンドを実行します。

    以下に例を示します。

    $ kcadm.sh create user-storage/b7c63d02-b62a-4fc1-977c-947d6a09e1ea/sync?action=triggerChangedUsersSync
    Copy to Clipboard Toggle word wrap

LDAP ユーザーのストレージ接続性のテスト

  1. testLDAPConnection エンドポイントで get コマンドを実行します。
  2. クエリーパラメーター bindCredentialbindDnconnectionUrl、および useTruststoreSpi を提供します。
  3. action クエリーパラメーターを testConnection に設定します。

    以下に例を示します。

    $ kcadm.sh create testLDAPConnection -s action=testConnection -s bindCredential=secret -s bindDn=uid=admin,ou=system -s connectionUrl=ldap://localhost:10389 -s useTruststoreSpi=ldapsOnly
    Copy to Clipboard Toggle word wrap

LDAP ユーザーのストレージ認証のテスト

  1. testLDAPConnection エンドポイントで get コマンドを実行します。
  2. クエリーパラメーター bindCredentialbindDnconnectionUrl、および useTruststoreSpi を指定します。
  3. action クエリーパラメーターを testAuthentication に設定します。

    以下に例を示します。

    $ kcadm.sh create testLDAPConnection -s action=testAuthentication -s bindCredential=secret -s bindDn=uid=admin,ou=system -s connectionUrl=ldap://localhost:10389 -s useTruststoreSpi=ldapsOnly
    Copy to Clipboard Toggle word wrap
Red Hat logoGithubredditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

Red Hat ドキュメントについて

Red Hat をお使いのお客様が、信頼できるコンテンツが含まれている製品やサービスを活用することで、イノベーションを行い、目標を達成できるようにします。 最新の更新を見る.

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

Theme

© 2026 Red Hat
トップに戻る