共用方式為


LogHelper.MarkAsSecurityArtifact Method

Definition

Overloads

MarkAsSecurityArtifact(Object, Func<Object,String>, Func<Object,String>)

Marks a log message argument (arg) as SecurityArtifact.

MarkAsSecurityArtifact(Object, Func<Object,String>)

Marks a log message argument (arg) as SecurityArtifact.

MarkAsSecurityArtifact(Object, Func<Object,String>, Func<Object,String>)

Marks a log message argument (arg) as SecurityArtifact.

public static object MarkAsSecurityArtifact (object arg, Func<object,string> callback, Func<object,string> callbackUnsafe);
static member MarkAsSecurityArtifact : obj * Func<obj, string> * Func<obj, string> -> obj
Public Shared Function MarkAsSecurityArtifact (arg As Object, callback As Func(Of Object, String), callbackUnsafe As Func(Of Object, String)) As Object

Parameters

arg
Object

A log message argument to be marked as SecurityArtifact.

callback
Func<Object,String>

A callback function to log the security artifact safely.

callbackUnsafe
Func<Object,String>

A callback function to log the security artifact without scrubbing.

Returns

An argument marked as SecurityArtifact.

Exceptions

if callbackUnsafe is null.

Remarks

Since even the payload may sometimes contain security artifacts, naïve disarm algorithms such as removing signatures will not work. For now the callback is currently unused. Future changes may introduce a support for best effort disarm logging which will leverage callback.

Applies to

MarkAsSecurityArtifact(Object, Func<Object,String>)

Marks a log message argument (arg) as SecurityArtifact.

public static object MarkAsSecurityArtifact (object arg, Func<object,string> callback);
static member MarkAsSecurityArtifact : obj * Func<obj, string> -> obj
Public Shared Function MarkAsSecurityArtifact (arg As Object, callback As Func(Of Object, String)) As Object

Parameters

arg
Object

A log message argument to be marked as SecurityArtifact.

callback
Func<Object,String>

A callback function to log the security artifact safely.

Returns

An argument marked as SecurityArtifact.

Remarks

Since even the payload may sometimes contain security artifacts, naïve disarm algorithms such as removing signatures will not work. For now the callback will only be leveraged if LogCompleteSecurityArtifact is set and no unsafe callback is provided. Future changes may introduce a support for best effort disarm logging.

Applies to