Class SecretSharedAuthPlugin

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.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
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      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​(java.util.Map<java.lang.String,​java.lang.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 Detail

      • SecretSharedAuthPlugin

        public SecretSharedAuthPlugin()
    • Method Detail

      • doAuthenticate

        public boolean doAuthenticate​(javax.servlet.ServletRequest request,
                                      javax.servlet.ServletResponse response,
                                      javax.servlet.FilterChain chain)
                               throws java.lang.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:
        java.lang.Exception
      • init

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

        public void close()
                   throws java.io.IOException
        Throws:
        java.io.IOException