org.apache.solr.security

## Class KerberosPlugin

- java.lang.Object
- - org.apache.solr.security.AuthenticationPlugin
  - - org.apache.solr.security.KerberosPlugin

- All Implemented Interfaces:
    Closeable, AutoCloseable, HttpClientInterceptorPlugin

      public class KerberosPlugin
      extends AuthenticationPlugin
      implements HttpClientInterceptorPlugin

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `protected static class` | `KerberosPlugin.AttributeOnlyServletContext`
    `static class` | `KerberosPlugin.RequestContinuesRecorderAuthenticationHandler`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `AUTH_HANDLER_PARAM`
    `static String` | `COOKIE_DOMAIN_PARAM`
    `static String` | `COOKIE_PATH_PARAM`
    `static String` | `COOKIE_PORT_AWARE_PARAM`
    `static String` | `DELEGATION_TOKEN_ENABLED`
    `static String` | `DELEGATION_TOKEN_KIND`
    `static String` | `DELEGATION_TOKEN_SECRET_MANAGER_ZNODE_WORKING_PATH`
    `static String` | `DELEGATION_TOKEN_SECRET_PROVIDER`
    `static String` | `DELEGATION_TOKEN_SECRET_PROVIDER_ZK_PATH`
    `static String` | `DELEGATION_TOKEN_TYPE_DEFAULT`
    `static String` | `DELEGATION_TOKEN_VALIDITY`
    `static String` | `KEYTAB_PARAM`
    `static String` | `NAME_RULES_PARAM`
    `static String` | `PRINCIPAL_PARAM`
    `static String` | `TOKEN_VALID_PARAM`

    - ### Fields inherited from class org.apache.solr.security.AuthenticationPlugin

      `AUTHENTICATION_PLUGIN_PROP`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `KerberosPlugin(CoreContainer coreContainer)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()`
    `boolean` | `doAuthenticate(javax.servlet.ServletRequest req, javax.servlet.ServletResponse rsp, javax.servlet.FilterChain chain)` This method attempts to authenticate the request.
    `HttpClientConfigurer` | `getClientConfigurer()`
    `void` | `init(Map<String,Object> pluginConfig)` This is called upon loading up of a plugin, used for setting it up.

    - ### Methods inherited from class org.apache.solr.security.AuthenticationPlugin

      `closeRequest`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### NAME_RULES_PARAM

          public static final String NAME_RULES_PARAM

      See Also:
        Constant Field Values

    - #### COOKIE_DOMAIN_PARAM

          public static final String COOKIE_DOMAIN_PARAM

      See Also:
        Constant Field Values

    - #### COOKIE_PATH_PARAM

          public static final String COOKIE_PATH_PARAM

      See Also:
        Constant Field Values

    - #### PRINCIPAL_PARAM

          public static final String PRINCIPAL_PARAM

      See Also:
        Constant Field Values

    - #### KEYTAB_PARAM

          public static final String KEYTAB_PARAM

      See Also:
        Constant Field Values

    - #### TOKEN_VALID_PARAM

          public static final String TOKEN_VALID_PARAM

      See Also:
        Constant Field Values

    - #### COOKIE_PORT_AWARE_PARAM

          public static final String COOKIE_PORT_AWARE_PARAM

      See Also:
        Constant Field Values

    - #### DELEGATION_TOKEN_ENABLED

          public static final String DELEGATION_TOKEN_ENABLED

      See Also:
        Constant Field Values

    - #### DELEGATION_TOKEN_KIND

          public static final String DELEGATION_TOKEN_KIND

      See Also:
        Constant Field Values

    - #### DELEGATION_TOKEN_VALIDITY

          public static final String DELEGATION_TOKEN_VALIDITY

      See Also:
        Constant Field Values

    - #### DELEGATION_TOKEN_SECRET_PROVIDER

          public static final String DELEGATION_TOKEN_SECRET_PROVIDER

      See Also:
        Constant Field Values

    - #### DELEGATION_TOKEN_SECRET_PROVIDER_ZK_PATH

          public static final String DELEGATION_TOKEN_SECRET_PROVIDER_ZK_PATH

      See Also:
        Constant Field Values

    - #### DELEGATION_TOKEN_SECRET_MANAGER_ZNODE_WORKING_PATH

          public static final String DELEGATION_TOKEN_SECRET_MANAGER_ZNODE_WORKING_PATH

      See Also:
        Constant Field Values

    - #### DELEGATION_TOKEN_TYPE_DEFAULT

          public static final String DELEGATION_TOKEN_TYPE_DEFAULT

      See Also:
        Constant Field Values

    - #### AUTH_HANDLER_PARAM

          public static final String AUTH_HANDLER_PARAM

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### KerberosPlugin

          public KerberosPlugin(CoreContainer coreContainer)

  - ### Method Detail

    - #### init

          public void init(Map<String,Object> pluginConfig)

      Description copied from class: `AuthenticationPlugin`
      This is called upon loading up of a plugin, used for setting it up.
      Specified by:
        `init` in class `AuthenticationPlugin`
      Parameters:
        `pluginConfig` - Config parameters, possibly from a ZK source

    - #### doAuthenticate

          public boolean doAuthenticate(javax.servlet.ServletRequest req,
                                        javax.servlet.ServletResponse rsp,
                                        javax.servlet.FilterChain chain)
                                 throws Exception

      Description copied from class: `AuthenticationPlugin`
      This method attempts to authenticate the request. Upon a successful authentication, this must call the next filter in the filter chain and set the user principal of the request, or else, upon an error or an authentication failure, throw an exception.
      Specified by:
        `doAuthenticate` in class `AuthenticationPlugin`
      Parameters:
        `req` - the http request
        `rsp` - the http response
        `chain` - the servlet filter chain
      Returns:
        false if the request not be processed by Solr (not continue), i.e. the response and status code have already been sent.
      Throws:
        `Exception` - any exception thrown during the authentication, e.g. PrivilegedActionException

    - #### getClientConfigurer

          public HttpClientConfigurer getClientConfigurer()

      Specified by:
        `getClientConfigurer` in interface `HttpClientInterceptorPlugin`
      Returns:
        Returns an instance of a HttpClientConfigurer to be used for configuring the httpclients for use with SolrJ clients.

    - #### close

          public void close()

      Specified by:
        `close` in interface `Closeable`
      Specified by:
        `close` in interface `AutoCloseable`

Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.