Skip to content
Snippets Groups Projects
Commit 69822085 authored by Václav Bartoš's avatar Václav Bartoš
Browse files

user config: CN made equal to username

firstname and lastname are optional (can be empty) - they are not needed in any of the tools.
parent bdbeccd8
Branches
Tags
No related merge requests found
......@@ -83,25 +83,25 @@ else
echo
echo
echo
echo "Please provide following parameters for first socctolls user which will be created during the initialization with organization admin privileges:"
echo "Please provide the following parameters for the first SOCTools user, which will be created during the initialization with organization admin privileges:"
echo "username - Username of the user"
echo "firstname - First name of the user"
echo "lastname - Last name of the user"
echo "username - Username of the user"
echo "DN - Distinguished Name of the user, for user certificate"
echo "CN - Common Name of the user, for user certificate"
echo "Email will be generated automatically in Username@Domain format becouse of format restrictions in some services"
#echo "DN - Distinguished Name of the user, for user certificate"
#echo "CN - Common Name of the user, for user certificate"
echo "Email will be generated automatically in Username@Domain format because of format restrictions in some services"
echo ""
echo ""
for i in firstname lastname username; do
read -p "${i}: " $i
if [ -z $i ]; then
echo "Error: Empty string for ${i}! exiting..."
exit 1
fi
done
read -p "Enter CN for Certificate [${firstname}${lastname}]: " CN
CN=${CN:-${firstname}${lastname}}
DN=${CN}
read -p "username: " username
if [ -z "$username" ]; then
echo "Error: Empty username! exiting..."
exit 1
fi
read -p "firstname: " firstname
read -p "lastname: " lastname
#read -p "Enter CN for Certificate [${firstname}${lastname}]: " CN
#CN=${CN:-${firstname}${lastname}}
CN="$username"
DN="CN=${CN}"
echo
echo
echo
......@@ -124,12 +124,12 @@ else
cp -f group_vars/all/variables.template group_vars/all/variables.yml
sed -i "s/CHANGE_ME_TO_FQDN/${soctoolsproxy}/g" group_vars/all/variables.yml
sed -i "s/soctools.test/${domain}/g" group_vars/all/variables.yml
sed -i "11s/soc_admin/${firstname}/" group_vars/all/variables.yml
sed -i "12s/SOC/${lastname}/" group_vars/all/variables.yml
sed -i "11s/CHANGE_ME_FIRST_NAME/${firstname}/" group_vars/all/variables.yml
sed -i "12s/CHANGE_ME_LAST_NAME/${lastname}/" group_vars/all/variables.yml
sed -i "13s/soc_admin/${username}/" group_vars/all/variables.yml
sed -i "14s/soc_admin/${username}/" group_vars/all/variables.yml
sed -i "15s/SOC_Admin/${DN}/" group_vars/all/variables.yml
sed -i "16s/SOC_Admin/${CN}/" group_vars/all/variables.yml
sed -i "15s/CN=soc_admin/${DN}/" group_vars/all/variables.yml
sed -i "16s/soc_admin/${CN}/" group_vars/all/variables.yml
sed -i "26s/soc_admin/${username}/" group_vars/all/variables.yml
echo
echo
......
......@@ -8,18 +8,18 @@ domain: "soctools.test"
#List of users which will be created during the initialization with organization admin privileges
soctools_users:
- firstname: "soc_admin"
lastname: "SOC"
- firstname: "CHANGE_ME_FIRST_NAME"
lastname: "CHANGE_ME_LAST_NAME"
username: "soc_admin"
email: "soc_admin@{{domain}}"
DN: "CN=SOC_Admin"
CN: "SOC_Admin"
# - firstname: "soc_admin_2"
# lastname: "SOC"
DN: "CN=soc_admin"
CN: "soc_admin"
# - firstname: "SOC Admin 2"
# lastname: ""
# username: "soc_admin_2"
# email: "soc_admin_2@{{domain}}"
# DN: "CN=SOC_Admin_2"
# CN: "SOC_Admin_2"
# DN: "CN=soc_admin_2"
# CN: "soc_admin_2"
# list of users(username) from previous step which will recive admin roles in ODFE. (Minimum one user is required)
ODFE_ADMIN_USERS:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment