From 4b0cd854d5ceaa57fdadbdf2b3027020e806a330 Mon Sep 17 00:00:00 2001 From: Craig Perkins Date: Tue, 14 Mar 2023 09:42:01 -0400 Subject: [PATCH] Add chmod to install_demo_configuration (#2550) Signed-off-by: Craig Perkins (cherry picked from commit ca4d7528851ea94d936181f86428a25f0c59c8c1) --- tools/install_demo_configuration.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/install_demo_configuration.sh b/tools/install_demo_configuration.sh index bff93c3a6a..579acf05db 100755 --- a/tools/install_demo_configuration.sh +++ b/tools/install_demo_configuration.sh @@ -354,6 +354,12 @@ echo "$ROOT_CA" | $SUDO_CMD tee "$OPENSEARCH_CONF_DIR/root-ca.pem" > /dev/null echo "$NODE_KEY" | $SUDO_CMD tee "$OPENSEARCH_CONF_DIR/esnode-key.pem" > /dev/null echo "$ADMIN_CERT_KEY" | $SUDO_CMD tee "$OPENSEARCH_CONF_DIR/kirk-key.pem" > /dev/null +chmod 0600 "$OPENSEARCH_CONF_DIR/kirk.pem" +chmod 0600 "$OPENSEARCH_CONF_DIR/esnode.pem" +chmod 0600 "$OPENSEARCH_CONF_DIR/root-ca.pem" +chmod 0600 "$OPENSEARCH_CONF_DIR/esnode-key.pem" +chmod 0600 "$OPENSEARCH_CONF_DIR/kirk-key.pem" + echo "" | $SUDO_CMD tee -a "$OPENSEARCH_CONF_FILE" echo "######## Start OpenSearch Security Demo Configuration ########" | $SUDO_CMD tee -a "$OPENSEARCH_CONF_FILE" > /dev/null echo "# WARNING: revise all the lines below before you go into production" | $SUDO_CMD tee -a "$OPENSEARCH_CONF_FILE" > /dev/null