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):
6565 return raw
6666
6767
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+
6874def _clean_up (result ):
6975 if isinstance (result , dict ):
7076 return {
@@ -1460,7 +1466,10 @@ def _acquire_token_silent_by_finding_specific_refresh_token(
14601466 self .token_cache .CredentialType .REFRESH_TOKEN ,
14611467 # target=scopes, # AAD RTs are scope-independent
14621468 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+ })
14641473
14651474 response = None # A distinguishable value to mean cache is empty
14661475 if not matches : # Then exit early to avoid expensive operations
You can’t perform that action at this time.
0 commit comments