# This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # elasticsearch5-search-guard # elasticsearch5-search-guard/pkg-message # elasticsearch5-search-guard/pkg-descr # elasticsearch5-search-guard/files # elasticsearch5-search-guard/files/patch-elasticsearch-tools-install_demo_configuration.sh # elasticsearch5-search-guard/pkg-plist # elasticsearch5-search-guard/Makefile # elasticsearch5-search-guard/distinfo # echo c - elasticsearch5-search-guard mkdir -p elasticsearch5-search-guard > /dev/null 2>&1 echo x - elasticsearch5-search-guard/pkg-message sed 's/^X//' >elasticsearch5-search-guard/pkg-message << '537186b178adf581b414ec166bced5a9' X------------------------------------------------------------------------------- Xcd into %%PREFIX%%/lib/elasticsearch/plugins/search-guard-5/tools/ X XExecute ./install_demo_configuration.sh, chmod the script first if necessary. XThis will generate all required TLS certificates and add the Search Guard Xconfiguration to your elasticsearch.yml file. X X(re)start Elasticsearch: service elasticsearch start X XExecute ./sgadmin_demo.sh, chmod the script if necessary first. This will Xexecute sgadmin and populate the Search Guard configuration index Xwith the files contained in the plugins/search-guard-/sgconfig Xdirectory. X XTest the installation by visiting https://localhost:9200. When prompted, Xuse admin/admin as username and password. This user has full access Xto the cluster. X XDisplay information about the currently logged in user by visiting X https://localhost:9200/_searchguard/authinfo X------------------------------------------------------------------------------- 537186b178adf581b414ec166bced5a9 echo x - elasticsearch5-search-guard/pkg-descr sed 's/^X//' >elasticsearch5-search-guard/pkg-descr << 'e1f277a5e25dd7a74aed4dd2222ee261' XSearch Guard is an Elasticsearch plugin that offers encryption, authentication, Xand authorization. It builds on Search Guard SSL and provides pluggable Xauthentication and authorization modules in addition. Search Guard is fully Xcompatible with Kibana, Logstash and Beats. X XAs an alternative to other security solutions for Elasticsearch, Search Guard Xoffers the following main features: X X TLS on transport- and REST-layer X Fine-grained role- and index-based access control X HTTP Basic Authentication X LDAP / Active Directory X Kerberos / SPNEGO X JSON web token X Document- and Field-level security X Audit logging X Kibana multi-tenancy X REST management API X Proxy support X User impersonation X XWWW: https://github.com/floragunncom/search-guard e1f277a5e25dd7a74aed4dd2222ee261 echo c - elasticsearch5-search-guard/files mkdir -p elasticsearch5-search-guard/files > /dev/null 2>&1 echo x - elasticsearch5-search-guard/files/patch-elasticsearch-tools-install_demo_configuration.sh sed 's/^X//' >elasticsearch5-search-guard/files/patch-elasticsearch-tools-install_demo_configuration.sh << '6eedd8ded312dba484425728130c3e34' X--- elasticsearch/tools/install_demo_configuration.sh.orig 2017-06-02 14:34:13.079863919 +0200 X+++ elasticsearch/tools/install_demo_configuration.sh X@@ -17,25 +17,14 @@ X X set -e X BASE_DIR="$DIR/../../../" X-ES_CONF_FILE="$BASE_DIR/config/elasticsearch.yml" X+ES_CONF_FILE="%%PREFIX%%/etc/elasticsearch/elasticsearch.yml" X ES_BIN_DIR="$BASE_DIR/bin" X ES_PLUGINS_DIR="$BASE_DIR/plugins" X ES_LIB_PATH="$BASE_DIR/lib" X SUDO_CMD="" X-BASE_64_DECODE_CMD="base64 -d" X+BASE_64_DECODE_CMD="b64decode -m -p -r" X ES_INSTALL_TYPE=".tar.gz" X X-#Check if its a rpm/deb install X-if [ -f /usr/share/elasticsearch/bin/elasticsearch ]; then X- ES_CONF_FILE="/etc/elasticsearch/elasticsearch.yml" X- ES_BIN_DIR="/usr/share/elasticsearch/bin" X- ES_PLUGINS_DIR="/usr/share/elasticsearch/plugins" X- ES_LIB_PATH="/usr/share/elasticsearch/lib" X- SUDO_CMD="sudo" X- ES_INSTALL_TYPE="rpm/deb" X- echo "This script maybe require your root password for 'sudo' privileges" X-fi X- X if $SUDO_CMD test -f "$ES_CONF_FILE"; then X : X else X@@ -58,12 +47,8 @@ X exit -1 X fi X X-if [ "$ES_INSTALL_TYPE" != "rpm/deb" ];then X- ES_CONF_DIR=$(dirname "${ES_CONF_FILE}") X- ES_CONF_DIR=`cd "$ES_CONF_DIR" ; pwd` X-else X- ES_CONF_DIR="/etc/elasticsearch" X-fi X+ES_CONF_DIR=$(dirname "${ES_CONF_FILE}") X+ES_CONF_DIR=`cd "$ES_CONF_DIR" ; pwd` X X ES_CONF_FILE="$ES_CONF_DIR/elasticsearch.yml" X X@@ -123,7 +108,7 @@ X echo "### Success" X echo "### Execute this script now on all your nodes and then start all nodes" X echo "### After the whole cluster is up execute: " X-echo "#!/bin/bash" | $SUDO_CMD tee sgadmin_demo.sh > /dev/null X+echo "#!/usr/local/bin/bash" | $SUDO_CMD tee sgadmin_demo.sh > /dev/null X echo $SUDO_CMD "$ES_PLUGINS_DIR/search-guard-5/tools/sgadmin.sh" -cd "$ES_PLUGINS_DIR/search-guard-5/sgconfig" -cn searchguard_demo -ks "$ES_CONF_DIR/kirk.jks" -ts "$ES_CONF_DIR/truststore.jks" -nhnv | $SUDO_CMD tee -a sgadmin_demo.sh > /dev/null X $SUDO_CMD chmod +x sgadmin_demo.sh X $SUDO_CMD cat sgadmin_demo.sh | tail -1 6eedd8ded312dba484425728130c3e34 echo x - elasticsearch5-search-guard/pkg-plist sed 's/^X//' >elasticsearch5-search-guard/pkg-plist << '3ff6d593ac2e35a93bf12c32608260a4' Xlib/elasticsearch/plugins/search-guard-5/commons-cli-1.3.1.jar Xlib/elasticsearch/plugins/search-guard-5/guava-19.0.jar Xlib/elasticsearch/plugins/search-guard-5/netty-buffer-4.1.7.Final.jar Xlib/elasticsearch/plugins/search-guard-5/netty-codec-4.1.7.Final.jar Xlib/elasticsearch/plugins/search-guard-5/netty-codec-http-4.1.7.Final.jar Xlib/elasticsearch/plugins/search-guard-5/netty-common-4.1.7.Final.jar Xlib/elasticsearch/plugins/search-guard-5/netty-handler-4.1.7.Final.jar Xlib/elasticsearch/plugins/search-guard-5/netty-resolver-4.1.7.Final.jar Xlib/elasticsearch/plugins/search-guard-5/netty-transport-4.1.7.Final.jar Xlib/elasticsearch/plugins/search-guard-5/plugin-descriptor.properties Xlib/elasticsearch/plugins/search-guard-5/plugin-security.policy Xlib/elasticsearch/plugins/search-guard-5/search-guard-5-5.3.0-12.jar Xlib/elasticsearch/plugins/search-guard-5/search-guard-ssl-5.3.0-21.jar Xlib/elasticsearch/plugins/search-guard-5/sgconfig/elasticsearch.yml.example Xlib/elasticsearch/plugins/search-guard-5/sgconfig/sg_action_groups.yml Xlib/elasticsearch/plugins/search-guard-5/sgconfig/sg_config.yml Xlib/elasticsearch/plugins/search-guard-5/sgconfig/sg_internal_users.yml Xlib/elasticsearch/plugins/search-guard-5/sgconfig/sg_roles.yml Xlib/elasticsearch/plugins/search-guard-5/sgconfig/sg_roles_mapping.yml Xlib/elasticsearch/plugins/search-guard-5/tools/hash.sh Xlib/elasticsearch/plugins/search-guard-5/tools/install_demo_configuration.sh Xlib/elasticsearch/plugins/search-guard-5/tools/sgadmin.sh Xlib/elasticsearch/plugins/search-guard-5/transport-netty4-client-5.3.0.jar 3ff6d593ac2e35a93bf12c32608260a4 echo x - elasticsearch5-search-guard/Makefile sed 's/^X//' >elasticsearch5-search-guard/Makefile << 'e82df2ef7df2ca973dc54bf6e46e007e' X# Created by: Miroslav Lachman <000.fbsd@quip.cz> X# $FreeBSD$ X XPORTNAME= search-guard XPORTVERSION= 5.3.0 XPORTREVISION= 12 XCATEGORIES= textproc java XMASTER_SITES= https://oss.sonatype.org/content/repositories/releases/com/floragunn/search-guard-5/5.3.0-12/ XDISTNAME= search-guard-5-5.3.0-12 XPKGNAMEPREFIX= elasticsearch5- X XMAINTAINER= 000.fbsd@quip.cz XCOMMENT= Elasticsearch Search Guard plugin X XLICENSE= APACHE20 X XRUN_DEPENDS= elasticsearch5>=5.3.0:textproc/elasticsearch5 \ X bash>0:shells/bash X XNO_BUILD= yes X XUSES+= zip shebangfix X XSCRIPTS= hash.sh install_demo_configuration.sh sgadmin.sh XSHEBANG_FILES= ./elasticsearch/tools/*.sh XSHEBANG_LANG= bash X Xdo-extract: X @${MKDIR} ${WRKSRC} X ( cd ${WRKDIR} && ${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} -d ${DISTNAME} \ X ${_DISTDIR}${DISTFILES} ) X Xpre-configure: X ${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|' ${SCRIPTS:S|^|${WRKSRC}/elasticsearch/tools/|} X Xpost-configure: X @${RM} ${WRKSRC}/elasticsearch/tools/*.bat X @${RM} ${WRKSRC}/elasticsearch/tools/install_demo_configuration.sh.orig X Xdo-install: X @cd ${WRKSRC}/elasticsearch && ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/lib/elasticsearch/plugins/search-guard-5 "! -name *\.bak -o ! -name *\.bat" X @${CHMOD} 544 ${STAGEDIR}${PREFIX}/lib/elasticsearch/plugins/search-guard-5/tools/*.sh X @${CHMOD} 644 ${STAGEDIR}${PREFIX}/lib/elasticsearch/plugins/search-guard-5/sgconfig/* X X.include e82df2ef7df2ca973dc54bf6e46e007e echo x - elasticsearch5-search-guard/distinfo sed 's/^X//' >elasticsearch5-search-guard/distinfo << '42516d1a9275df49a7c07c82d6f3c9db' XTIMESTAMP = 1496327095 XSHA256 (search-guard-5-5.3.0-12.zip) = 6c346b6910f3f9fd5017984889f37fbb95fe86c0a64729dd8198b14ed6e699ad XSIZE (search-guard-5-5.3.0-12.zip) = 4751764 42516d1a9275df49a7c07c82d6f3c9db exit