From 5b67eb9ddc037636224223b808fb164dbc4833b9 Mon Sep 17 00:00:00 2001 From: Ganesha Date: Wed, 1 May 2019 09:09:41 -0700 Subject: [PATCH] Update service principal secret for windows nodes (#662) --- src/aks-preview/azext_aks_preview/custom.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/aks-preview/azext_aks_preview/custom.py b/src/aks-preview/azext_aks_preview/custom.py index e76d26fa194..3ba4ae0b927 100644 --- a/src/aks-preview/azext_aks_preview/custom.py +++ b/src/aks-preview/azext_aks_preview/custom.py @@ -995,8 +995,7 @@ def _check_cluster_autoscaler_flag(enable_cluster_autoscaler, def _create_client_secret(): # Add a special character to satsify AAD SP secret requirements - special_chars = '!#$%&*-+_.:;<>=?@][^}{|~' - special_char = special_chars[ord(os.urandom(1)) % len(special_chars)] + special_char = '$' client_secret = binascii.b2a_hex(os.urandom(10)).decode('utf-8') + special_char return client_secret