クラス DefaultSpringSecurityContextSource
java.lang.ObjectSE
org.springframework.ldap.core.support.AbstractContextSource
org.springframework.ldap.core.support.LdapContextSource
org.springframework.security.ldap.DefaultSpringSecurityContextSource
- 実装されたすべてのインターフェース:
org.springframework.beans.factory.InitializingBean
、org.springframework.ldap.core.ContextSource
、org.springframework.ldap.core.support.BaseLdapPathContextSource
、org.springframework.ldap.core.support.BaseLdapPathSource
- 既知の直属サブクラス
PasswordPolicyAwareContextSource
public class DefaultSpringSecurityContextSource
extends org.springframework.ldap.core.support.LdapContextSource
Spring LDAP の LdapContextSource を基本クラスとして使用する ContextSource 実装。Spring Security LDAP 名前空間構成によって内部的に使用されます。
Spring Security 3.0 からは、Spring LDAP 1.3 が使用され、 ContextSource インターフェースは、ユーザー名とパスワードによるバインドのサポートを提供します。その結果、 LdapContextSource などの Spring LDAP ContextSource 実装を Spring Security で直接使用できます。
Spring LDAP 1.3 では、JVM レベルの LDAP 接続プールがデフォルトで有効になっていません。このクラスは、pooled プロパティを true に設定しますが、DN が userDn プロパティと一致しない場合にプールを無効にするために使用される DirContextAuthenticationStrategy
をカスタマイズします。これにより、特定のユーザーとして認証するための AbstractContextSource.getContext(String, String)
への呼び出しのプールが防止されます。
- 導入:
- 2.0
フィールドのサマリー
フィールドクラス org.springframework.ldap.core.support.AbstractContextSource から継承されたフィールド
password, SUN_LDAP_POOLING_FLAG, userDn
コンストラクターの概要
コンストラクターコンストラクター説明DefaultSpringSecurityContextSource
(StringSE providerUrl) 指定された LDAP URL に接続するインスタンスを作成して初期化します。DefaultSpringSecurityContextSource
(ListSE<StringSE> urls, StringSE baseDn) LDAP Spring Security Context Source の接続するインスタンスを作成して初期化します。メソッドのサマリー
クラス org.springframework.ldap.core.support.LdapContextSource から継承されたメソッド
getDirContextInstance
クラス org.springframework.ldap.core.support.AbstractContextSource から継承されたメソッド
afterPropertiesSet, assembleProviderUrlString, createContext, getAnonymousEnv, getAuthenticatedEnv, getAuthenticationSource, getBaseLdapName, getBaseLdapPath, getBaseLdapPathAsString, getContext, getContextFactory, getDirObjectFactory, getPassword, getReadOnlyContext, getReadWriteContext, getUrls, getUserDn, isAnonymousReadOnly, isPooled, setAnonymousReadOnly, setAuthenticationSource, setAuthenticationStrategy, setBase, setBaseEnvironmentProperties, setCacheEnvironmentProperties, setContextFactory, setDirObjectFactory, setPassword, setPooled, setReferral, setupAuthenticatedEnvironment, setUrl, setUrls, setUserDn
フィールドの詳細
logger
protected final org.apache.commons.logging.Log logger
コンストラクターの詳細
DefaultSpringSecurityContextSource
指定された LDAP URL に接続するインスタンスを作成して初期化します。フェイルオーバーに複数のサーバーを使用する場合は、DefaultSpringSecurityContextSource(List, String)
コンストラクターを使用してください。- パラメーター:
providerUrl
-ldap://localhost:389/base_dn
形式の LDAP URL
DefaultSpringSecurityContextSource
LDAP Spring Security Context Source の接続するインスタンスを作成して初期化します。提供された LDAP サーバー URL のいずれかに接続します。- パラメーター:
urls
- LDAP サーバーの URL である文字列値のリスト。ldap://ldap.company.com:389
がその例です。Spring Security がサーバーに接続できる場合、LDAPS URL(SSL で保護された)も使用できます。これらの URL にはベース DN を含めないでください。baseDn
- 提供されるすべてのサーバーに共通のベース DN。dc=company,dc=com
.