Last active
June 15, 2020 17:00
-
-
Save MChorfa/c132fd4acc54af6031311f159c528349 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -euo pipefail | |
####################################### | |
# Arguments: | |
# - Password | |
####################################### | |
function hash_es_password() { | |
local ODES_PASS_PLAIN=$1 | |
local ODES_DOCKER_UUID=$(docker run --rm -d amazon/opendistro-for-elasticsearch) | |
local ODES_PASS_HASH=$(docker exec ${ODES_DOCKER_UUID} /bin/sh /usr/share/elasticsearch/plugins/opendistro_security/tools/hash.sh -p ${ODES_PASS_PLAIN}) | |
echo "${ODES_PASS_HASH}" | |
} | |
"$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment