diff --git a/.github/actions/start-opensearch/action.yml b/.github/actions/start-opensearch/action.yml index cf3dfbeb..306a9079 100644 --- a/.github/actions/start-opensearch/action.yml +++ b/.github/actions/start-opensearch/action.yml @@ -26,6 +26,7 @@ runs: fi OPENSEARCH_HOME=$(realpath ./opensearch-*) OPENSEARCH_JAVA_OPTS="-Djava.net.preferIPv4Stack=true" + export OPENSEARCH_INITIAL_ADMIN_PASSWORD=admin url="http://localhost:9200" cp ./client/.ci/opensearch/opensearch.yml $OPENSEARCH_HOME/config/ @@ -34,7 +35,15 @@ runs: if [[ -d "$OPENSEARCH_HOME/plugins/opensearch-security" ]]; then if [[ "$SECURED" == "true" ]]; then - bash $OPENSEARCH_HOME/plugins/opensearch-security/tools/install_demo_configuration.sh -y -i -s + OPENSEARCH_VERSION=$(cat $OPENSEARCH_HOME/plugins/opensearch-security/plugin-descriptor.properties | grep '^version=' | cut -d'=' -f 2) + OPENSEARCH_REQUIRED_VERSION="2.12.0" + # Starting in 2.12.0, security demo configuration script requires an initial admin password + COMPARE_VERSION=`echo $OPENSEARCH_REQUIRED_VERSION $OPENSEARCH_VERSION | tr ' ' '\n' | sort -V | uniq | head -n 1` + if [ "$COMPARE_VERSION" == "$OPENSEARCH_REQUIRED_VERSION" ]; then + bash $OPENSEARCH_HOME/plugins/opensearch-security/tools/install_demo_configuration.sh -y -i -s -t + else + bash $OPENSEARCH_HOME/plugins/opensearch-security/tools/install_demo_configuration.sh -y -i -s + fi sed -i.bak -e 's/plugins.security.audit.type:.*/plugins.security.audit.type: log4j/' $OPENSEARCH_HOME/config/opensearch.yml cp ./client/.ci/opensearch/*.pem $OPENSEARCH_HOME/config/ url="https://localhost:9200" diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a9bbf290..2c5767c6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -63,7 +63,7 @@ jobs: strategy: fail-fast: false matrix: - version: ['1.1.0', '1.2.4', '1.3.4', '2.2.0', '2.4.0', '2.6.0', '2.8.0'] + version: ['1.1.0', '1.2.4', '1.3.4', '2.2.0', '2.4.0', '2.6.0', '2.8.0', '2.12.0'] secured: [true, false] steps: - name: Checkout Rust Client