From 54c91e877026d7d253a272153991dc66ce62cf3e Mon Sep 17 00:00:00 2001 From: Domenico Sibilio Date: Fri, 18 Feb 2022 10:39:34 +0100 Subject: [PATCH] ACS-2566 Configure Solr shared secret authentication * ACS-2566 Configure Solr shared secret * Fix emoji in README.md --- packaging/tests/tas-restapi/README.md | 2 +- packaging/tests/tas-restapi/pom.xml | 2 +- .../java/org/alfresco/rest/core/RestWrapper.java | 14 ++++++++++++++ 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/packaging/tests/tas-restapi/README.md b/packaging/tests/tas-restapi/README.md index 2926638e74..ac083eba0d 100644 --- a/packaging/tests/tas-restapi/README.md +++ b/packaging/tests/tas-restapi/README.md @@ -20,7 +20,7 @@ Back to [TAS Master Documentation](https://git.alfresco.com/tas/alfresco-tas-uti * [Configuration](#configuration) * [How to enable Test Rail Integration?](#how-to-enable-test-rail-integration) * [Reference](#reference) -* [Change Log](docs/CHANGELOG.md) :glowing_star: +* [Change Log](docs/CHANGELOG.md) 🌟 * [Contributors](#contributors) * [Releasing](#releasing) * [License](#license) diff --git a/packaging/tests/tas-restapi/pom.xml b/packaging/tests/tas-restapi/pom.xml index 8734576bf9..dcaa7f0d52 100644 --- a/packaging/tests/tas-restapi/pom.xml +++ b/packaging/tests/tas-restapi/pom.xml @@ -28,7 +28,7 @@ src/main/resources/shared-resources/testCount.xml 11 UTF-8 - 3.0.47 + 3.0.48 3.3.0 4.5.3 3.3.0 diff --git a/packaging/tests/tas-restapi/src/main/java/org/alfresco/rest/core/RestWrapper.java b/packaging/tests/tas-restapi/src/main/java/org/alfresco/rest/core/RestWrapper.java index c9f3caf786..cfdd944fbe 100644 --- a/packaging/tests/tas-restapi/src/main/java/org/alfresco/rest/core/RestWrapper.java +++ b/packaging/tests/tas-restapi/src/main/java/org/alfresco/rest/core/RestWrapper.java @@ -1129,6 +1129,20 @@ public class RestWrapper extends DSLWrapper this.serverURI = restProperties.envProperty().getSolrServerUrl(); this.serverPort = restProperties.envProperty().getSolrPort(); configureServerEndpoint(); + configureSecretHeader(); + } + + /** + * Adds the secret Solr header if it has been set + */ + private void configureSecretHeader() + { + String solrSecret = restProperties.envProperty().getSolrSecret(); + if(!solrSecret.isEmpty()) + { + String solrSecretName = restProperties.envProperty().getSolrSecretName(); + configureRequestSpec().addHeader(solrSecretName, solrSecret); + } } /**