Package org.alfresco.solr.security
Class SecretSharedPropertyCollector
java.lang.Object
org.alfresco.solr.security.SecretSharedPropertyCollector
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 Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic PropertiescompleteCoreProperties(Properties properties) Add secret shared properties to original core properties read from "solrcore.properties"static StringRead "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"static StringRead secret request header name from Java environment variable "alfresco.secureComms.secret.header".static booleanCheck if unauthenticated Solr access is allowedstatic booleanCheck if communications method is "secret"
-
Field Details
-
SECRET_SHARED_METHOD_KEY
- See Also:
-
-
Constructor Details
-
SecretSharedPropertyCollector
public SecretSharedPropertyCollector()
-
-
Method Details
-
isAllowUnauthenticatedSolrEndpoint
public static boolean isAllowUnauthenticatedSolrEndpoint()Check if unauthenticated Solr access is allowed- Returns:
- true if unauthenticated Solr access is allowed
-
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
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
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