Don't print Kubernetes username/password to console.

It is too easy to copy/paste this on-line.

Fixes #1483
This commit is contained in:
Joe Beda
2014-09-29 13:11:31 -07:00
parent 648a400e36
commit c323179d9b
6 changed files with 65 additions and 48 deletions

View File

@@ -65,7 +65,6 @@ function kube-up {
trap "rm -rf ${KUBE_TEMP}" EXIT trap "rm -rf ${KUBE_TEMP}" EXIT
get-password get-password
echo "Using password: $user:$passwd"
python $SCRIPT_DIR/../third_party/htpasswd/htpasswd.py -b -c \ python $SCRIPT_DIR/../third_party/htpasswd/htpasswd.py -b -c \
${KUBE_TEMP}/htpasswd $user $passwd ${KUBE_TEMP}/htpasswd $user $passwd
HTPASSWD=$(cat ${KUBE_TEMP}/htpasswd) HTPASSWD=$(cat ${KUBE_TEMP}/htpasswd)
@@ -202,12 +201,15 @@ function kube-up {
done done
echo echo
echo "Kubernetes cluster is running. Access the master at:" echo "Kubernetes cluster is running. The master is running at:"
echo echo
echo " https://${user}:${passwd}@$AZ_CS.cloudapp.net" echo " https://$AZ_CS.cloudapp.net"
echo
echo "The user name and password to use is located in ~/.kubernetes_auth."
echo echo
echo "Security note: The server above uses a self signed certificate. This is" echo "Security note: The server above uses a self signed certificate. This is"
echo " subject to \"Man in the middle\" type attacks." echo " subject to \"Man in the middle\" type attacks."
echo
} }
# Delete a kubernetes cluster # Delete a kubernetes cluster
@@ -241,11 +243,15 @@ function kube-down {
# get-password # get-password
# echo "Kubernetes cluster is updated. Access the master at:" # echo "Kubernetes cluster is updated. The master is running at:"
# echo # echo
# echo " https://${user}:${passwd}@${KUBE_MASTER_IP}" # echo " https://${KUBE_MASTER_IP}"
# echo
# echo "The user name and password to use is located in ~/.kubernetes_auth."
# echo
# echo "Security note: The server above uses a self signed certificate. This is"
# echo " subject to \"Man in the middle\" type attacks."
# echo # echo
# } # }
# # Execute prior to running tests to build a release if required for env # # Execute prior to running tests to build a release if required for env

View File

@@ -139,7 +139,6 @@ function kube-up {
trap 'rm -rf "${KUBE_TEMP}"' EXIT trap 'rm -rf "${KUBE_TEMP}"' EXIT
get-password get-password
echo "Using password: $user:$passwd"
python "${base_dir}/third_party/htpasswd/htpasswd.py" -b \ python "${base_dir}/third_party/htpasswd/htpasswd.py" -b \
-c "${KUBE_TEMP}/htpasswd" $user $passwd -c "${KUBE_TEMP}/htpasswd" $user $passwd
HTPASSWD=$(cat "${KUBE_TEMP}/htpasswd") HTPASSWD=$(cat "${KUBE_TEMP}/htpasswd")
@@ -273,9 +272,11 @@ function kube-up {
done done
echo echo
echo "Kubernetes cluster is running. Access the master at:" echo "Kubernetes cluster is running. The master is running at:"
echo echo
echo " https://${user}:${passwd}@${KUBE_MASTER_IP}" echo " https://${KUBE_MASTER_IP}"
echo
echo "The user name and password to use is located in ~/.kubernetes_auth."
echo echo
kube_cert=".kubecfg.crt" kube_cert=".kubecfg.crt"
@@ -367,9 +368,12 @@ function kube-push {
get-password get-password
echo "Kubernetes cluster is updated. Access the master at:"
echo echo
echo " https://${user}:${passwd}@${KUBE_MASTER_IP}" echo "Kubernetes cluster is running. The master is running at:"
echo
echo " https://${KUBE_MASTER_IP}"
echo
echo "The user name and password to use is located in ~/.kubernetes_auth."
echo echo
} }

View File

@@ -183,7 +183,6 @@ kube-up() {
trap "rm -rf ${KUBE_TEMP}" EXIT trap "rm -rf ${KUBE_TEMP}" EXIT
get-password get-password
echo "cluster/rackspace/util.sh: Using password: $user:$passwd"
python $(dirname $0)/../../third_party/htpasswd/htpasswd.py -b -c ${KUBE_TEMP}/htpasswd $user $passwd python $(dirname $0)/../../third_party/htpasswd/htpasswd.py -b -c ${KUBE_TEMP}/htpasswd $user $passwd
HTPASSWD=$(cat ${KUBE_TEMP}/htpasswd) HTPASSWD=$(cat ${KUBE_TEMP}/htpasswd)
@@ -242,10 +241,13 @@ kube-up() {
echo "All minions may not be online yet, this is okay." echo "All minions may not be online yet, this is okay."
echo echo
echo "Kubernetes cluster is running. Access the master at:" echo "Kubernetes cluster is running. The master is running at:"
echo echo
echo " https://${user}:${passwd}@${KUBE_MASTER_IP}" echo " https://${KUBE_MASTER_IP}"
echo
echo "The user name and password to use is located in ~/.kubernetes_auth."
echo echo
echo "Security note: The server above uses a self signed certificate. This is" echo "Security note: The server above uses a self signed certificate. This is"
echo " subject to \"Man in the middle\" type attacks." echo " subject to \"Man in the middle\" type attacks."
echo
} }

View File

@@ -68,7 +68,6 @@ EOF
# Configure nginx authorization # Configure nginx authorization
mkdir -p $KUBE_TEMP mkdir -p $KUBE_TEMP
mkdir -p /srv/salt/nginx mkdir -p /srv/salt/nginx
echo "Using password: $MASTER_USER:$MASTER_PASSWD"
python $(dirname $0)/../../third_party/htpasswd/htpasswd.py -b -c ${KUBE_TEMP}/htpasswd $MASTER_USER $MASTER_PASSWD python $(dirname $0)/../../third_party/htpasswd/htpasswd.py -b -c ${KUBE_TEMP}/htpasswd $MASTER_USER $MASTER_PASSWD
MASTER_HTPASSWD=$(cat ${KUBE_TEMP}/htpasswd) MASTER_HTPASSWD=$(cat ${KUBE_TEMP}/htpasswd)
echo $MASTER_HTPASSWD > /srv/salt/nginx/htpasswd echo $MASTER_HTPASSWD > /srv/salt/nginx/htpasswd

View File

@@ -89,9 +89,12 @@ function kube-up {
echo echo
echo "Kubernetes cluster created." echo "Kubernetes cluster created."
echo echo
echo "Kubernetes cluster is running. Access the master at:" echo "Kubernetes cluster is running. The master is running at:"
echo
echo " https://${KUBE_MASTER_IP}"
echo
echo "The user name and password to use is located in ~/.kubernetes_auth."
echo echo
echo " https://${user}:${passwd}@${KUBE_MASTER_IP}"
} }
# Delete a kubernetes cluster # Delete a kubernetes cluster

View File

@@ -101,8 +101,6 @@ function kube-up {
trap "rm -rf ${KUBE_TEMP}" EXIT trap "rm -rf ${KUBE_TEMP}" EXIT
get-password get-password
echo "Using password: $user:$passwd"
echo
python $(dirname $0)/../third_party/htpasswd/htpasswd.py -b -c ${KUBE_TEMP}/htpasswd $user $passwd python $(dirname $0)/../third_party/htpasswd/htpasswd.py -b -c ${KUBE_TEMP}/htpasswd $user $passwd
HTPASSWD=$(cat ${KUBE_TEMP}/htpasswd) HTPASSWD=$(cat ${KUBE_TEMP}/htpasswd)
@@ -220,9 +218,11 @@ function kube-up {
done done
echo echo
echo "Kubernetes cluster is running. Access the master at:" echo "Kubernetes cluster is running. The master is running at:"
echo echo
echo " https://${user}:${passwd}@${KUBE_MASTER_IP}" echo " https://${KUBE_MASTER_IP}"
echo
echo "The user name and password to use is located in ~/.kubernetes_auth."
echo echo
echo "Security note: The server above uses a self signed certificate." echo "Security note: The server above uses a self signed certificate."
echo "This is subject to \"Man in the middle\" type attacks." echo "This is subject to \"Man in the middle\" type attacks."
@@ -260,9 +260,12 @@ function kube-push {
get-password get-password
echo "Kubernetes cluster is updated. Access the master at:"
echo echo
echo " https://${user}:${passwd}@${KUBE_MASTER_IP}" echo "Kubernetes cluster is updated. The master is running at:"
echo
echo " https://${KUBE_MASTER_IP}"
echo
echo "The user name and password to use is located in ~/.kubernetes_auth."
echo echo
} }