Skip to content

Commit

Permalink
Revert password length to 15 characters (#679)
Browse files Browse the repository at this point in the history
  • Loading branch information
kabicin committed Sep 4, 2024
1 parent 159ccaf commit 34b0353
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/controller/assets/create_ltpa_keys.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ rm -f $NOT_FOUND_LOG_FILE;
curl --cacert ${CACERT} --header "Content-Type: application/json" --header "Authorization: Bearer ${TOKEN}" -X GET ${APISERVER}/api/v1/namespaces/${NAMESPACE}/secrets/${PASSWORD_KEY_SECRET_NAME} &> $NOT_FOUND_LOG_FILE;
NOT_FOUND_COUNT=$(cat $NOT_FOUND_LOG_FILE | grep -c "NotFound");
TIME_SINCE_EPOCH_SECONDS=$(date '+%s');
PASSWORD=$(openssl rand -base64 32);
PASSWORD=$(openssl rand -base64 15);
if [ "$ENCRYPTION_KEY_SHARING_ENABLED" == "true" ] && [ $NOT_FOUND_COUNT -eq 0 ]; then
LAST_ROTATION=$(curl --cacert ${CACERT} --header "Content-Type: application/json" --header "Authorization: Bearer ${TOKEN}" -X GET ${APISERVER}/api/v1/namespaces/${NAMESPACE}/secrets/${PASSWORD_KEY_SECRET_NAME} | grep -o '"lastRotation": "[^"]*' | grep -o '[^"]*$' | base64 -d);
PASSWORD_KEY=$(curl --cacert ${CACERT} --header "Content-Type: application/json" --header "Authorization: Bearer ${TOKEN}" -X GET ${APISERVER}/api/v1/namespaces/${NAMESPACE}/secrets/${PASSWORD_KEY_SECRET_NAME} | grep -o '"passwordEncryptionKey": "[^"]*' | grep -o '[^"]*$' | base64 -d);
Expand Down

0 comments on commit 34b0353

Please sign in to comment.