28 lines
1.1 KiB
C#
28 lines
1.1 KiB
C#
namespace w4c_workflows.Services.Audit;
|
|
|
|
/// <summary>
|
|
/// Configuration for the action audit trail, bound from the <c>Nodes:Audit</c>
|
|
/// section. Auditing is opt-in: without a <see cref="Url"/> the host registers
|
|
/// <see cref="NullActionAuditSink"/> and no audit traffic is produced.
|
|
/// </summary>
|
|
public sealed class ActionAuditOptions
|
|
{
|
|
/// <summary>Configuration section this policy binds from.</summary>
|
|
public const string SectionName = "Nodes:Audit";
|
|
|
|
/// <summary>Master switch; when false the null sink is used.</summary>
|
|
public bool Enabled { get; set; }
|
|
|
|
/// <summary>OpenSearch base URL, e.g. <c>http://localhost:9200</c>.</summary>
|
|
public string Url { get; set; } = string.Empty;
|
|
|
|
/// <summary>Index name prefix; entries land in <c>{prefix}-{tenant}-{yyyy.MM}</c>.</summary>
|
|
public string IndexPrefix { get; set; } = "w4c-actions";
|
|
|
|
/// <summary>Optional basic-auth user for the audit OpenSearch cluster.</summary>
|
|
public string? Username { get; set; }
|
|
|
|
/// <summary>Optional basic-auth password; redacted from logs.</summary>
|
|
public string? Password { get; set; }
|
|
}
|