org.apache.solr.security

## Class PKIAuthenticationPlugin

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

- All Implemented Interfaces:
    Closeable, AutoCloseable, HttpClientInterceptorPlugin

      public class PKIAuthenticationPlugin
      extends AuthenticationPlugin
      implements HttpClientInterceptorPlugin

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `PKIAuthenticationPlugin.PKIHeaderData`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `HEADER`
    `static String` | `NODE_IS_USER`
    `static String` | `PATH`

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

      `AUTHENTICATION_PLUGIN_PROP`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PKIAuthenticationPlugin(CoreContainer cores, String nodeName)`

  - ### Method Summary

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

    - ### 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

    - #### HEADER

          public static final String HEADER

      See Also:
        Constant Field Values

    - #### PATH

          public static final String PATH

      See Also:
        Constant Field Values

    - #### NODE_IS_USER

          public static final String NODE_IS_USER

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### PKIAuthenticationPlugin

          public PKIAuthenticationPlugin(CoreContainer cores,
                                         String nodeName)

  - ### Method Detail

    - #### setInterceptorRegistered

          public void setInterceptorRegistered()

    - #### isInterceptorRegistered

          public boolean isInterceptorRegistered()

    - #### 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 request,
                                        javax.servlet.ServletResponse response,
                                        javax.servlet.FilterChain filterChain)
                                 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:
        `request` - the http request
        `response` - the http response
        `filterChain` - 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.

    - #### getRequestHandler

          public SolrRequestHandler getRequestHandler()

    - #### needsAuthorization

          public boolean needsAuthorization(javax.servlet.http.HttpServletRequest req)

    - #### close

          public void close()
                     throws IOException

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

    - #### getPublicKey

          public String getPublicKey()

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