Class SecretSharedPropertyCollector

java.lang.Object
org.alfresco.solr.security.SecretSharedPropertyCollector

public class SecretSharedPropertyCollector extends Object
Provides property values for Alfresco Communication using "secret" method: - "alfresco.secureComms" is the commsMethod (none, https or secret) - "alfresco.secureComms.secret" is the word used as shared secret for "secret" method - "alfresco.secureComms.secret.header" is the request header name used for "secret" method
  • Field Details

  • Constructor Details

    • SecretSharedPropertyCollector

      public SecretSharedPropertyCollector()
  • Method Details

    • isCommsSecretShared

      public static boolean isCommsSecretShared()
      Check if communications method is "secret"
      Returns:
      true when communications method is "secret"
    • isAllowUnauthenticatedSolrEndpoint

      public static boolean isAllowUnauthenticatedSolrEndpoint()
      Check if unauthenticated Solr access is allowed
      Returns:
      true if unauthenticated Solr access is allowed
    • getSecret

      public static String getSecret()
      Read "secret" word from Java environment variable "alfresco.secureComms.secret" It can be set from command line invocation using default "-D" parameter: solr start -a "-Dcreate.alfresco.defaults=alfresco -Dalfresco.secureComms.secret=secret"
      Returns:
      value for the "secret" word
    • getSecretHeader

      public static String getSecretHeader()
      Read secret request header name from Java environment variable "alfresco.secureComms.secret.header". If it's not specified, used default value "X-Alfresco-Search-Secret"
      Returns:
      value for the secret request header
    • completeCoreProperties

      public static Properties completeCoreProperties(Properties properties)
      Add secret shared properties to original core properties read from "solrcore.properties"
      Parameters:
      properties - Read properties from "solrcore.properties"
      Returns:
      when "secret" communication method is configured additional properties are set in original parameter