File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -65,6 +65,12 @@ def _str2bytes(raw):
65
65
return raw
66
66
67
67
68
+ def _pii_less_home_account_id (home_account_id ):
69
+ parts = home_account_id .split ("." ) # It could contain one or two parts
70
+ parts [0 ] = "********"
71
+ return "." .join (parts )
72
+
73
+
68
74
def _clean_up (result ):
69
75
if isinstance (result , dict ):
70
76
return {
@@ -1460,7 +1466,10 @@ def _acquire_token_silent_by_finding_specific_refresh_token(
1460
1466
self .token_cache .CredentialType .REFRESH_TOKEN ,
1461
1467
# target=scopes, # AAD RTs are scope-independent
1462
1468
query = query )
1463
- logger .debug ("Found %d RTs matching %s" , len (matches ), query )
1469
+ logger .debug ("Found %d RTs matching %s" , len (matches ), {
1470
+ k : _pii_less_home_account_id (v ) if k == "home_account_id" and v else v
1471
+ for k , v in query .items ()
1472
+ })
1464
1473
1465
1474
response = None # A distinguishable value to mean cache is empty
1466
1475
if not matches : # Then exit early to avoid expensive operations
You can’t perform that action at this time.
0 commit comments