Skip to content

Commit

Permalink
Update service principal secret for windows nodes (Azure#662)
Browse files Browse the repository at this point in the history
  • Loading branch information
gtracer authored and tamirkamara committed May 3, 2019
1 parent 017ef47 commit 5b67eb9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/aks-preview/azext_aks_preview/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 5b67eb9

Please sign in to comment.