From 5578c37d1f0fc629b004fcf7f9d6b1e47fe8541e Mon Sep 17 00:00:00 2001 From: frudisch Date: Sat, 17 Aug 2024 11:14:02 +0200 Subject: [PATCH] Do not print secrets such as registration secret and router password to console on selenium grid hub and router startup When using the start-selenium-grid-hub.sh or start-selenium-grid-router.sh script the router password and registration secret got printed to the console. For testing usage this is (semi) fine. But when using Selenium Docker Images in a production environment, printing secrets to the console is a security issue. Therefore, all secrets printed to the console are replaced with '***' in this change. --- Hub/start-selenium-grid-hub.sh | 4 ++-- Router/start-selenium-grid-router.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Hub/start-selenium-grid-hub.sh b/Hub/start-selenium-grid-hub.sh index 60cb5086e..688fe7db9 100755 --- a/Hub/start-selenium-grid-hub.sh +++ b/Hub/start-selenium-grid-hub.sh @@ -70,7 +70,7 @@ if [ "${SE_ENABLE_TLS}" = "true" ]; then fi if [ ! -z "$SE_REGISTRATION_SECRET" ]; then - echo "Appending Selenium options: --registration-secret ${SE_REGISTRATION_SECRET}" + echo "Appending Selenium options: --registration-secret ***" SE_OPTS="$SE_OPTS --registration-secret ${SE_REGISTRATION_SECRET}" fi @@ -85,7 +85,7 @@ if [ ! -z "$SE_ROUTER_USERNAME" ]; then fi if [ ! -z "$SE_ROUTER_PASSWORD" ]; then - echo "Appending Selenium options: --password ${SE_ROUTER_PASSWORD}" + echo "Appending Selenium options: --password ***" SE_OPTS="$SE_OPTS --password ${SE_ROUTER_PASSWORD}" fi diff --git a/Router/start-selenium-grid-router.sh b/Router/start-selenium-grid-router.sh index c7e5e5ca2..fc95f7357 100755 --- a/Router/start-selenium-grid-router.sh +++ b/Router/start-selenium-grid-router.sh @@ -102,7 +102,7 @@ if [ "${SE_ENABLE_TLS}" = "true" ]; then fi if [ ! -z "$SE_REGISTRATION_SECRET" ]; then - echo "Appending Selenium options: --registration-secret ${SE_REGISTRATION_SECRET}" + echo "Appending Selenium options: --registration-secret ***" SE_OPTS="$SE_OPTS --registration-secret ${SE_REGISTRATION_SECRET}" fi @@ -117,7 +117,7 @@ if [ ! -z "$SE_ROUTER_USERNAME" ]; then fi if [ ! -z "$SE_ROUTER_PASSWORD" ]; then - echo "Appending Selenium options: --password ${SE_ROUTER_PASSWORD}" + echo "Appending Selenium options: --password ***" SE_OPTS="$SE_OPTS --password ${SE_ROUTER_PASSWORD}" fi