Add LDAP Distinguished Name Helper and Credential Audit Context
Some checks failed
Docs CI / lint-and-preview (push) Has been cancelled

- Implemented LdapDistinguishedNameHelper for escaping RDN and filter values.
- Created AuthorityCredentialAuditContext and IAuthorityCredentialAuditContextAccessor for managing credential audit context.
- Developed StandardCredentialAuditLogger with tests for success, failure, and lockout events.
- Introduced AuthorityAuditSink for persisting audit records with structured logging.
- Added CryptoPro related classes for certificate resolution and signing operations.
This commit is contained in:
master
2025-11-09 12:21:38 +02:00
parent ba4c935182
commit 75c2bcafce
385 changed files with 7354 additions and 7344 deletions

View File

@@ -0,0 +1,30 @@
using System;
namespace StellaOps.Authority.Plugins.Abstractions;
/// <summary>
/// Ambient metadata describing the client/tenant/network responsible for a credential verification attempt.
/// </summary>
public sealed record AuthorityCredentialAuditContext(
string? CorrelationId,
string? ClientId,
string? Tenant,
string? RemoteAddress,
string? ForwardedFor,
string? UserAgent);
/// <summary>
/// Provides access to the current <see cref="AuthorityCredentialAuditContext"/>.
/// </summary>
public interface IAuthorityCredentialAuditContextAccessor
{
/// <summary>
/// Gets the current credential audit context for the executing scope, if any.
/// </summary>
AuthorityCredentialAuditContext? Current { get; }
/// <summary>
/// Pushes a new credential audit context for the lifetime of a scope.
/// </summary>
IDisposable BeginScope(AuthorityCredentialAuditContext context);
}