Class SecretSharedAuthPlugin

java.lang.Object
org.apache.solr.security.AuthenticationPlugin
org.alfresco.solr.security.SecretSharedAuthPlugin
All Implemented Interfaces:
Closeable, AutoCloseable

public class SecretSharedAuthPlugin extends org.apache.solr.security.AuthenticationPlugin
SOLR Authentication Plugin based in shared secret token via request header. This Web Filter is loaded from SOLR_HOME/security.json file, so it will be executed for every request to SOLR. Authentication logic is only applied when Alfresco Communication is using "secret" method but it doesn't apply to "none" and "https" methods.
  • Field Summary

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

    AUTHENTICATION_PLUGIN_PROP
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    boolean
    doAuthenticate(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain)
    Verify that request header includes "secret" word when using "secret" communication method.
    void
    init(Map<String,Object> parameters)
     

    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
  • Constructor Details

    • SecretSharedAuthPlugin

      public SecretSharedAuthPlugin()
  • Method Details

    • doAuthenticate

      public boolean doAuthenticate(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain) throws Exception
      Verify that request header includes "secret" word when using "secret" communication method. "alfresco.secureComms.secret" value is expected as Java environment variable.
      Specified by:
      doAuthenticate in class org.apache.solr.security.AuthenticationPlugin
      Throws:
      Exception
    • init

      public void init(Map<String,Object> parameters)
      Specified by:
      init in class org.apache.solr.security.AuthenticationPlugin
    • close

      public void close() throws IOException
      Throws:
      IOException