Skip to content

Commit 102c0fa

Browse files
authored
Revert password length to 15 characters (#621)
1 parent 1efc67f commit 102c0fa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: internal/controller/assets/create_ltpa_keys.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ rm -f $NOT_FOUND_LOG_FILE;
5757
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;
5858
NOT_FOUND_COUNT=$(cat $NOT_FOUND_LOG_FILE | grep -c "NotFound");
5959
TIME_SINCE_EPOCH_SECONDS=$(date '+%s');
60-
PASSWORD=$(openssl rand -base64 32);
60+
PASSWORD=$(openssl rand -base64 15);
6161
if [ "$ENCRYPTION_KEY_SHARING_ENABLED" == "true" ] && [ $NOT_FOUND_COUNT -eq 0 ]; then
6262
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);
6363
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);

0 commit comments

Comments
 (0)