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

@@ -12,24 +12,24 @@ public sealed class CryptoProGostKeyOptions
public string Algorithm { get; set; } = SignatureAlgorithms.GostR3410_2012_256;
/// <summary>
/// PKCS#11 library path (typically cprocsp-pkcs11*.dll/so).
/// Optional CryptoPro provider name (defaults to standard CSP).
/// </summary>
[Required]
public string LibraryPath { get; set; } = string.Empty;
public string ProviderName { get; set; } = "Crypto-Pro GOST R 34.10-2012 Cryptographic Service Provider";
public string? SlotId { get; set; }
/// <summary>
/// Optional container name. If omitted, the certificate private key association is used.
/// </summary>
public string? ContainerName { get; set; }
public string? TokenLabel { get; set; }
/// <summary>
/// Thumbprint of the certificate that owns the CryptoPro private key.
/// </summary>
public string? CertificateThumbprint { get; set; }
public string? ContainerLabel { get; set; }
public string? UserPin { get; set; }
public string? UserPinEnvironmentVariable { get; set; }
public uint? SignMechanismId { get; set; }
public string CertificateThumbprint { get; set; } = string.Empty;
/// <summary>
/// Alternative lookup if thumbprint is not supplied.
/// </summary>
public string? SubjectName { get; set; }
public StoreLocation CertificateStoreLocation { get; set; } = StoreLocation.CurrentUser;
@@ -40,14 +40,10 @@ public sealed class CryptoProGostKeyOptions
{
KeyId = KeyId,
Algorithm = Algorithm,
LibraryPath = LibraryPath,
SlotId = SlotId,
TokenLabel = TokenLabel,
ContainerLabel = ContainerLabel,
UserPin = UserPin,
UserPinEnvironmentVariable = UserPinEnvironmentVariable,
SignMechanismId = SignMechanismId,
ProviderName = ProviderName,
ContainerName = ContainerName,
CertificateThumbprint = CertificateThumbprint,
SubjectName = SubjectName,
CertificateStoreLocation = CertificateStoreLocation,
CertificateStoreName = CertificateStoreName
};