Add enterprise appliance experience Phase 1 foundation
This commit is contained in:
1 parent
b3eec34158
commit
ebaa2e7219
69 files changed
+6832
-18
No files matched your search
@@ -0,0 +1,18 @@
|
||||
from ._source import load_symbols
|
||||
|
||||
|
||||
def _namespace():
|
||||
return load_symbols("_AUDIT_SENSITIVE_KEYS", "_redact_audit_value", "safe_audit_detail", globals_dict={"json": __import__("json")})
|
||||
|
||||
|
||||
def test_structured_audit_detail_redacts_secret_categories():
|
||||
safe = _namespace()["safe_audit_detail"]({"license_key": "abc", "result": "valid", "nested": {"token": "xyz"}})
|
||||
assert "abc" not in safe and "xyz" not in safe
|
||||
assert safe.count("[REDACTED]") == 2
|
||||
assert "valid" in safe
|
||||
|
||||
|
||||
def test_text_audit_detail_redacts_key_value_pairs():
|
||||
safe = _namespace()["safe_audit_detail"]("license_key=abc token:xyz outcome=valid")
|
||||
assert "abc" not in safe and "xyz" not in safe
|
||||
assert "outcome=valid" in safe
|
||||
Reference in new issue
Block a user