You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Sometimes users need to pass sensitive information as kwargs when running a Guard. One example is api_key. When a Guard is called, i.e. guard(), kwargs are captured as part of the Call class for Guard History. The history objects stay on the client machine, but should still be redacted when printed or logged by the client.
Expected behavior
Potentially sensitive kwargs should be redacted.
Library version:
0.6.x
Additional context
We already have redaction logic in Call.to_interface for this exact reason. We should just be able to override __str__ and __repr__ and reuse the same redaction technique.
See also: #1213 #1217
The text was updated successfully, but these errors were encountered:
Hi @CalebCourier I was trying something like this abhishek9sharma@3a9513d.
It works for a normal print but not when I use rich. It does work for both when I use print(str(guard.history.last.inputs))
not sure what I am missing something here.
Describe the bug
Sometimes users need to pass sensitive information as kwargs when running a Guard. One example is
api_key
. When a Guard is called, i.e.guard()
, kwargs are captured as part of theCall
class for Guard History. The history objects stay on the client machine, but should still be redacted when printed or logged by the client.To Reproduce
Expected behavior
Potentially sensitive kwargs should be redacted.
Library version:
0.6.x
Additional context
We already have redaction logic in
Call.to_interface
for this exact reason. We should just be able to override__str__
and__repr__
and reuse the same redaction technique.See also:
#1213
#1217
The text was updated successfully, but these errors were encountered: