summaryrefslogtreecommitdiffstats
path: root/heat/ONAP/openstack_encrypted_key.sh
diff options
context:
space:
mode:
authorMarco Platania <platania@research.att.com>2018-09-05 14:26:34 -0400
committerMarco Platania <platania@research.att.com>2018-09-05 14:26:34 -0400
commit8c1c99dfc4a42ff8e438a13858c95340a0f677c7 (patch)
treeca41ad656c7c8383faeeb58edd2617a45dc096d8 /heat/ONAP/openstack_encrypted_key.sh
parent2871669ad9a0db36280fd1bcb7ff9d12066d1369 (diff)
Remove plain OpenStack pwd from Heat
- Replace plain OpenStack password with its encrypted version - Update SO install/init script to skip key encryption (will be done by user) - Provide a script that encrypts the plain OpenStack password Change-Id: Ifb7010ab8720ca92119c65484d05f5cfacf023cb Issue-ID: INT-646 Signed-off-by: Marco Platania <platania@research.att.com>
Diffstat (limited to 'heat/ONAP/openstack_encrypted_key.sh')
-rwxr-xr-xheat/ONAP/openstack_encrypted_key.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/heat/ONAP/openstack_encrypted_key.sh b/heat/ONAP/openstack_encrypted_key.sh
new file mode 100755
index 00000000..20910fa3
--- /dev/null
+++ b/heat/ONAP/openstack_encrypted_key.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+usage () {
+ echo "Usage:"
+ echo " ./$(basename $0) your_openstack_password"
+ exit 1
+}
+
+if [ "$#" -ne 1 ]; then
+ echo "Wrong number of input parameters"
+ usage
+fi
+
+SO_ENCRYPTION_KEY=aa3871669d893c7fb8abbcda31b88b4f
+OPENSTACK_API_KEY=$1
+
+echo -n "$OPENSTACK_API_KEY" | openssl aes-128-ecb -e -K $SO_ENCRYPTION_KEY -nosalt | xxd -c 256 -p