クラス KerberosServiceAuthenticationProvider

java.lang.ObjectSE
org.springframework.security.kerberos.authentication.KerberosServiceAuthenticationProvider
実装されているすべてのインターフェース:
org.springframework.beans.factory.InitializingBeanAuthenticationProvider

public class KerberosServiceAuthenticationProvider extends ObjectSE implements AuthenticationProvider, org.springframework.beans.factory.InitializingBean

Kerberos サービスチケットまたは SPNEGO トークン (Kerberos サービスチケットを含む) を検証する認証プロバイダー。

チケットを検証するためのコードが含まれる KerberosTicketValidator が必要です。このコードは SUN と IBM JRE で異なるためです。
また、ユーザープロパティをロードするための UserDetailsService と、Kerbeos からユーザー名のみを取得する GrantedAuthorities も必要です。

設定例は SpnegoAuthenticationProcessingFilter で確認できます。
導入:
1.0
関連事項:
  • コンストラクターの詳細

    • KerberosServiceAuthenticationProvider

      public KerberosServiceAuthenticationProvider()
  • メソッドの詳細

    • authenticate

      public Authentication authenticate(Authentication authentication) throws AuthenticationException
      インターフェースからコピーされた説明: AuthenticationProvider
      AuthenticationManager.authenticate(Authentication) と同じ契約で認証を実行します。
      次で指定:
      インターフェース AuthenticationProviderauthenticate 
      パラメーター:
      authentication - 認証リクエストオブジェクト。
      戻り値:
      資格情報を含む完全に認証されたオブジェクト。AuthenticationProvider が、渡された Authentication オブジェクトの認証をサポートできない場合、null を返すことがあります。そのような場合、提示された Authentication クラスをサポートする次の AuthenticationProvider が試行されます。
      例外:
      AuthenticationException - 認証が失敗した場合。
    • supports

      public boolean supports(ClassSE<? extends ObjectSE> auth)
      インターフェースからコピーされた説明: AuthenticationProvider
      この AuthenticationProvider が指定された Authentication オブジェクトをサポートする場合、true を返します。

      true を返しても、AuthenticationProvider が提示された Authentication オブジェクトを認証できることは保証されません。これは単に、より詳細な評価をサポートできることを示しているだけです。AuthenticationProvider は、AuthenticationProvider.authenticate(Authentication) メソッドから null を返して、別の AuthenticationProvider を試す必要があることを示すことができます。

      認証を実行できる AuthenticationProvider の選択は、実行時に ProviderManager によって行われます。

      次で指定:
      インターフェース AuthenticationProvidersupports 
      戻り値:
      実装が提示された Authentication クラスをより厳密に評価できる場合は true 
    • afterPropertiesSet

      public void afterPropertiesSet() throws ExceptionSE
      次で指定:
      インターフェース org.springframework.beans.factory.InitializingBeanafterPropertiesSet 
      例外:
      ExceptionSE
    • setUserDetailsService

      public void setUserDetailsService(UserDetailsService userDetailsService)
      ユーザープロパティと GrantedAuthorities をロードするために使用する UserDetailsService
      パラメーター:
      userDetailsService - 新しいユーザー詳細サービス
    • setTicketValidator

      public void setTicketValidator(KerberosTicketValidator ticketValidator)
      Kerberos/SPNEGO チケットを検証するために使用する KerberosTicketValidator
      パラメーター:
      ticketValidator - 新しいチケット検証機
    • additionalAuthenticationChecks

      protected void additionalAuthenticationChecks(UserDetails userDetails, KerberosServiceRequestToken authentication) throws AuthenticationException
      サブクラスが、特定の認証リクエストに対して返された UserDetails の追加チェックを実行できるようにします。
      パラメーター:
      userDetails - UserDetailsService から取得
      authentication - 検証済み KerberosServiceRequestToken
      例外:
      AuthenticationException - 資格情報を検証できなかった場合は AuthenticationException (一般的に BadCredentialsExceptionAuthenticationServiceException)